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

Hull and Outfitting

VNETxmlOtherName Example 2

  • Last UpdatedJan 29, 2026
  • 4 minute read

If the user wants to create the association to the identifier on the P&ID as described above, the user will need to create the following PML syntax, in a file called VNETxmlOtherName<Project Code>.pmlobj

In this example the name of the pipe is 3"-15D-O-66006-BBU3.1 and the Instrument is FT-506:

define object VNETxmlOtherName<Project Code>

-- Used as a temporary store for the original name

member .result is string

endobject

-- End of object definition for VNETxmlOtherName<Project Code>

define method .VNETxmlOtherName<Project Code>( !object is dbref, !name is string )

-- The !object and !name are always passed to this file, and must be declared. You will need

-- these to do some of the naming that you require

-- Set up the result array and a temporary store

!result = array()

!tempresult = ''

-- Set up an array of Contexts you need

!context = array()

!context[1] = 'PROJECTCONTEXT'

!context[2] = 'PROJECTCONTEXT|VPD'

-- Set up an array of associations that you need

!assoctype = array()

!assoctype[1] = 'is identified by'

-- Check to see if the current item is of type INST

if ( !object.type EQ 'INST') then

-- Get the items owning pipe, if there is an error jump to the blocks endhandle other wise

-- Do the commands in the handle none block

!ownpipe = pipe

handle none

-- Check the owning pipes name has a ‘–‘ in it and is not unset

if (!ownpipe.name.match('-') gt 0) and (!ownpipe.name.match('unset') eq 0) then

-- Split the name on the ‘-‘

!splitname = !ownpipe.name.split('-')

-- If the size of the array created by the split is eq 5 parts then the pipes name is

-- to be part 3 and part 4 separated by a ‘-‘ otherwise use the original pipe name

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

!pipename = !splitname[3] & '-' & !splitname[4]

else

!pipename = !ownpipe.name

Endif

-- Checking the owning pipes name for a ‘–‘ failed so now check for a ‘/’

elseif (!ownpipe.name.match('/') gt 0) then

-- Split the name on the ‘/‘

!splitname = !ownpipe.name.split('/')

-- If the size of the array created by the split is eq 4 parts then the pipes name is

-- to be part 1 and part 2 separated by a ‘-‘ otherwise use the original pipe name

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

!pipename = !splitname[1] & '-' & !splitname[2]

else

!pipename = !ownpipe.name

endif

-- Checking the owning pipes name for a ‘–‘ failed and checking for a ‘/’ failed

-- so just use the original pipe name

else

!pipename = !ownpipe.name

endif

-- Check that name is valid

!splitname = !pipename.split('-')

!checkreal = !splitname[1].real()

handle any

elsehandle none

-- If the characters before the ‘-‘ are not strings characters then the name is invalid

-- for a pipe so use the original pipe name

!pipename = !ownpipe.name

endhandle

endhandle

-- Create the name to be used in the association by concatenating !pipename which

-- is the name created in this file and the !name is the Instruments name passed to

-- this object from main Export process

!tempresult = !pipename+!name

endif

-- Check that you have a valid name and add it to the results array of the object

if (!tempresult eq '/') or (!tempresult eq '') or (!tempresult eq !name) then

else

!this.result[1] = !tempresult & ' ~ ' & !context[1] & ' ~ ' & !assoc

type[1]

endif

endmethod

The result would be that for Marine objects of type INST, if the owning pipes name can be split on ‘-‘ dashes and it breaks down into 5 items then make the name up from the 3rd (O) and 4th (66006) components, which means that the size (3"), the area (15D) and spec (BU3.1) of the pipe (1st, 2nd and 5th components respectively) would not be used in the name.

If the name does not contain ‘-‘ dashes then split the name on ‘/’ backslashes. If there are 4 components then make the name up from the 1st and 2nd components. If the name does not fall into any of these breakdowns then return the original name. (Note: that the supplied name has already had the preceding slash removed before this method is called).

The INST items name is then concatenated on to the end of the pipename that has been created so the user gets O-66006/FT-506. The result stored in the VNETxmlOtherName file results array !this.result[1] would be string that looks like this:

O-66006/FT-506~PROJECTCONTEXT~is identified by

The XML produced by the Export appware with the above configuration object, the OtherNames Identifiers would look something like this:

For a instrument named /FT-506

<Object>

<ID>FT-506</ID>

<Context>

<ID>PROJECTCONTEXT</ID>

</Context>

<ClassID>FLOW TRANSMITTER</ClassID>

<Association type="is identified by">

<Object>

<ID>/FT-506</ID>

<Context>

<ID>VPD</ID>

<Context>

<ID>PROJECTCONTEXT</ID>

</Context>

</Context>

</Object>

</Association>

<Association type="is identified by">

<Object>

<ID>O-66006/FT-506</ID>

<Context>

<ID>PROJECTCONTEXT</ID>

</Context>

</Object>

</Association>

<Association type="is a part of">

<Object>

<ID>3&quot;-15D-O-66006-BBU3.1/B1</ID>

<Context>

<ID>PROJECTCONTEXT</ID>

</Context>

</Object>

</Association>

<Association type="is logically connected to">

<Object>

<ID>TEE 1 of BRANCH /3&quot;-15D-O-66006-BBU3.1/B1</ID>

<Context>

<ID>PROJECTCONTEXT</ID>

</Context>

</Object>

</Association>

<Characteristic>

<Name>Name of the element</Name>

<Value>/FT-506</Value>

</Characteristic>

</Object>

The difference between the original Example and this one is shown in italics.

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