Publish Using PML Macros
- Last UpdatedOct 24, 2024
- 1 minute read
You can publish data from AVEVA™ E3D Design using PML functions as well. To do this, you must first create a macro file that contains the commands to publish. Then, you must run the macro file by dragging it to the command window in AVEVA™ E3D Design.
The following table describes the commands used for publishing:
|
Command |
Description |
|---|---|
|
import 'AVEVA.NET.Gateways.IED.PmlExtensions' handle any endhandle |
Mandatory command that must be available in all macro files |
|
IEDPublisher() |
Name of the object used for publishing |
|
SelectElement() |
Command for selecting elements for publishing |
|
SelectConfiguration() |
Command for selecting the configuration |
|
SetOption() |
Command for settings the options |
|
Publish() |
Command for publishing |
|
AvailableOptions() |
Command for listing the available options |
|
ErrorsNo() |
Command for displaying the number of errors after the last Publish() action |
The following table lists the options available with the SetOption() command.
|
Option |
Default Value |
Accepted Values |
|---|---|---|
|
eiwmContextName |
avngate |
'<STRING>' |
|
eiwmSuffix |
_avngate |
'<STRING>' |
|
generateFolderVNETFile |
False |
'True' | 'False' |
|
generateTriggerStartFile |
False |
'True' | 'False' |
The following table lists the commands for publishing reports.
|
Command |
Example |
|---|---|
|
SelectReport(string <report file path>, bool <is scoped>) |
!iedPublisher.SelectReport('C:\Users\Public\Documents\AVEVA\Everything3D\Data\DFLTS3.1\data\reports\DESIGN-Equipment_List.repv', false) |
|
GetSelectedReports() |
!reports = !iedPublisher.GetSelectedReports() q var !reports |
|
ClearSelectedReports() |
!iedPublisher.ClearSelectedReports() |
The following is an example of the contents of a macro file.
import 'AVEVA.NET.Gateways.IED.PmlExtensions'
using namespace 'AVEVA.NET.Gateways.IED.PmlExtensions'
!publisher = object IEDPublisher()
!publisher.SelectElement('/SITE-EQUIPMENT-AREA01')
!publisher.SelectConfiguration('DefaultConfiguration')
!publisher.SetOption('eiwmcontextname', 'APS')
!publisher.SetOption('eiwmsuffix', '_null')
!publisher.SetOption('generatefoldervnetfile', 'true')
!publisher.SetOption('generatetriggerstartfile', 'true')
!publisher.Publish()
!publisher.ClearSelectedElements()
!publisher.ClearSelectedConfigurations()
!publisher.Publish()
!errorsNo = !publisher.ErrorsNo()