I haved a small piece of code whith a Try...Catch loop. The loop is used in the event of Nx not being able to create a result. Works fine.
I am doing some testing and the exception thrown is the full error message displayed to the user (it is the expected error) when doing the step manualy.
Question is: Is there an a way to find an associated error code with the message?
While i am sure I could do a check on the partial/full string being thrown it would be "nicer" to have an error code to work with
Solved! Go to Solution.
NXOpen.NXException has a Message() property that returns the error text. There is also an ErrorCode() property that returns the integer error number.
To get the entire exception information use the ToString() method of the exception
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk Testing: NX12.0
How to Get the Most from Your Signature in the Community