
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am writing a Python script to populate the UI User Parameter table from within the script - code snippet attached.
I have been able to set the length units (cm) and no units options within the User Parameter table without issues (as indicated in the attached screen grab). I cannot find an API method that sets the angular units in the 'units' drop-down menu. My code is using Radial (R theta) values for vectors. There is a 'defaultLengthUnits' option that provides units for length values, but there is no similar method for setting the 'defaultAngleUnits' .... hope this makes sense...
To prove the code I have used the '' separator to set the angle field to no units, which has validated that the User Parameter table is being populated with the correct Text and values.
The question is what is the method that will produce the required default angular units selection in the Parameter table?
Thanking you in advance - Paul
### Parameter Table Population Code snippet ####
#create user parameters
cm = design.unitsManager.defaultLengthUnits
createParam(design, 'radius', '5cm', cm, '')
createParam(design, 'Cone_Dist', '6cm', cm, '')
createParam(design, 'Cone_Angle', '0.25', '', '')
### Parameter Table Results ###
Solved! Go to Solution.