PML is the engine behind E3D macros and is typically categorized into two levels:
setup form !!tankBuilderForm title 'Tank Builder Automation' paragraph .intro text 'Fill in the dimensions below:' text .name 'Tank Name:' width 20 text .dia 'Diameter (mm):' width 10 text .height 'Height (mm):' width 10 button .action 'Generate Equipment' callback '!this.generate()' exit define method .generate() !tName = !this.name.val !tDia = !this.dia.val !tHeight = !this.height.val NEW EQUI /$!tName NEW CYLI DIAMETER $!tDia HEIGHT $!tHeight endmethod Use code with caution. Best Practices for Writing E3D Macros
Use the recorder as a . Perform the action once, stop recording, then open the .mac file. Delete the junk (view redraws, system checks) and extract the 3-4 real commands you need. aveva e3d macros
When you work with PML, you will encounter several file extensions, each serving a specific purpose:
If you aren't sure what the command syntax is for a specific action, use the Command Logger PML is the engine behind E3D macros and
Macros in E3D are typically saved as .pmlmac or simple .txt files containing a series of command lines.
When your macro starts looking like this: Delete the junk (view redraws, system checks) and
Macros can extract data from the database and write it to text files or Excel spreadsheets. This is commonly used for generating piping MTO (Material Take-Off) reports, checking for clashes, or identifying missing elements. 4. Integration with External Data
Manual data entry is prone to typos. Macros ensure that modifications, naming conventions, and parameter updates strictly follow predefined logic.
If you’re still repeating the same design tasks manually in AVEVA E3D, you’re leaving efficiency on the table.
Macros are critical for maintaining design integrity. Through , macros can intervene during user actions to enforce company standards.