Running ER/Studio Data Architect Macros from Windows
Go Up to Automating ER/Studio Data Architect
You can run ER/Studio Data Architect macros from the Windows command shell (similar to the old DOS command line console). You can do it with a batch file or from the Windows Desktop.
Access ER/Studio Data Architect from Command Line
To execute as a batch file (*.bat file) command, use the -m option and specify the macro you want to run:
Start /wait /min "erstudio" erstudio.exe -m MyMacro.bas
Access ER/Studio Data Architect from Windows
- Choose Start > Run.
- Type cmd and press Enter.
- Enter ERStudio.exe -m MyMacros.bas.
- You can use the ER/Studio Data Architect command-line to access macros written in ERStudio's Sax Basic Macro editor. Run the command from the directory where ERStudio.exe is located. The default location is:
C:\Program Files\IDERA\ERStudio Data Architect 18.x
You cannot run the ER/Studio Data Architect command-line when running the ER/Studio Data ArchitectAppWave ION. You must have ER/Studio Data Architect installed locally on your machine to access this command.
- You must specify the macros directory in Options Editor > Application Tab. The default location is C:\ProgramData\IDERA\ERStudioDA_x.x\Macros .
- Macros may not be located in a subdirectory. Macros with long names or spaces need to be enclosed in quotes.
- You must include the .bas extension in the command line syntax.
- Any errors that occur during the execution of the macro are written to an error file (.err ) in the macros directory in Options Editor - Directories tab. The file name includes the date of the error. ER/Studio Data Architect lists each error with a timestamp in the file.
- You can use dialogs in macros executed from the command line, but you must write the macro code to handle the opening of diagrams. Macros that work on the active diagram may not work.