delete redundant rooms in color scheme

delete redundant rooms in color scheme

Ning_Zhou
Advocate Advocate
927 Views
6 Replies
Message 1 of 7

delete redundant rooms in color scheme

Ning_Zhou
Advocate
Advocate

see captured image, all rooms are only existed in color scheme, is there an API way to get rid if those rooms? it can be done one by one manually so i assume it can be done in API way.

Ning_Zhou_0-1589948736951.png

 

0 Likes
928 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk

Just to clarify: you are not researching how to delete redundant rooms in the model, but redundant colour schema entries for room types that do not exist in your current model. Is that correct?

 

Well, I never saw such a schema before in my life. Is it represented in the Revit database somehow?

 

What does it look like through RevitLookup?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 7

Ning_Zhou
Advocate
Advocate

thanks Jeremy, you're right, they're just entries in color scheme, i tried to find those using lookup, no luck, i even cannot find color scheme at all, is it because color scheme inaccessible via API yet? 

0 Likes
Message 4 of 7

jeremytammik
Autodesk
Autodesk

As said, I have never heard of it, so it may be inaccessible via API.

 

If you delete those entries, is the deletion specific to the current project or does it apply to all projects?

 

If it is project-specific, it may be saved in the database.

 

If it applies to all, it is certainly not.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 7

Ning_Zhou
Advocate
Advocate

thanks Jeremy,  it is project-specific but i cannot see it in database via lookup, in fact, can we see color scheme via lookup?

0 Likes
Message 6 of 7

jeremytammik
Autodesk
Autodesk

If it is in the database, it is probably just an Element object.

  

Subscribe to DocumentChanged and see what Element instances were modified by manually editing the colour scheme.

  

I bet you'll see a couple of modified Element instances that do not tell you what they are or what data they have.

  

Check their parameters anyway.

  

Maybe you will be lucky!

 

This is all part of the standard approach to research how to address a Revit API programming task:

 

https://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-onto...

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 7 of 7

Ning_Zhou
Advocate
Advocate

good tip! i'll try it later, thanks Jeremy.

0 Likes