Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

The automation script I have develo 1

Status
Not open for further replies.

BarathAlagar

Mechanical
Apr 6, 2021
10
The automation script I have developed is trying to active an existing sketch using the code:
sketch.Activate(NXOpen.Sketch.ViewReorient.False)
The sketch is activated but sketch related tools are not visible(i.e., Sketch workbench UI not visible)

To get the sketch workbench / UI, the user must navigate to Menu-->Edit-->Sketch

Similarly, while I try to deactivate the sketch through code the Sketch workbench / UI is not reverting to the previous status
The code used is:
theSession.ActiveSketch.Deactivate(NXOpen.Sketch.ViewReorient.False, NXOpen.Sketch.UpdateLevel.SketchOnly)
i.e., The sketch has come out from the edit mode, but the UI still shows with Sketch workbench tools

Note: I am using NX1946
Please help me to solve the issue
 
Replies continue below

Recommended for you

Are you using the new sketch solver or the classic solver? Also, does the journal modify the sketch in any way or is the purpose just to activate the sketch so the user can make edits?

www.nxjournaling.com
 
Hi Cowski,

Thanks for your reply...

We are using new sketch solver. Yes our tool will just activate the sketch(by code) then user can make his edit. after that tool has to deactivate the sketch(by code).
 
It appears that switching to the sketch task environment is not supported by journaling. I don't have NX 1946 installed, but I got the same result in NX 1919 and 2019.
NX_journal_activate_sketch_shutz8.png


If all you want to do is activate a sketch, you might be able to do it with a macro instead of a journal.

www.nxjournaling.com
 
Hi Cowski,

Thanks for your reply...

Switching to the sketch task environment is not supported because of the new sketch solver? or the classic sketch solver also has the same issue?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor