24.12.2012 Views

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

AUTOMATING <strong>ER</strong>/STUDIO ><br />

Access <strong>ER</strong>/<strong>Studio</strong> from Command Line<br />

To execute as a batch file (*.bat file) command, use the -m option and specify the macro you want to run:<br />

Start /wait /min "erstudio" erstudio.exe -m MyMacro.bas<br />

Access <strong>ER</strong>/<strong>Studio</strong> from Windows<br />

1 Click Start > Run.<br />

2 Type cmd and press Enter.<br />

Notes<br />

• You can use the Erstudio command to access macros written in <strong>ER</strong><strong>Studio</strong>'s Sax Basic Macro editor. Run the<br />

command from the directory where <strong>ER</strong><strong>Studio</strong>.exe is located. The default location is:<br />

...\<strong>Embarcadero</strong>\<strong>ER</strong><strong>Studio</strong>X.X<br />

• You must specify the macros directory in Options Editor - Application Tab. The default location is:<br />

Windows XP: C:\Documents and Settings\All Users\Application<br />

Data\<strong>Embarcadero</strong>\<strong>ER</strong><strong>Studio</strong>_X.X\Macros<br />

Windows Vista: C:\ProgramData\<strong>Embarcadero</strong>\<strong>ER</strong><strong>Studio</strong>_X.X\Macros<br />

• Macros may not be located in a subdirectory. Macros with long names or spaces need to be enclosed in quotes.<br />

• You must include the .bas extension in the command line syntax.<br />

• Any errors that occur during the execution of the macro are written to an error file (.err) in the macros directory in<br />

Options Editor - Directories Tab. The file name includes the date of the error. <strong>ER</strong>/<strong>Studio</strong> lists each error with a<br />

timestamp in the file.<br />

• You can use dialogs in macros executed from the command line, but you must write the macro code to handle the<br />

opening of diagrams. Macros that work on the active diagram may not work.<br />

See Also<br />

Related Topics<br />

Creating Event Handlers<br />

<strong>ER</strong>/<strong>Studio</strong> supports programmatic event handling. In order to use the events, you must have the option enabled. To do<br />

this, click Tools > Options > Automation Options and then select Create Handlers.<br />

You can also write handlers for update events, see Handling Update Events.<br />

You can customize templates to create database objects, including the following:<br />

• Entity<br />

• Attribute<br />

• Relationship<br />

• Index<br />

• Model<br />

• Submodel<br />

• Domain<br />

• Default<br />

• User Datatype<br />

• Rule<br />

• View<br />

• View Relationship<br />

• Trigger<br />

• Stored Procedure<br />

EMBARCAD<strong>ER</strong>O TECHNOLOGIES > <strong>ER</strong>/STUDIO® 8.0.3 US<strong>ER</strong> GUIDE 309

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!