Reply

revolved cutout feature in assembly

I've never tried to work with assembly features before, but I have a need now.  Does anyone have a bit of code to get me started.  Haven't figured out how to begin the profile yet.  Thanks in advance.

2 REPLIES

Re: revolved cutout feature in assembly

[ Edited ]

Ok, following another thread I've managed to get the profile drawn.  There seems, however, to be a bug in the setaxisofrevolution method.  

 

SolidEdgeFrameworkSupport.Line2d oAxis = null;

SolidEdgePart.Profile oProfile = null;

SolidEdgeAssembly.Layouts oAssyLayouts = null;

SolidEdgeAssembly.Layout oAssyLayout = null;

SolidEdgeAssembly.AssemblyDocument oAssyDoc = null;

object status = 0;

 

oAssyLayouts = oAssyDoc.Layouts;

oAssyLayout = oAssyLayouts.Add(oAssyRefPlanes.Item(2),true, out status);

oProfile = (SolidEdgePart.Profile)oAssyLayout.Profile;

...

...

...

...

// set the axis of revolution
oAxis = oLines2d.AddBy2Points(-.0254, 0, .0254, 0);
oProfile.SetAxisOfRevolution(oAxis); // this is where it errors out.  

 

I believe it to be a bug in the API.  Can anyone confirm this?

Re: revolved cutout feature in assembly

Hi @martyman,
I tried to get this working with no success.
Like you I get an exception calling SetAxisOfRevolution.
I got Extruded cutout working.
But with RevolvedCutout I'm clueless. Tried the Axis parameter of the Add method with no success.
I think this is worth a IR at GTAC.
Please share the solution ( if any) here.
regards

JB
VS2015, SE ST10