Aveva E3d Macros -

Every macro should have a header:

--!macro Name: create_column.mac
--!Author: J. Doe
--!Date: 2024-05-20
--!Description: Creates a vertical column with top and bottom heads.
--!Arguments: HEIGHT, DIAMETER, NAME
--!Example: $M macros\create_column.mac 10000 2000 COL-001

Cause: You forgot the exclamation mark !.

Objective: Determine the maximum extent of a gas cloud for a leak from a specific pipe segment under 12 different wind directions.

Manual Approach:

Macro Approach:

One of the most common uses of macros is automating the placement of equipment and piping.

Macros in E3D typically serve three primary functions: aveva e3d macros

Treat your .mac files like source code. Use Git to track who changed the macro that accidentally flipped all nozzles 180 degrees.

-- 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 Every macro should have a header: --

-- Set graphical representation RPRES MASTER

-- Zoom to fit ZOOM FIT

Build a macro that presents a text menu:

PML TEXT '1. Create Vessel'
PML TEXT '2. Create Pipe Support'
PML TEXT '3. Run Clash Report'
DEFINE CHOICE PROMPT 'Enter choice: '
IF (CHOICE EQ 1) THEN $M create_vessel.mac ENDIF