This is a simple script that will convert CAD Properties to ODB++ Attributes.
The script should be placed in the path %VALOR_DIR%\sys\scripts.
It can be executed by doing the following, after starting Valor NPI:
1) Open the ODB++ database and the Step that is to be modified.
2) Access File->Script->Run from the Graphic Station main menu.
3) Navigate to the script (named "comp_atr_from_prop.txt" unless changed by the user), as shown below.
4) You may then press Ok or Apply to execute the script.
The script contents is as follows:
# The component side to act on: top, bottom, both
set CSIDE = both
# The component type or package type attribute to
# setany existing component attribute.
# Any other existing attribute could be used here.
set SATTR = .comp_type2
#set SATTR = .package_type
# The cad property to extract the value from.
# Any property carried over from the cad design data
# can be used here.
set CPROP = USER_SET_AS_DESIRED
# The index of the property if it is an array or
# 0 for a text property. Index starts at 1 if an array.
set CPROPIDX = 0
# The numeric mode of the value if not text: inch, mm, mil, micron
set CPROPUNITS = inch
# Overwrite any existing attribute values: yes, no
set OVERWRITE = yes
# Attribute only selected components: yes, no
set SELECTED = no
NOTE: There is also an alternative version of the script, named "comp_atr_from_prop_array.txt", which stores the parameter
settings in an array that is much easier to propagate if you wish to convert more than one property with the same script.