Hello,
I'm just starting out with SolidWorks API.
I've just started with the C# tutorial in SolidWorks.
Where you have to create a CutExtrude feature in a candle.
Everything is just fine until I start to run the code.
SolidWorks gives red colored sketshes (Item is Unsolvable)
When I look at my code there are very large numbers as parameters
public void Main()
{
ModelDoc2 swDoc = null;
PartDoc swPart = null;
DrawingDoc swDrawing = null;
AssemblyDoc swAssembly = null;
bool boolstatus = false;
int longstatus = 0;
int longwarnings = 0;
swDoc = ((ModelDoc2)(swApp.ActiveDoc));
boolstatus = swDoc.Extension.SelectByID2("", "FACE", 27899090838445772, 21999999999985676, -14118678285342412, false, 0, null, 0);
swDoc.ClearSelection2(true);
SketchSegment skSegment = null;
skSegment = ((SketchSegment)(swDoc.SketchManager.CreateCircle(0, 0, 0, 2848, 13902, 0)));
swDoc.ClearSelection2(true);
boolstatus = swDoc.Extension.SelectByID2("Arc1", "SKETCHSEGMENT", 0, 0, 0, false, 0, null, 0);
Feature myFeature = null;
myFeature = ((Feature)(swDoc.FeatureManager.FeatureCut3(true, false, false, 0, 0, 2.5E+16, 2.5E+16, true, false, false, false, 2.6179938779915E+16, 2.6179938779915E+16, false, false, false, false, false, true, true, true, true, false, 0, 0, false)));
swDoc.ISelectionManager.EnableContourSelection = false;
}
I get the same problem with the macro tutorial for VB.NET
But for VBA I don't get this problem.
I'm doing everything according the tutorial
Please help
Thanks in advance
SolidworksApi macros