Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Override graphic settings

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
447 Views, 3 Replies

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

Override graphic settings

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)

3 REPLIES 3
Message 2 of 4
PavelAnd
in reply to: Anonymous

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

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.

Message 3 of 4
Anonymous
in reply to: PavelAnd

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

Thanks for the reply.

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

Any idea for speeding up?

Message 4 of 4
jlpgy
in reply to: Anonymous

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

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report