I am working with Bentley(R) OpenPlant PowerPID V8i (SELECTseries 5) - Version 08.11.10.202
I have added 2 properties to my FLUID REGULATOR class that gets its information automatically from my PIPELINE class through an ECExpression on each property.
When I add these 2 fields into my ECExpression & Parser regular expression for my Tagging convention, the valve body when placed on a pipeline in OpenPlantPID disappears.
This is my Tagging Convention where the valve body works:
this.GetRelatedInstance("PLANT_AREA_HAS_NAMED_ITEM:1:PLANT_AREA, NAME:?").NAME & "-" & this.VALVE_OPERATION_TYPE & this.DEVICE_TYPE_CODE & this.NUMBER & "-" & this.SIZE
^[?\w]*-(?<VALVE_OPERATION_TYPE>\w{1})(?<DEVICE_TYPE_CODE>\w{2})(?<NUMBER>\d{2})-(?<SIZE>[?\w]*)|(?<NUMBER>.*)
This is my Tagging Convention where the valve body disappears: (In red the 2 properties added)
this.GetRelatedInstance("PLANT_AREA_HAS_NAMED_ITEM:1:PLANT_AREA, NAME:?").NAME & "-" & this.FLUID_COMMODITY_CODE & this.PIPELINE_NUMBER & "-" & this.VALVE_OPERATION_TYPE & this.DEVICE_TYPE_CODE & this.NUMBER & "-" & this.SIZE
^[?\w]*-(?<FLUID_COMMODITY_CODE>\w{2})(?<PIPELINE_NUMBER>\d{2})-(?<VALVE_OPERATION_TYPE>\w{1})(?<DEVICE_TYPE_CODE>\w{2})(?<NUMBER>\d{2})-(?<SIZE>[?\w]*)|(?<NUMBER>.*)
I really have no idea what could be causing this?
Hi Melissa,
Can you try removing the Parser regular expression, leaving it empty, as you do retrieve your FLUID_COMMODITY_CODE & PIPELINE_NUMBER from PIPING_NETWORK_SYSTEM, so it should not be possible to parse them from name of the VALVE anymore.
Let me know if this helps, if not I'll investigate further.
Regards,
Justinas
Hello Justinas,
Thank you, that does work. :)
The only thing then is, when wanting to edit the Valve Number again, it does not bring up the original pop-up dialog box that it did when you have a Parser regular expression present. Its not really needed as you can edit the number in the Element Information Box, but do you think this would cause an issue in future?
Good to hear that helped.
As regarding editing tag number, you can try adding a parser expression which would not try to update those two properties, but would consider that they should be in there. I believe something like this should work:
^[?\w]*-[?\w{4}]-(?<VALVE_OPERATION_TYPE>\w{1})(?<DEVICE_TYPE_CODE>\w{2})(?<NUMBER>\d{2})-(?<SIZE>[?\w]*)|(?<NUMBER>.*)
I assume here that Commodity code + Pipeline number is always 4 symbols in your naming convention. If not, please modify it.
Regards,Justinas
Answer Verified By: Melissa Robbertze
Awesome, that works, I thank you very much, it helps a lot!
Kind Regards
Melissa
Justinas and Melissa,
Note that in the parser expression when there is a literal character between two properties you can use the [?\w]*. There is no need to use the number of characters. The system will strip/parse all characters up to the next literal chracter - in this case its a dash. Likewise you could do the same with numeric characters with the use of the [?\d]*.
Additionally I have performed some additional testing on this tagging process and will be publishing a document on tagging where the properties in an inline component tag are inherited from the main pipeline in which they reside.
Tony DeRosa
Bentley Plant
Senior Application Engineer
Yes, that's true Tony, but sometimes having a more strict rule is also good :)
Thank you Tony. I in the end had to use [?\w]* anyway in my Parser Regular Expression instead of [?\w{4}]. As when editing any properties after placing the valve it scrambled up my Tag Number, but with [?\w]* it works 100% now