I need a line appears only in edit mode at PG2.
I needed something similar - I wanted to show the frame in Edit mode, so I knew where my invisible stuff was and hide it in runtime.
The expression that made this possible was:
if pr::.:Name:Unique#QualityDetail = Variant(448) then
DashDotPen(Red, 1., DashDot, Square, Miter)
I mean, what could be more obvious?
I’m sure you could tweak it from here to get the result you want J
Use the "BuilderLevel()" function.
The description for this function follows:
"Returns a negative value at runtime. In the Graphics Builder, BuilderLevel Returns a value 0 if called in the aspect being edited. Returns 1 in the first level element instances. Returns 2 in the second level element instances and so on." (Reference: 3BSE049230 on page 282 in revision "-600_A")
So in the Visible property of your line write: "BuilderLevel() >= 0"