E3d Macros — Aveva

-- Macro: Create_Vertical_Vessel.pmlmac
-- Purpose: Creates a simple cylindrical shell at origin.

-- Set current element NEW EQUIP EQUIP NAME 'VESSEL-101' EQUIP PURPOSE 'VERTICAL-STORAGE'

-- Create the cylindrical shell NEW PRIMITIVE PRIM TYPE CYLINDER PRIM DIAMETER OUTER 3000 PRIM HEIGHT 8000 PRIM ORI VERT PRIM POSITION E 0 N 0 U 0 PRIM DONE

-- Set graphical representation RPRES MASTER

-- Zoom to fit ZOOM FIT

A hardcoded macro is useful. A parameterized macro is a tool.

Instead of writing "HEIGHT 8000", you want to ask the user or read a variable. aveva e3d macros

At its core, an E3D macro is a plain text file (usually with a .mac extension) containing a series of Design Data Language (DDL) or PML (Programmable Macro Language) commands.

When you execute a macro, E3D reads the file line-by-line, interpreting each command as if a user typed it directly into the command line.

Use the recorder as a cheat sheet. 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. -- Macro: Create_Vertical_Vessel


Macros are fantastic, but they have limits (no IF/ELSE logic natively unless you write PML inside the macro).

When your macro starts looking like this:

IF (!DIAMETER > 5000) THEN
   $M special_foundation.mac
ELSE
   $M standard_foundation.mac
ENDIF

…you are no longer writing a macro. You are writing PML (Programmable Macro Language). A hardcoded macro is useful

Progression Path:

Learn macros first. They are the gateway to mastering E3D automation.