Message 1 of 3
Selection for RebarPresentationMode

Not applicable
04-02-2018
03:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everybody,
I'm actually building a macro (C#) to change the RebarPresentation of existing Rebar in my project.
I'm using the method SetPresentationMode and for the PresentationMode Middle and First/Last it works great.
My problem for the PresentationMode Select (following code).
In this case, I'm not able to set a selection of the Element from the Rebar Set (For example Index 2).
The following code selects all elements from Rebar Set.
foreach (ElementId Id in selectedIds) { Rebar Rebar = doc.GetElement(Id) as Rebar; using (Transaction t = new Transaction(doc, "Change Presentation")) { t.Start(); int test = Rebar.NumberOfBarPositions; Rebar.SetPresentationMode(ActiveView, RebarPresentationMode.Select); t.Commit(); } }
Does somebody have an idea?
Thanks,