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: 

Retrieving the Color and Material of an Element vis Loop

1 REPLY 1
Reply
Message 1 of 2
machineelf
288 Views, 1 Reply

Retrieving the Color and Material of an Element vis Loop

Hello,

 

I am thinking this is a simple question but I am not sure.

 

I am wondering if there is a way to simply retrieve the colors and/or materials from a Revit drawing's collection of elements within the Revit file.

 

For example, my imagination of this process is the following:

 

Loop through all elements

 

Within loop, get element.

 

Within loop, check if element has color or material assigned.

 

Within loop, do what I need to do to element/object.

 

End Loop

 

I hope this makes sense.

 

Thank you for your time.

1 REPLY 1
Message 2 of 2
gopinath.taget
in reply to: machineelf

Hello,

 

Unfortunately its not that simple. Retrieving the color and material depends on what you want to do. Are you treating the color as independent of material? I ask because material itself has a color property. 

 

What sort of elements are we talking about. Do you have a sample or use case?

 

Thanks

Gopinath

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community