I am having an issue setting up a macro in NX to set my drafting preferences every time I open the CAD program, and I can't seem to find any documentation on the syntax used in NX macro code to help troubleshoot. I'd like to code the macro so that no matter what tab you were on before, it always goes to the "General/Setup -> Workflow" tab and then starts setting up preferences. I have found that NX macros record the following:
1. Code that opens drafting preferences 2. Code that loads the current tab (the one that I am on when recording the macro) 3. Code that loads the "General/Setup -> Workflow" tab 4. Code that sets preferences 5. Code that closes drafting preferences
The portion of the code that actually sets the drafting preferences is working correctly (steps 1, 4, 5), however it is on the condition that the "General/Setup -> Workflow" tab is the one that appears when you open up the "Drafting Preference" page. If it is not the page that opens up, the macro throws an error. In other words, the tab that opens up first must match the current tab used in step 2 to record the macro. Unfortunately, it seems that while drafting preferences are stored in the part files, the tab that you were last on is always remembered. So to run the macro, I'd have to go into drafting preferences first and choose the "General/Setup -> Workflow" tab, and then run the macro.
Is there a way to remove the need to load the current tab (step 2), or to automatically go to the first tab? I've tried a few different things and am basically copy-pasting various code around, however I can't seem to find a way to circumvent the need to load the current tab. Also, is there documentation on macro syntax, more specifically what "ASK_ITEM, BEG_ITEM, and END_ITEM" mean?