Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Using Compare/Update from PML

  • Last UpdatedFeb 19, 2026
  • 4 minute read

The main functions of Compare/Update can be called from PML using the CompareUpdate PML object. The following methods provide the equivalent of the main interactive functions.

Method

Description

selectDesign()

Select Design database source

selectSchematic()

Select Schematic database source

selectEngineering()

Select Engineering database source

compareEquipment()

Compare Equipment list

compareLines()

Compare Lines list

comparePipes()

Compare Pipes list

compareInstruments()

Compare Instruments list

compareValves()

Compare Valves list

comparePipingSpecials()

Compare Piping Specials list

compare(STRING configuration name)

Compare a named configuration

owner(STRING owner name )

Set the name of the owner for inserted elements

acceptAllDisplayed()

Accept all available changes including inserting new objects and updating attribute values

acceptAllLinked()

Accept linked objects (use this to unlink previously linked objects or update attributes on linked objects)

acceptAllMatched()

Accept all matched objects (use this to link all matched objects)

acceptAllUnmatched()

Accept all unmatched objects (use this to insert new objects)

updateLink()

Update the target database by inserting and linking elements and updating attribute values

updateUnlink()

Update the target database by unlinking elements

export(

STRING elements file path,

STRING attributes file path)

Following a compare operation, output the contents of the two grids into the named files in csv format

Note: Integration with AVEVA Instrumentation, AVEVA Electrical and AVEVA P&ID are not currently supported from the command line and are available only interactively.

These methods require options and mappings to have been configured interactively.

A typical macro could include:

!run = object CompareUpdate()

!run.selectEngineering()

!run.compareEquipment()

!run.acceptAllDisplayed()

!run.updateLink()

MMTools Object

The MMTools object provides methods to link and unlink, objects that could be linked interactively using Schematic 3D Integrator or Compare/Update can be linked in this way. To use these methods the following initialization is required at the top of each PML file (object, function, or macro) where these methods are to be used.

import 'MMservices'

handle any

endhandle

The following initialization is also required in each method, function or macro where the diagram methods are to be called.

using namespace 'Aveva.Pdms.MMServices'

!mmTools = object mmTools()

The string arguments can be a name like /MyName or a reference like =123/45678. If duplicate names are used, it is best to always use reference numbers to avoid confusion. The array arguments are arrays of strings of the same format.

!mmTools.link(!Name1 is STRING, !Name2 is STRING)

!mmTools.unlink(!Name is STRING)

!mmTools.unlink(!Names is ARRAY)

Note: The MMTools object is not available in 12.1.SP4, use the following integrator object instead:

  • Equivalent initialization:

    !!integratorInit()

  • Equivalent methods:

    !!integrator.link(!Name1 is STRING, !Name2 is STRING)

    !!integrator.unlink(!Name is STRING)

    !!integrator.unlink(!Names is ARRAY)

MMViewer Object

The MMViewer object provides diagram viewer methods. To use these methods the following initialization is required at the top of each PML file (object, function, or macro) where these methods are to be used.

import 'MMservices'

handle any

endhandle

The following initialization is also required in each method, function or macro where the diagram methods are to be called.

using namespace 'Aveva.Pdms.MMServices'

!mmViewer = object mmViewer()

The following methods can be used to clear colors and close the current or all diagrams.

!mmViewer.resetDiagramColours()

!mmViewer.resetAllDiagramColours()

!mmViewer.closeDiagram()

!mmViewer.closeAllDiagrams()

The findOnDrawing method opens the diagram for one or more schematic objects and highlights them.

Note: That the argument is an array.

If an object appears on more than one diagram, you will be prompted to choose which diagram to open. This example shows how to view the linked schematic object for the current element in 3D.

!itemList[1] = !!ce.schlnk.ref.string()

!mmViewer.findOnDrawing(!itemList)

Individual schematic objects can be colored on the diagram view using the following methods. Note that these methods do not open a diagram or select an object. The results will be visible only if the relevant diagram is already open in the viewer.

!mmViewer.setColour(!Name is STRING, !Colour is STRING)

!mmViewer.setColour(!Name is STRING, !Colour is REAL

Note: The MMViewer object is not available in 12.1.SP4, use the following IntegratorManager object instead:

  • Equivalent initialization:

    import 'IntegratorAddin'

    handle any

    endhandle

    using namespace 'Aveva.Pdms.IntegratorAddin'

    !intMan = object IntegratorManager()

  • Equivalent methods:

    !intMan.resetDiagramColours()

    !intMan.resetAllDiagramColours()

    !intMan.closeDiagram()

    !intMan.closeAllDiagrams()

    !itemList[1] = !!ce.schlnk.ref.string()

    !intMan.findOnDrawing(!itemList)

    !intMan.setColour(!Name is STRING, !Colour is STRING)

    !intMan.setColour(!Name is STRING, !Colour is REAL)

Note: This method should be used only when all of the databases holding objects that have been linked are current on the MDB.

The MMManageLinks object provides a method to validate and clean uplinks. To use this method the following initialization is required at the top of each PML file (object, function, or macro) where this method is to be used.

import 'MMservices'

handle any

endhandle

The following initialization is also required in each method, function or macro where the method is to be called.

using namespace 'Aveva.Pdms.MMServices'

!!mmManageLinks = object mmManageLinks()

The validate method outputs a list of links and any errors to the command line. It cleans up any link objects with invalid references, such as may have occurred when objects have been deleted. It will also merge partially populated links, for example, 3D object "A" is linked to schematic object "A" by one link and schematic object "A" is linked to engineering object "A" by another link, as can occur when links are created in separate extract databases.

!!mmManageLinks.validate()

Note: The MMManageLinks object is not available in 12.1.SP4, use the following integrator object instead:

  • Use the equivalent initialization

    !!integratorInit()

  • Use the equivalent method:

    !!Integrator.validateLinks()

In This Topic
TitleResults for “How to create a CRG?”Also Available in