Hi,
Please take a look at the following snippet (C# API for SolidWorks 2013):
fullName = currSW3D.GetPathName();
fullName=fullName.Substring(0,fullName.Length-6);
MessageBox.Show ( "Current 3D object identified as: " + currSW3D.GetTitle () );
currExtension=currSW3D.Extension;
warns = currSW3D.GetType();
errs=currSW3D.SaveAs3(fullName+"STEP",0,0);
The Current model is correctly identified by its name and its type is a part. The messagebox correctly states the name of the model without the extension and the model type is correctly identified as a part. Nonetheless, when the program reaches the SaveAs3 command, Solidworks get completely stuck and I have to stop it through the Task Manager.
Interestingly, the STEP file is successfully created, but the program hangs.
What am I doing wrong?
Thank you
SolidworksApi macros