Hello,
New to creating an NX Journal. Prob something dumb here but I cannot get past this. This should rotate all the step files in a folder by a matrix.
I get a dreaded C+ error.
Line 1 : A namespace cannot directly contain members such as fields or methods
Yup, the NXOpen API is too "exotic" for AI for it to generate code reliably (not enough questions about it on Stack Overflow I guess). You can get a good structure, but the actual methods that do the stuff you want are just electric sheep.
Also, the code is in Basic, if you're getting a C# error from it, that looks like an AI prompt problem. ;-)
I'm actually ok with VB. The Journal editor wants to make it a .cs file, which it treats entirely different, like C# I guess.
I can rename the file to .vb and I get a host of different errors.
It looks like I am going to need find the NXOpen API documentation and actually read it.
Does anyone have a link to the API methods?
You can select the preferred Journal language in Customer Defaults (permanent) and also in user interface preferences (Ctrl+2 - tools - journal, temporarily).
There used to be an NXOpen reference available offline when you install the "NX Programming tools" component, but nowadays it has wandered off to the "NX Help" module, afaik.
The "Programming tools" module does add the UGOPEN folder where you can find and check out sample applications in all supported programming languages.
You can also just record a Journal while doing something manually in NX, and it will spit out (mostly) working code you can then analyse and modify.