Is there a way to have model attributes (colour, wt, style) set by component state rather than service?
Hello Bear,
Thanks for posting query to Bentley Plant forum. Yes, via named expression that should be possible. You can try to feed details to below mentioned named expression template."BY_LEVEL_AND_TEMPLATE:" & "<desired level name>" & ":<desired template group name>" & OPITEM.COMP_STATE & ":Model"Please note that above provided is a template & you need to enter desired level & group name as an example refer below expression that has been created using above expression."BY_LEVEL_AND_TEMPLATE:" & "Reserved Areas" & ":OpenPlant\Reserved Areas\" & OPITEM.SULFUR_LEVEL & ":Model"
Hope this helpsRegards | Deepak Singh
Thanks for the quick reply Deepak.
Only issue I have is that I don't want to change the level, just how the element looks. For instance, I have a line number 4220-PW-7818-80-C1 so the level the item is on is also 4220-PW-7818-80-C1. As it stands, some of the line is existing and some new so I want the existing part of the line to display grey rather than the attributes set for service PW.
you should be able to use just "BY_TEMPLATE:OpenPlant\Piping\" & OPITEM.COMP_STATE & ":Model"
I've managed to get that far Gaurav. I'm trying to extend this now by having colour set by service unless 'state' is existing. Any thoughts on that one? Even the examples Bentley give don't seem to work.
You can use an IIF condition like this.
I havent tested it but it may work.
IIF( OPITEM.COMP_STATE="", PIPELINE.SERVICE_NAME, OPITEM.COMP_STATE)