- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
HFSS15: IMenuProperty Abstract class
Base class:
abstract class IProperty
Attributes:
MenuSelection (int): This represents the index into the MenuChoices list.
SelectedMenuChoice (string): This is the item in the MenuChoices list corresponding to the MenuSelection index
MenuChoices (IList<string>)
Constructor:
IMenuProperty (string name)
Example:
# adding data to IPropertyList propList; used in Compute function
prop = propList.AddNumberProperty('Offset 1', '0')
prop.Description = 'Trace 1 Offset'
prop = propList.AddNumberProperty(“TRATE”, "800 MHz")
prop.Description = "Frequency"
prop = propList.AddTextProperty(“Text”, “The Text”)
prop.Description = "Text Property"
prop = propList.AddMenuProperty('Operation', ['Add', 'Subtract', 'Max' ,'Min','Mean'])
prop.Description = 'Operation menu’
# reading data from IPropertyList propList; used in Validate function
numOfNumberProperties = 0
if propList != None and propList.AllProperties != None:
for prop in propList.AllProperties:
if prop.PropType == Constants.EPropType.PT_NUMBER:
numOfNumberProperties ++