Override graphic settings

Override graphic settings

Anonymous
Not applicable
535 Views
3 Replies
Message 1 of 4

Override graphic settings

Anonymous
Not applicable

Hi everyone,

is there any way to override the graphic settings for pre selected elements all at the same time instead of looping through every single elements and override one by one?

 

doc.Activeview.SetElementOverrides(ElementId (can we do a list of elements here instead of just one element id?,osg)

0 Likes
536 Views
3 Replies
Replies (3)
Message 2 of 4

PavelAnd
Advisor
Advisor

Hi @Anonymous. If all elements have the same category, then you can try SetCategoryOverrides Method. In other way only using foreach...

ICollection<ElementId> ids = uiApp.ActiveUIDocument.Selection.GetElementIds();
foreach (ElementId id in ids)
{
    doc.ActiveView.SetElementOverrides(id, ogs);
}

 

Best regards, Pavel Plotitsyn.

0 Likes
Message 3 of 4

Anonymous
Not applicable

Thanks for the reply.

If we choose each element one by one it is really slow in big models.

Any idea for speeding up?

0 Likes
Message 4 of 4

jlpgy
Advocate
Advocate
View.SetCategoryOverrides()
View.SetFilterOverrides()
单身狗;代码狗;健身狗;jolinpiggy@hotmail.com
0 Likes