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: 

CAD import within family -> how to delete associated import categories?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Ning_Zhou
954 Views, 3 Replies

CAD import within family -> how to delete associated import categories?

if import is within families then deleting family instances won't automatically remove associated import categories, the question is how do you know these associated import categories if family instances already being deleted?

3 REPLIES 3
Message 2 of 4
jeremytammik
in reply to: Ning_Zhou

Dear Ning,

 

Happy New Year to you and thank you for your query.

 

I am not aware of any official way to retrieve these specific elements.

 

What class do they have? What properties? How can you identify them?

 

This looks to me like one of those typical questions requiring you to dig through the Revit database elements and their properties in detail.

 

The kind of stuff you can explore using RevitLookup, or, if you need to evaluate methods as well as properties, may require more flexible API interaction, e.g. in the Revit Ruby or Python shell:

 

http://thebuildingcoder.typepad.com/blog/2013/11/intimate-revit-database-exploration-with-the-python...

 

Certain element relationships can currently only be determined using unofficial and completely unsupported element id relationships, that are certain to change in the future:

 

http://thebuildingcoder.typepad.com/blog/2011/11/undocumented-elementid-relationships.html

 

Finally, please take a look at this interesting discussion:

 

http://thebuildingcoder.typepad.com/blog/2014/09/debugging-and-maintaining-the-image-relationship.ht...

 

Maybe that solves the issue for you as well?

 

I hope this helps.

 

Best regards,

 

Jeremy



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

Message 3 of 4
Ning_Zhou
in reply to: jeremytammik

thanks Jeremy and Happy New Year too!

 

i assume the only solution is to
1) either properly name these layers before importing into Revit family, then it can be removed based on these names in Revit project file
2) or purge Revit file throughly, then these imported stuff will eventually be removed

 

attached for your info.

 

Cheers,

Ning

Message 4 of 4
jeremytammik
in reply to: Ning_Zhou

Dear Ning,

 

Yes, indeed, that sounds like the way to go to me.

 

Cheers,

 

Jeremy



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

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