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

Hull and Outfitting

User Defined Classification of Items

  • Last UpdatedJan 19, 2026
  • 3 minute read

It is possible to override the default system classification by modifying the code in the PML object file VNETUserClass<Project Code>.pmlobj (see AVEVA NET Export - Settings Window).

This object takes PDMS type and PDMS name as arguments, together with the default system assigned AVEVA NET Class, and returns the user-defined Class of the object. Typically this function is used to set the class by looking at the name of the object possibly in combination with other attributes of the PDMS Object.

To enable faster processing of the objects files, you can add naming and classification pairs to a user storage area, which is an pml ARRAY object, stored on the main VNETExport window, which once set up in the classification object file, can be called any number of times. There are 10 of these storage arrays, which are loaded using the standard syntax.

The example below is part of the standard installation for SAMMAR project.

First it checks that the array is empty, it loads a temporary array with the classification data in the form of a Equipment Letter+Classification. The storage array is then cleared out as a precaution, and then the temporary array is loaded in to the storage array by splitting it on the + this then allows the Equipment Letter to be found easily during the main processing. The next part of the object would be to use the data in the storage array to check a EQUIP items tagname against the Equipment letters in the storage area, and if it finds a match, it classifies that equipment as that type for AVEVA NET.

define object VNETUserClass<Project Code>

-- Used as a temporary store for the original name

member .result is string

endobject

-- End of object definition for VNETUserClass<Project Code>()

define method .VNETUserClassSAM(!type is STRING, !name is STRING, !Class is STRING)

-- Set up the result to be the default class for the item

!this.result = !Class

if !!VNETExport.UserClassStore1.empty() then

!equitagdata = array()

!equitagdata.append('C+Columns and Towers')

!equitagdata.append('E+Heat Transfer')

!equitagdata.append('D+Drum')

!equitagdata.append('P+Pump')

!equitagdata.append('VENTILATION+HVAC')

-- Some instruments are build as EQUIs

!equitagdata.append('LG+LEVEL GAUGE')

!equitagdata.append('LT+LEVEL TRANSMITTER')

!equitagdata.append('LS+LEVEL SWITCH')

!equitagdata.append('LV+HAND VALVE')

!equitagdata.append('LZ+HAND VALVE')

!!VNETExport.UserClassStore1.clear()

!!VNETExport.UserClassStore1[1] = array()

!!VNETExport.UserClassStore1[2] = array()

-- Separate out the tags from the array descriptions and load into one of the user storage areas

do !indx indices !equitagdata

!!VNETExport.UserClassStore1[1].append(!equitagdata[!indx].part(1,'+').trim())

!!VNETExport.UserClassStore1[2].append(!equitagdata[!indx].part(2,'+').trim())

enddo

endif

if (!type eq 'EQUI') then

-- Split the items name at any dashes and remove the prefixing VPD slash

!splitname = !name.after('/').split('-')

-- Find the tag in the list of tags and get its position

-- Searches through the split parts of the name for the tag letters

-- If it finds any then it breaks out

!pos = real()

do !indx indices !splitname

!pos = !!VNETExport.UserClassStore1[1].findfirst (!splitname [!indx])

if not !pos.unset() then

break

endif

enddo

-- Check to see if anything was found

-- Try to be more clever

-- Convert all REALS to hashes then split them on hashes an try the search again

if !pos.unset() then

if (!splitname.size() eq 1) then

!length = !splitname[1].length()

do !loop from 1 to !length

!test = !splitname[1].substring(!loop,1).real()

handle any

elsehandle none

!splitname[1] = !splitname[1].replace (!splitname[1].substring(!loop,1),'#',1,1)

endhandle

enddo

!newname = !splitname[1].split('#')

do !indx indices !newname

!pos = !!VNETExport.UserClassStore1[1].findfirst (!newname[!indx])

if not !pos.unset() then

break

endif

enddo

endif

endif

-- Check to see if anything was found

-- If yes then output just the description form the array of tags and descriptions

if !pos.unset().not() then

!this.result = !!VNETExport.UserClassStore1[2][!pos]

endif

elseif (!type eq 'INST') then

...

...

endif

endmethod

-- End of method definition for .VNETUserClass<Project Code>()

A simple example is shown below, which will classify EQUI items by their first letter in the PDMS name:

define object VNETUserClass<Project Code>

-- Used as a temporary store for the original name

member .result is string

endobject

-- End of object definition for .VNETUserClass<Project Code>()

define method .VNETUserClass<Project Code>(!type is STRING, !name is STRING, !Class is STRING)

-- Variables defined are....

-- !type = PDMS Type of the current element for example, SITE or GASK

-- !name = PDMS name including "/".

-- !Class = AVEVA default class result

!this.result = !Class

!FirstChar = !name.substring(2,1)

if (!type eq 'EQUI') then

if (!FirstChar eq 'E') then

!this.result = 'Heat Transfer'

elseif (!FirstChar eq 'V') then

!this.result = 'Vessel'

elseif (!FirstChar eq 'P') then

!this.result = 'Pump'

elseif (!FirstChar eq 'D') then

!this.result = 'Drums'

elseif (!FirstChar eq 'C') then

!this.result = 'Columns and Towers'

else

-- If here then it could not match an EQUI character, so set back to AVEVA result

!this.result = !Class

endif

else

-- If it's here then it is not an EQUI, therefore leave as AVEVA result

!this.result = !Class

endif

!this.return '$!result'

endmethod

-- End of method definition for .VNETUserClass<Project Code>()

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