AnsweredAssumed Answered

Methods for creating a lofted solid body using SolidWorks API

Question asked by Andrew Overby on Dec 16, 2019
Latest reply on Dec 17, 2019 by Andrew Overby

Hey everyone, 

 

I am looking to create a solid-bodied loft feature using the API. So far, all I have been able to find is an example using a temporary body function at the following link:

2018 SOLIDWORKS API Help - CreateLoftBody2 Method (IModeler) 

 

This is nice and all, but I do not like how it created an imported body instead of a genuine loft in the feature manager. Because this lofted macro will be dealing with thousands of loft profiles, what I am looking for is a function that replicates the attached image in the design tree. This way, the profiles are nested and it cleans up the design tree a bit. I have been able to find the desired feature for a lofted surface feature using "swModel.InsertLoftRefSurface2()", but not a solid body.

 

I am not able to use the surfacing method because it causes changes to the part's geometry when I try to knit the lofted sections together. Some of the curvatures are lost, and they are critical to the model. This loft contains around 5000 profiles, and I found that by lofting in sections instead of one giant one, it is more stable. I found on a smaller scale that by lofting bodies and using the "Combine" feature, this did not happen, hence why this seemed to be the right route at this point. 

 

If anyone knows if such a function exists for lofting solid bodies similar to the "swModel.InsertLoftRefSurface2()", that would be a huge help!

 

Thank you very much in advance,

Andrew 

Attachments

Outcomes