GetInstanceCutoutFromWall Exception

Anonymous

GetInstanceCutoutFromWall Exception

Anonymous
Not applicable

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

Reply
504 Views
1 Reply
Reply (1)

jeremytammik
Autodesk
Autodesk

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

0 Likes