Design Parameter Macro Runner is a VBScript utility for automating the execution of Excel macros that extract or manipulate design parameters from spreadsheets. It is especially useful for engineering, architecture, and related fields where parameter extraction from Excel files is common.
This script searches for your design parameter workbook (DesignExtractor.xlsm or variants) in common Windows locations and runs a macro (e.g., GetDesignParameter or alternatives) to process your data.
- Automated Macro Execution: Runs an Excel macro to extract design parameters.
- Flexible File Location: Searches multiple common directories for the workbook.
- Macro Name Detection: Tries several possible macro names and lists available macros if not found.
- Error Handling: Provides clear messages if files or macros are not found.
- Silent Operation: Runs Excel in the background with no pop-ups.
- Windows Compatible: Designed for Windows environments using VBScript.
- Windows PC with Excel installed.
- The workbook file (
DesignExtractor.xlsmor similar) containing the required macro. - VBScript enabled (default in Windows).
- Necessary folder and macro access permissions.
-
Clone or download this repository:
git clone https://github.com/Umar-444/Design-Parameter-Macro-Runner.git cd Design-Parameter-Macro-Runner -
Place the
DesignExtractor.xlsmfile in one of the following locations for automatic detection:DocumentsDesktopDownloads- Or update the script with your custom file path.
-
Run the script:
- Double-click the
.vbsfile in Windows Explorer, or - Run from the command line:
cscript DesignParameterMacroRunner.vbs
(Replace
DesignParameterMacroRunner.vbswith your script name) - Double-click the
-
What the script does:
- Finds your Excel workbook.
- Opens it silently.
- Attempts to run the
GetDesignParametermacro (or similar). - Lists available macros if the main one is not found.
- Saves and closes the workbook.
- Update File Paths:
If your workbook is not in a default location, edit thefilePathvariable in the script to point to the correct folder. - Macro Name:
If your macro has a different name, add it to thealternativeMacrosarray in the script.
- File Not Found:
Ensure the.xlsmfile exists in the expected location. Update the script'sfilePathvariable if needed. - Macro Not Found:
Make sure the macro exists and is not password protected. The script will print available macros if it can't find the main one. - Excel Not Installed:
The script requires Microsoft Excel to be installed.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
See CONTRIBUTING.md for more details.
If you encounter any issues, please report them here.
This project is licensed under the terms of the MIT License.
For questions or feedback, open an issue or contact Umar-444.Umar-444.
Automate your design parameter extraction with ease!