×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Destroy command error in translation

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();

RE: Destroy command error in translation

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

RE: Destroy command error in translation

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources