Showing results for 
Search instead for 
Did you mean: 

Set Reference Option "With no check option

Former Member
0 Kudos

I need to set all references "check option" to "with no check option"  within a PDM file.  Does anyone have a VB Script to perform this task?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

The only option I find in the PDM metamodel is the 'Check on Commit', which appears to be specific to SQLAnywhere.

Which DBMS are you referring to?

Regardless, you do not need a script. To change all occurrences, all you need to do is use the 'Model/References' object list and add the attribute to the list using the 'Customize Columns and Filter' button.  Once saved, you will find the attribute listed as an attribute in the references in the list.  Select all rows and then just change the setting of the attribute you want.  The same attribute for all references will now be changed.  Select the OK or Apply buttons to save the change.


0 Kudos

The user has created case with SAP.

DBMS is Teradata.

This is the solution:

set model=activemodel

set references=model.references

for each r in references

    r.setExtendedAttribute "CheckOption", "with no check option"


Active Contributor
0 Kudos

Perhaps the best way to implement this is to use Philip's script as the Autofix in a custom Model Check.

The model check would report an error or warning if obj.GetExtendedAttribute("CheckOption") is not "with no check option"; the autofix code would be obj.SetExtendedAttribute("CheckOption","with no check option").

Answers (0)