Destroy command error in translation
Destroy command error in translation
(OP)
Hi,
I have written a code in C# for converting drawing to 2dPart file using the File->Exports->2dExchange option.It translates the file but is giving error at end.I debugged the code and found issue in the Destroy command. Im unable to figure out why this is happening.Im running this code in Nx7.5.I tried creating a journal and then executing it by creating a dll but it is still giving the same error.
NXTo2dCreator nXTo2dCreator1;
nXTo2dCreator1 = theSession.DexManager.CreateNxto2dCreator();
nXTo2dCreator1.MaxSystem3DModelSpace = true;
nXTo2dCreator1.MaxSystemPointRes = true;
nXTo2dCreator1.SpCurveTolerance = 0.0508;
nXTo2dCreator1.MaxUser3DModelSpace = 10000.0;
nXTo2dCreator1.MaxUserPointRes = 0.001;
nXTo2dCreator1.Nxto2dSettingsFile = "C:\\Programs\\Siemens\\NX75\\UGTO2D\\ugto2d.def";
nXTo2dCreator1.FacetBodies = true;
nXTo2dCreator1.InputFile = "@DB/partnumber/revision/specification/filename"; // example of how im using in my code
nXTo2dCreator1.OutputFile = "C:\\Temp\\test_2d.prt";
nXTo2dCreator1.ExportData = NXOpen.NXTo2dCreator.ExportDataOption.Drawing;
nXTo2dCreator1.DrawingName = "A3ENG_NEW";
nXTo2dCreator1.ViewName = "Top";
NXObject nXObject1;
nXObject1 = nXTo2dCreator1.Commit();
nXTo2dCreator1.Destroy();
I have written a code in C# for converting drawing to 2dPart file using the File->Exports->2dExchange option.It translates the file but is giving error at end.I debugged the code and found issue in the Destroy command. Im unable to figure out why this is happening.Im running this code in Nx7.5.I tried creating a journal and then executing it by creating a dll but it is still giving the same error.
NXTo2dCreator nXTo2dCreator1;
nXTo2dCreator1 = theSession.DexManager.CreateNxto2dCreator();
nXTo2dCreator1.MaxSystem3DModelSpace = true;
nXTo2dCreator1.MaxSystemPointRes = true;
nXTo2dCreator1.SpCurveTolerance = 0.0508;
nXTo2dCreator1.MaxUser3DModelSpace = 10000.0;
nXTo2dCreator1.MaxUserPointRes = 0.001;
nXTo2dCreator1.Nxto2dSettingsFile = "C:\\Programs\\Siemens\\NX75\\UGTO2D\\ugto2d.def";
nXTo2dCreator1.FacetBodies = true;
nXTo2dCreator1.InputFile = "@DB/partnumber/revision/specification/filename"; // example of how im using in my code
nXTo2dCreator1.OutputFile = "C:\\Temp\\test_2d.prt";
nXTo2dCreator1.ExportData = NXOpen.NXTo2dCreator.ExportDataOption.Drawing;
nXTo2dCreator1.DrawingName = "A3ENG_NEW";
nXTo2dCreator1.ViewName = "Top";
NXObject nXObject1;
nXObject1 = nXTo2dCreator1.Commit();
nXTo2dCreator1.Destroy();





RE: Destroy command error in translation
What error message do you get?
What version of NX?
www.nxjournaling.com
RE: Destroy command error in translation
Ya the .Inputfile is the displayed part.Im using NX7.5.I get ufusr error message and then nx hangs i need to kill the process to close NX.