淘宝官方店     推荐课程     在线工具     联系方式     关于我们  
 
 

微波射频仿真设计   Ansoft Designer 中文培训教程   |   HFSS视频培训教程套装

 

Agilent ADS 视频培训教程   |   CST微波工作室视频教程   |   AWR Microwave Office

          首页 >> Ansoft Designer >> Ansoft Designer在线帮助文档


Ansoft Designer / Ansys Designer 在线帮助文档:


Script Guide >
Property Script Commands >
   ChangeProperty       


ChangeProperty

Use:                   Changes to properties are scripted using the ChangeProperty command. This command can be executed by the oEditor to change editor properties, by the oDesign to change design level properties, and by the oProject to change project level properties. The command can be used to create, edit, and/or remove properties. In Designer, only Variable and Separator properties can be deleted.

Command:         None

Syntax:              ChangeProperty Array(“Name:AllTabs”, <PropTabArray>, <PropTabArray>, ...)

Return Value:    None

Parameters:      <PropTabArray>

                           Array(“Name:<PropTab>”,

                           <PropServersArray>,

                           <NewPropsArray>,

                           <ChangedPropsArray>,

                           <DeletedPropsArray>)

          

                          <PropServersArray>

                           Array(“Name:PropServers”, <PropServer>,

                          <PropServer>, ...)

                           

                          <NewPropsArray>

                           Array(“Name:NewProps”, <PropDataArray>,

                          <PropDataArray>,...)

                           

                          <ChangedPropsArray>

                          Array(“Name:ChangedProps”,<PropDataArray>,

                          <PropDataArray>, ...)

                           

                          <DeletedPropsArray>

                           Array(“Name:DeletedProps”, <PropName>,

                          <PropName>, ...)

                          OR (for PropDisplay deletions only)

                          Array("Name:DeletedProps",<PropDataArray>,

                          <PropDataArray>, ...)

                           

                           

                          <PropDataArray>

                          Array("NAME:<PropName>",

                           “PropType:=”, <PropType>,

                           “NewName:=”, <string>,

                           “Description:=”, <string>,

                           “Callback:=”, <string>,

                          “NewRowPosition:=”, <int>,

                           “ReadOnly:=”, <bool>,

                           “Hidden:=”, <bool>,

                           <PropTypeSpecificArgs>)OR (for PropDisplays only)

                          Array("Name:<PropName>",<PropDisplayData>)

                           

                          <PropDisplayData>

                           for adding, changing, deleting PropDisplays

                           <PropDisplayAttributes>

                           for changing PropDisplays only

                           <PropDisplayNewAttributes>

                           

                          <PropDisplayAttributes>

                          Layer & Location only used for PropDisplays in layout

                           

                          For adding PropDisplays, this will add a single PropDisplay with attributes as shown; if an attribute is missing, a default value will be assigned. Adding PropDisplay to schematic with attributes that are identical to one already existing there will fail without an error message.

                          For deleting PropDisplays, these attributes are used to identify an existing PropDisplay to delete. If there doesn't exist a PropDisplay that matches the given attributes, then nothing will be deleted. If multiple PropDisplays match the given attributes, then all of them will be deleted. If an attribute is missing, then all PropDisplays match that missing attribute. For example, if Layer is missing, then PropDisplays on all layers that match the remaining given attributes will be deleted.

                          For changing PropDisplays, these attributes are used to identify an existing PropDisplay to change. If no PropDisplay matching the attributes is found, no changes will be made. If multiple PropDisplays match the attributes, all of them will be changed. If an attribute is missing, it matches all PropDisplays. For example, to change the format of PropDisplays that are on the bottom, but have any layer, style or format to show the name only, this command should have Location set to "Bottom" and all other attributes omitted.

 

                           "Format:=", <PropDisplayType>,

                           "Location:=", <PropDisplayLocation>,

                           "Layer:=", <string>,

                           "Style:=", <string>

                           

                          <PropDisplayNewAttributes>

                           

                          NewLayer & NewLocation only used for PropDisplays in layout

                          For changing PropDisplays, these attributes are used to identify which attributes to change and what the new value is. If the attribute should not be changed, the corresponding entry should be omitted.

 

                           "NewName:=", <string>,

                           "NewFormat:=", <PropDisplayType>,

                           "NewLocation:=", <PropDisplayLocation>,

                           "NewLayer:=", <string>,

                           "NewStyle:=", <string>

                           

                          <PropDisplayType>

                           Type: string

                          Identifies the format of PropDisplay.

                          "Name"

                          "Value"

                          "NameAndValue"

                          "EvaluatedValue"

                          "NameAndEvaluatedValue"

                           

                          <PropDisplayLocation>

                           Type: string

                          Identifies where PropDisplay is located with respect to object

 

                          "Left"

                          "Top"

                          "Right"

                          "Bottom"

                          "Custom"

          

                          <PropType>

                           Type: string

                          Identifies the type of property when a new property is added. In Designer, only separator properties and variable properties can be added.

 

                          "SeparatorProp"

                          "VariableProp"

                          "TextProp”

                          "NumberProp"

                          "ValueProp"

                          "CheckboxProp"

                          "MenuProp”

                          "PointProp"

                          "VPointProp"

                          "ButtonProp"

                           

                          NewName

                          Specify the new name of a property if the property’s name is being edited. In Designer, the name can only be changed for separators and variables.

                           

                          Description

                          Specify a description of the property. In Designer, the description can only be changed for separators and variables.

                           

                          Callback

                          Specify the name of the script callback to be run when the property value is changed.

                           

                          NewRowPosition

                          Used to reorder rows in the Property dialog box. In Designer, this only applies to the Project>Project Variables panel and the Designer>Design Properties panel. Specify the new zero-based row index of the variable or separator.

                           

                          ReadOnly

                          Used to mark a property as “read only” so it can not be modified. In Designer, this flag can only be set for variables and separators.

                           

                          Hidden

                          Used to hide a property so it can not be viewed outside of the Property dialog box. In Designer, this flag can only be set for variables and separators.

                           

                          <PropTypeSpecificArgs>

                          SeparatorProp: no arguments

                          TextProp: “Value:=”, <string>

                          NumberProp: “Value:=”, <double>

                          ValueProp: “Value:=”, <value>

                          CheckboxProp: “Value:=”, <bool>

                          MenuProp: “Value:=”, <string>

                          PointProp “X:=", <double>, "Y:=", <double>

                          VPointProp: "X:=", <value>, "Y:=", <value>

                          Material Button: “Material:=”, <string>

                          Color Button: "R:=",<int>,"G:=",<int>,"B:=",<int>

                          Transparency Button: “Value:=”, <double>

                           

                          <PropTypeSpecificArgs> for MenuProps

                          Syntax for NewProps array: "AllChoices:=",

                          <"choice1,choice2,..."> or <Array("choice1" "choice2", ... )>,

                          "Value:=", <string>

                           Syntax for ChangedProps array: "Value:=", <string>

                           

                           

                          <PropTypeSpecificArgs> for VariableProps

                          Syntax:

                          “Value:=”, <value>, <OptimizationFlagsArray>,

                          <TuningFlagsArray>, <SensitivityFlagsArray>,

                          <StatisticsFlagsArray>

                           

                          Parameters:

                          <OptimizationFlagsArray>

                          Array("NAME:Optimization",

                          "Included:=", <bool>,

                          "Min:=", <value>,

                          "Max:=", <value>)

                          

                          <TuningFlagsArray>

                          Array("NAME:Tuning",

                          "Included:=", <bool>,

                          "Step:=", <value>,

                          "Min:=", <value>,

                          "Max:=", <value>)

                           

                          <SensitivityFlagsArray>

                          Array("NAME:Sensitivity",

                          "Included:=", <bool>,

                          "Min:=", <value>,

                          "Max:=", <value>,

                          "IDisp:=", <value> )

                           

                          <StatisticsFlagsArray>

                          Array(“NAME:Statistical”,

                          “Included:=”, <bool>,

                          “Dist:=”, <Distribution>,

                          “StdD:=”, <value>,

                          “Min:=”, <value>,

                          “Max:=”, <value>,

                          “Tol:=”, <string>)

                           

                           <Distribution>

                           Type: string

                           Value should be “Gaussian” or “Uniform”

                           

                           StdD

                          Standard deviation.

                           

                           Min

                           Low cut-off for the distribution.

                           

                           Max

                           High cut-off for the distribution.

                           

                           Tol

                           Tolerance for uniform distributions. Format is “<int>%”.

                          Example: “20%”.

                           

Example:           Adding a new project level variable “$width”:

                          oProject.ChangeProperty Array("NAME:AllTabs",_

                          Array("NAME:ProjectVariableTab",_

                          Array("NAME:PropServers", "ProjectVariables"),_

                          Array("NAME:NewProps",_

                          Array("NAME:$width",_

                          "PropType:=", "VariableProp",_

                          "Value:=", "3mm",_

                          “Description:=”, “my new variable”))))

                           

Example:           Deleting the design level variable “height”:

                          oDesign.ChangeProperty Array("NAME:AllTabs",_

                          Array("NAME:LocalVariableTab",_

                          Array("NAME:PropServers", "DefinitionParameters"),_

                          Array(“NAME:DeletedProps", "height"))

                           

Example:           Changing a property’s value. If the following command were executed, then the value of the property “XSize” of the PropServer “Box1:CreateBox:1” on the “Geometry3DCmdTab” tab would be changed. (oEditor is the Geometry3D editor in Designer.)

                          oEditor.ChangeProperty Array("NAME:AllTabs",_

                          Array("NAME:Geometry3DCmdTab",_

                          Array("NAME:PropServers","Box1:CreateBox:1"),_

                          Array("NAME:ChangedProps",_

                          Array("NAME:XSize", "Value:=", "1.4mil"))))

                           

Example:           Changing a property’s value. If the following command were executed, then the values of Callback and L on the PassedParameterTab would be changed.

                           

                          oEditor.ChangeProperty Array("NAME:AllTabs", _

                          Array("NAME:PassedParameterTab", _

                          Array("NAME:PropServers", "CHOKE2"), _

                          Array("NAME:ChangedProps", _

                          Array("NAME:L", "Callback:=", "ac", "OverridingDef:=", true), _

                          Array("NAME:L", "Value:=", "1nH"))))

                           

Example:           Changing the Company Name, Design Name, the background color, and the Axis scaling in a Report.

                           

                          Set oProject = oDesktop.SetActiveProject("wgcombiner")

                          Set oDesign = oProject.SetActiveDesign("DesignerDesign2")

                          Set oModule = oDesign.GetModule("ReportSetup")

                          oModule.ChangeProperty Array("NAME:AllTabs", Array("NAME:Header", _ Array("NAME:PropServers", "XY Plot1:Header"), _

                          Array("NAME:ChangedProps", Array("NAME:Company Name", _

                          "Value:=", "My Company"))))

                          oModule.ChangeProperty Array("NAME:AllTabs", Array("NAME:Header",_ Array("NAME:PropServers", "XY Plot1:Header"), _

                          Array("NAME:ChangedProps", Array("NAME:Design Name", _

                          "Value:=", "WG Combiner"))))

                          oModule.ChangeProperty Array("NAME:AllTabs", Array("NAME:General",_ Array("NAME:PropServers", "XY Plot1:General"), _

                          Array("NAME:ChangedProps", Array("NAME:Back Color", _

                          "R:=", 128, "G:=", 255, "B:=", 255))))

                          oModule.ChangeProperty Array("NAME:AllTabs", Array("NAME:Axis", _ Array("NAME:PropServers", "XY Plot1:AxisX"), _

                          Array("NAME:ChangedProps", Array("NAME:Axis Scaling", _

                          "Value:=", "Log"))))

                           

Example:           Changing a property’s value. Note that the AllChoices parameter is only used when the MenuProp is being added. Also note that either a string of choices separated by commas or an Array("choice1", "choice2", "choice3") works for the AllChoices parameter.

                           

                          Set oEditor = oDesign.SetActiveEditor("SchematicEditor")

                          oEditor.ChangeProperty Array("NAME:AllTabs", Array("NAME:PassedParameterTab", Array("NAME:PropServers", _

                           "CompInst@CAP_;2"), Array("NAME:NewProps", Array("NAME:xxxx", "PropType:=", _

                           "MenuProp", "AllChoices:=", Array("aa", "bb", "cc", "dd"), "Value:=", "bb"))))

                           

                           




HFSS视频教学培训教程 ADS2011视频培训教程 CST微波工作室教程 Ansoft Designer 教程

                HFSS视频教程                                      ADS视频教程                               CST视频教程                           Ansoft Designer 中文教程


 

      Copyright © 2006 - 2013   微波EDA网, All Rights Reserved    业务联系:mweda@163.com