Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Turn Off Interpart Expression Warnings Programmatically - NX11

Is there a way to turn off these settings programmatically? (in NX11)

Capture.JPG

6 REPLIES

Re: Turn Off Interpart Expression Warnings Programmatically - NX11

Your screenshot shows that the settings are locked at the site level. If you have administrative powers, you can change these interactively or with a program. If you do not have the proper permissions, then you cannot change them.

 

Note that when customer default settings are changed, they do not take effect until NX is restarted.

Re: Turn Off Interpart Expression Warnings Programmatically - NX11

Hi cowski1,

I have access to change them when logged in as administrator, however I want to leave the settings checked on in customer defaults so the normal user gets a report of interpart expression warnings. We have a ufunc that loads assemblies and we don’t want the "Update event list" dialog to pop up, so we want to turn off those settings only in the ufunc and turn them back on at the end of the program.

Duane
Solution
Solution
Accepted by topic author dvdubbaya
4 weeks ago

Re: Turn Off Interpart Expression Warnings Programmatically - NX11

To answer the "how to do this programmatically" part of this question, simply record a journal:

 

'
Imports System
Imports NXOpen

Module SimcenterJournal
Sub Main (ByVal args() As String) 

Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
' ----------------------------------------------
'   Menu: File->Utilities->Customer Defaults...
' ----------------------------------------------
Dim changeList1 As NXOpen.Options.ChangeList = Nothing
changeList1 = theSession.OptionsManager.NewOptionsChangeList(NXOpen.Options.LevelType.User, NXOpen.Options.LevelLockedByDefault.False)

changeList1.SetValue("Show_Missing_IPE_Part_Warnings", False)

changeList1.SetValue("Show_Referencing_IPE_Warnings", False)

changeList1.Save()

changeList1.Dispose()
' ----------------------------------------------
'   Menu: Tools->Journal->Stop Recording
' ----------------------------------------------

End Sub
End Module

Re: Turn Off Interpart Expression Warnings Programmatically - NX11

Wow! I did record a journal (before posting to the forum) and turned them off in customer defaults and then stopped the recording. This produced nothing of value in the journal... but when I recorded the journal and clicked OK on the customer defaults dialog and then stopped the recording I get what you displayed above (which is exactly what we need!). So lesson learned when recording a journal using Customer Defaults, click Ok on the dialog to get out of customer defaults before stopping the journal.

Thank you for your help!

Re: Turn Off Interpart Expression Warnings Programmatically - NX11

I would be concerned that setting customer defaults in API has the same limitation - you must close/reopen NX for them to take effect.  (before going further, I would test!)

 

Are these available as preferences?

That might be a better option to take, assuming they are available...

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Turn Off Interpart Expression Warnings Programmatically - NX11

Good point Ken.  I think we will try this instead.

New.JPG