PML Callable Reclassification
- Last UpdatedNov 07, 2024
- 1 minute read
New PML method enables programmatic reclassification, as in the following example. It is the command line equivalent of selecting a tag and then pressing the reclassification button.
using namespace 'Aveva.Core.Commands'
!tagIds = object Array()
!tagIds[0] = '=16394/39619'
!ht = object Array()
!ht[0] = 'http://www.aveva.com/datamodel/item#m4268e89f-04b9-430b-8393-332663cb854e'
!ht[1] = !tagIds
!commandManager = object PMLNETCommandManager()
!commandManager.executeCommand('Aveva.Engineering.Tags.ReclassifyCommand', !ht)
Note:
The reclassify command uses the data in the second parameter; this is an array with:
Element [0] is the Class URI of the new class.
Element [1] is an array of tag reference numbers to be reclassified to this class.
In AVEVA Engineering 15.2, there is a limitation that only the first element in the tags array will be processed. So multiple calls would need to loop through a list of tags. The array has been provided for a future enhancement to be able to pass a batch of tags through the process.
The class URI can be copied to the clipboard from the class picker. Hold down the Shift key, then left-click on the class (it must be a change of focus so not the currently selected class in the form).
The class URI is available as pseudo-attribute CLSURI on ENGITE (as in, on all tags), and on all schematic types (SCEQUI, SCINST, an so on) where a class has been selected in AVEVA Diagrams.