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: 

Family Document Solids cutting

3 REPLIES 3
Reply
Message 1 of 4
GeomGym
598 Views, 3 Replies

Family Document Solids cutting

Hi,

 

I'm creating a generic model family document, and then trying to cut a blend with an extrusion.

I tried using SolidSolidCutUtils.AddCutBetweenSolids(famDoc,s1,s2); but this throws an exception 

The element must be in a project document or in a conceptual model, pattern based curtain panel, or adaptive component family.

 

If I manually create a "void extrusion" using the user interface, the generated object automatically cuts the existing blend.

If I set solid to false when creating the extrusion (with blend existing), it displays but does not effect a cut.

 

Thanks in advance to anyone who can point me to an example or tell me how to cut two solids in a family document.

 

Thanks,

 

Jon

 

140519 family document cutting object.png

 

Tags (3)
3 REPLIES 3
Message 2 of 4
GeomGym
in reply to: GeomGym

I've looked further and found the Document.CombineElements method.  

This works for me for the first operation, to create the blend and then cut with extrusion.

Then I add an ellipse revolution, and try to call on the combine elements with the previous result and it doesn't work.

Actually i can't get this api generated revolution to cut manually (where as when I created the family manually it did).

 

I've attached the family created from the user interface, the resulting family from the API and the resulting family from the API code.

Is sequential calls to combine elements fine?  Anyone spot anything incorrect?

 

Thanks,

 

Jon

Message 3 of 4
jeremytammik
in reply to: GeomGym

Does the same operation work when driven through the user interface?



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

Message 4 of 4
GeomGym
in reply to: jeremytammik

Hi Jeremy,

 

Thanks for the reply.

 

I did study this further today. 

 

I found if you change the blend depth (there's a parameter in the attached or select the short type), then the both voids are active.

But the manual family I created worked fine so I'm not sure if this is an API issue or something in core revit.

 

140520 urinal from parametric IFC.png

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