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