Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Destroy command error in translation

Status
Not open for further replies.

Soha99

Aerospace
Joined
Jun 17, 2014
Messages
2
Location
NL
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();
 
Is the .InputFile specified also the displayed part when the code runs?

What error message do you get?

What version of NX?

www.nxjournaling.com
 
Hello,
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top