Zitiert von: Doom235
...I tried using HideElementsService and VisibleService in the API to hide the bar shape in the drawing, but it only affects the plan view. In the 3D view, the bar shape remains visible. Could you provide any advice?...
Hi!
That is, because you probably hide the wrong BaseElementAdapter. When you select a rebar in a plane view, what you get is the BaseElementAdapter of type BarsRepresentationLine_TypeUUID. When you hide it, you hide only a single rebar in a placement.
The parent element of if it, is an adapter of type BarsRepresentation_TypeUUID. When you hide this one, you hide the whole placement representation in the ground view or in one particular view or section (as you know, you can show the same placement in multiple views or sections).
The parent element of it is BarsLinearPlacement_TypeUUID (for a linear placement of course, for other placement types this would be different) and when you hide this one, you hide the placement in every UVS and in 3D
I found an example in my library, that uses the feature. It modifies the rebar placement. After you select a rebar placement, the placement itself is hidden and a preview of a new, modified placement is drawn. I hide the whole placement, on each UVS and in 3D, which is I think what you want to achieve.
But you never know, what the user selects. Under the ModifyBarPlacement class you'll find a method get_bar_placement. The method recursively goes up in the hierarchy and checks, if the parent is a placement. If yes, it returns it. If not, it goes one level up and again and again.
Have a look and let me know.
Best,
Bart