Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Is it possible to get a view specific color overrides to filter elements?

zefreestijl
Advocate

Is it possible to get a view specific color overrides to filter elements?

zefreestijl
Advocate
Advocate

Hi, since we can get or set Color option in the Export DWG function either in App or with API,

 

zefreestijl_1-1630307099980.png

 

So is it possible to use the same functionality to filter the view,

so I can get the elements with same color?

 

I've searched but only got this solution: 

https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-the-final-graphics-style-of-an-elemen...

 

which needs several conditional loop with ElementOverride, FilterOverride, CategoryOverride, ObjectSytle Material... etc

 

but the post was created in 2017,

so I was wondering if there's any good solutions at the moment?

 

Thanks in advance :]

0 Likes
Reply
Accepted solutions (1)
736 Views
4 Replies
Replies (4)

jeremy_tammik
Autodesk
Autodesk

I think the situation described in the thread you point out is still valid today.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes

zefreestijl
Advocate
Advocate

Hi Jeremy, thanks for the reply,
 
what I want to achieve is to filter out each geometry by the shading color in view,
so that I can export the geometry with same color to the same layer.

zefreestijl_0-1630368906901.png


Currently I'm using Lisp in AutoCAD to do the job,
by merging layers with the same true color and then convert them
to the corresponding index color and then change their name.
 
Though this automatic method works well, the command implementing through
each objects in AutoCAD takes a very long time. 
 
So I was thinking if I can do the task before exported the dwg in Revit,
I've searched and studied a little on the topic of export layer table yesterday,
it looks like the api functionality is still inside the box of mapping each category to each layer.
 
Is their a better way so that we can export Revit entities by the color or even by type names, 
instead of using the default method by categories or using modifier to add suffix?
 
Any suggestions will be grateful, 
Thanks in advance :]

0 Likes

jeremy_tammik
Autodesk
Autodesk
Accepted solution

Thank you for your appreciation.

 

Sorry, I am not aware of any better way. 

 

I suggest you start by exploring how to achieve what you are trying to do manually through the user interface.

 

In general, if a feature is not available in the Revit product manually through the user interface, then the Revit API will not provide it either.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open

zefreestijl
Advocate
Advocate

Hi Jeremy, thanks for your suggestion,

 

I found some similar feature requirement afterwards,

https://forums.autodesk.com/t5/revit-ideas/the-color-controlled-option-about-export-multiple-categor...

 

so Revit may not exist a better solution currently.

hopefully this function will be considered in the future,

I'll keep searching the alternative ways in the mean time.

 

Thanks for your help :]

0 Likes