Schematic 3D Integrator User Guide

Administration : Use Integrator from the Command Line
The method signatures for Build, Compare, Link and Unlink are shown below. These correspond to the interactive operations described in the Main Table Context Menu in Integrator Controls. 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.
Caution: This method should be used only when all of the databases holding elements that have been linked are current on the MDB.
 
-- Initialise Integrator
import 'MMServices'
handle any
endhandle
using namespace 'Aveva.Pdms.MMServices'
!!mmViewer = object mmViewer()
!!integratorInit()
 
-- Collect schematic equipment and pipelines that appear on this diagram
!diagram = |/A0-01-2012-0001|
var !items collect all SCEQUI
var !items append collect all SCPLIN
var !diaref evaluate diaref for all from !items
!comlist = ARRAY()
do !i index !items
if (match(!diaref[!i], !diagram) gt 0) then
!comlist.append(!items[!i])
endif
enddo
 
-- Set report direct to file and do compare
!!integrator.setreportvisible(false)
if (!comlist.size() gt 0) then
!!integrator.compare(!comlist)
handle any
write !!error.text
elsehandle none
-- Write out the compare summary
!!integratorSupportHandler.printSummary()
-- View the report unless running in non graphics mode
if (not istty) then
!file = object FILE('C:\Aveva\report.xml')
if (!file.exists()) then
!!integrator.openreport()
endif
endif
-- Generate compare Excel report and colour coded diagram pdf
!!integrator.saveAsExcel('C:\Aveva\report.xlsx')
!!integrator.openAllReferencedDiagrams()
!list = !!integrator.diagramlist()
do !page values !list
!diagramPage = !!mmViewer.diagramPage(!page)
!diagramPage.saveAsPDF('C:\Aveva\' & !page)
enddo
endhandle

1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Logo