Hi Guys !
Is their a NXOpen Method to run another Method which do some Stuff in the Background without updating the view all the time only at the end.
i tried with Thread and Backgroundworker.
But with these two function i end up in the Background of Windows.
Has somebody an idea ?
Solved! Go to Solution.
If you just want to prevent the display updating you could try the wrapper for:
Once your work is finished call the wrappers for:
Not sure if any of this has made it to NXOpen yet without having to use the wrappers. I'm still on NX8.5
PS: Using threads in NXOpen code to do work on the model is fraught with danger and not recommended by Siemens.
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: [NX22.214.171.124 MP11 64bit] Testing: [NX126.96.36.199 MP1]
Here's how to do it in vb.net
' turn the display off
< Construction Geometry Code >
' turn the display back on again
' regenerate the display so it matches what's been going on - very important!
Another trick when iterating on geometry is to used the undo marks. I usually wrap iterative geometry code within undo marks. For example:
For i as integer = 0 to 100
Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Invisible, "EnlargeAndSplit")
<Do some geometry creation here>