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: 

GetInstanceCutoutFromWall Exception

1 REPLY 1
Reply
Message 1 of 2
Anonymous
502 Views, 1 Reply

GetInstanceCutoutFromWall Exception

I am using GetInstanceCutoutFromWall method to get window boundary points. But sometimes the method is throwing exception saying "Couldn't generate cut-out." I have read a post saying the method will fail if the opening family is defined without opening cut object. 

https://forums.autodesk.com/t5/revit-api-forum/getinstancecutoutfromwall-problem/m-p/7167002#M23635

 

My question is how can i check if the family instance has opening cut object? I have tried 

winInstance.Symbol.Family.FamilyCategory.SubCategories.Contains("Opening Cut") but it didn't work. The subCategories doesn't have an opening cut object even if the actual window in the model have an opening cut.

 

Thanks

1 REPLY 1
Message 2 of 2
jeremytammik
in reply to: Anonymous

How can I check whether a family instance has an opening cut object?

 

 

I cannot guarantee that it will work, but I would test whether the opening cut object is retrieved by a filtered element collector. You could set up a collector to retrieve only opening cut objects, and only objects that intersect the family instance bounding box. That might do the trick.

 

Please let us know whether it works.

 

Thank you!

 

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 Design & Make Report