In AVEVA E3D Design, macros are automated scripts written in Programmable Macro Language (PML). They allow you to automate repetitive modeling tasks, customize the user interface, and manage complex database operations. 1. Getting Started with PML
PML is the core language for creating E3D macros. It exists in two primary versions:
PML1: Primarily used for simple command sequences and legacy macros.
PML2: An object-oriented version used for complex logic, custom forms, and advanced data handling. 2. Creating a Basic Macro
A macro is essentially a text file containing a series of valid E3D commands.
Write the Script: Use a text editor (like Notepad++) to list commands exactly as you would type them in the command window.
Save the File: Save your file with a .mac extension (e.g., create_site.mac). Run the Macro:
Drag and Drop: Drag the file directly into the Command Window in E3D.
Command Line: Type $M /path/to/your/macro.mac in the command console. 3. Advanced Macro Features
To make your macros more dynamic and interactive, you can use advanced PML features: Programmable Macro Language - AVEVA™ Documentation
Table of Contents * Quick Access Toolbar. * Messages and Message Log. Messages in the Status Bar. Message Log. * Command Window. * AVEVA™ Documentation Publishing Using PML Macros - AVEVA™ Documentation
AVEVA E3D macros are primarily written using PML (Programmable Macro Language), the same engine used in its predecessor, PDMS. Macros allow you to automate repetitive tasks, create custom forms, and extend the software's native capabilities. 1. Getting Started with PML
Macros in E3D are typically saved as .pmlmac or simple .txt files containing a series of command lines.
Variable Types: Use STRING, REAL, BOOLEAN, or ARRAY to store data.
Basic Syntax: Commands are generally written exactly as they would be typed into the Command Window.
Comments: Use $( ... $) for block comments or $-- for single-line comments to document your code. 2. Creating and Running a Macro aveva e3d macros
Write the Code: Open a text editor (like Notepad++ or VS Code) and type your sequence of E3D commands.
Save the File: Save it to a directory included in your PML Search Path (defined by the PMLLIB environment variable).
Register the File: If you added a new file to the PML library, run the command PML REHASH in E3D to refresh the index.
Execute: Run the macro by typing $M /C:\path\to\yourmacro.txt or simply the filename if it is in your search path. 3. Key Automation Concepts
Collections & Filters: Use COLLECT commands to gather specific elements (e.g., all Pipes or Valves) into a list for bulk modification.
Forms & Menus: You can design custom GUI windows using setup form !!MyForm to give users a visual interface for your automation.
Error Handling: Use handle ANY blocks to prevent the macro from crashing if a command fails during execution. 4. Helpful Resources
Official Documentation: Look for the "Software Customization Reference Manual" within your AVEVA installation folder or on the AVEVA Support Portal.
Community Snippets: Sites like 3D Software Customization offer free sample macros for learning tasks like clash detection or attribute modification.
Video Tutorials: Brief visual guides for setting up productivity tools can be found on YouTube. E3D Productivity : Quick Macro
AVEVA E3D macros are essential automation scripts written in Programmable Macro Language (PML) that allow plant designers and administrators to automate repetitive tasks, customize the user interface, and manage complex 3D data efficiently. By leveraging these macros, users can transform manual multi-step workflows—such as generating reports, creating equipment primitives, or exporting review files—into single-click actions. Understanding the Core Technology: PML
At the heart of AVEVA E3D macros is PML, a domain-specific language developed by AVEVA. It has evolved through several iterations to meet increasing project complexity:
PML1: The legacy version used for basic command sequences and simple forms.
PML2: An object-oriented upgrade that supports complex variables (Strings, Reals, Booleans, Arrays), control logic (IF/DO loops), and custom methods.
PML.NET: The most advanced tier, allowing integration with the .NET framework to create sophisticated custom add-ins and UI controls. Common Use Cases for E3D Macros In AVEVA E3D Design , macros are automated
Macros are used across all engineering disciplines in E3D—Piping, Structural, and Mechanical—to solve specific bottleneck issues: Programmable Macro Language - AVEVA™ Documentation
The Programmable Macro Language (PML) is a domain specific language developed by AVEVA to customize AVEVA products. AVEVA™ Documentation AVEVA Programmable Macro Language Guide | PDF - Scribd
AVEVA Everything3D (E3D) uses a powerful scripting system called Programmable Macro Language (PML). Macros allow you to automate repetitive design tasks, create custom user interfaces, and manage complex data within the 3D environment. 🛠️ Key Concepts of E3D Macros
PML (Programmable Macro Language): The engine behind macros. It comes in two versions: PML1 (simple command sequences) and PML2 (object-oriented with support for forms and objects).
Macro Files: Usually saved with a .mac extension. These are simple text files containing a series of E3D commands.
PML Libraries: To make your scripts globally available, you save them in designated PMLLIB folders defined in your environment settings. 🚀 How to Create and Run a Macro
Write the Code: Use a text editor (like Notepad++ or VS Code) to list E3D commands exactly as you would type them in the Command Window.
Save the File: Save it with a .mac extension (e.g., mytask.mac).
Register the Script: Use the command PML REHASH in the E3D console. This forces the system to scan your libraries and find new files.
Execute: Run your macro by typing $M /C:\path\to\your\file.mac or simply call the function name if it is defined in your PML library. 💡 Practical Use Cases
Bulk Attribute Editing: Change the name, specification, or color of hundreds of pipes or structures at once.
Automated Reporting: Generate customized CSV or Excel reports directly from the 3D model.
Custom Forms: Build pop-up windows with buttons and dropdowns to guide users through specific workflows.
Validation Checks: Create scripts that scan the model for common design errors before a formal clash check.
For a visual walkthrough on setting up and using the Quick Macro tool in E3D, watch this guide: E3D Productivity : Quick Macro TDS Engr Solutions Pte Ltd YouTube• 27 Oct 2022 E3D Productivity : Quick Macro Part 8: Real-World Case Study – Saving 200
Scenario: An EPC firm needed to model 450 identical pipe racks across a refinery. Each rack had 20 handrails, 15 grating panels, and 8 vertical supports.
Manual time per rack: 45 minutes. Total manual: 337.5 hours.
Solution:
A senior designer wrote a parameterized macro (rack.mac) that accepted:
The macro contained logic to:
COPY with offset.Result:
In the E3D command line, type:
$M C:\AVEVA\E3D\MACROS\create_vessel.mac
Congratulations. You’ve just automated 15 manual steps.
Macros are critical for maintaining design integrity. Through Command Level Enforcement (CLE), macros can intervene during user actions to enforce company standards.
Title: Unlocking Productivity: A Deep Dive into AVEVA E3D Macros
Subtitle: Automate repetitive tasks, enforce design standards, and slash modeling time with custom command scripting.
Reading Time: 4 minutes
If you have spent any significant time in AVEVA E3D (formerly PDMS), you know the drill. You repeat the same sequence of commands: NEW CE, CONN HEAD, SPREF O:100, CREATE. Over and over again. It is accurate, but it is slow.
Enter E3D Macros – the oldest, yet most underutilized, productivity booster in the software.
A macro is simply a text file (.txt or .mac) containing a list of native E3D commands. When you run the macro, E3D executes each line sequentially as if you typed it yourself. But when done right, macros are not just about speed; they are about standardization and error reduction.
If you manage a team of 20 E3D designers, macro chaos can be dangerous. Standardize.
PROMPT 'Enter number of pumps'FOREACH !comp IN COLLECT('PIPE')MACRO PLAY 'sub_macro'ON ERROR CONTINUE / ON ERROR STOP