Inventor crashing when a SketchLine3D is selected

Inventor crashing when a SketchLine3D is selected

Anonymous
Not applicable
336 Views
1 Reply
Message 1 of 2

Inventor crashing when a SketchLine3D is selected

Anonymous
Not applicable

I am in an assembly and editing a part in that assembly(in-place edit) through code. I am editing a Sketch3D (through code) and giving option to select a SketchLine3D  through user interaction so that I can get the start and end point of selected SketchLine3D for further processing.  But when I select a SketchLine3D of a sweep path interactively, Inventor is crashing. Can anybody help me with this issue?

 

Part of my code(Using Inventor 2015 and VS 2012):

 

foreach (ComponentOccurrence oCompOcc1 in asmDoc.ComponentDefinition.Occurrences.AllLeafOccurrences)
{
oCompOcc = oCompOcc1;
if (oCompOcc.Name == "XYZ")
{
oCompOcc.Edit();
break;
}
}

 

PartComponentDefinition oPartCompDef = oCompOcc.Definition as PartComponentDefinition;
foreach (Sketch3D oSketch3d1 in oPartCompDef.Sketches3D)
{
oSketch3d = oSketch3d1;
if (oSketch3d.Name == "SketchName")
{
oSketch3d.Edit();
break;
}
}
m_inventorApplication.ActiveView.Update();

 

Object oPicked = m_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kAllLinearEntities, "Select a sketch line"); //Inventor crashing after this line is executed as soon as the SketchLine3D is selected.

 

 

0 Likes
337 Views
1 Reply
Reply (1)
Message 2 of 2

YuhanZhang
Autodesk
Autodesk

Can you share a data to reproduce the issue? Don't share confidential data.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes