Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Manipulating objects

addproperty

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

The script command adds a property to a compound or to a scripted element.

 

Supported Product: INTERCONNECT

 

Syntax

Description

addproperty(name,property=”new_property”,category=””,type=”Number”,from=0,to=0,kind=”FixedUnit”,unit=””)

Adds a new property named ‘property’ to a compound element or to a scripted element named ‘name’. Category defines the folder when the property will be stored in the properties view window. “string”, “logical” and “number” are valid values for the parameter “type”. The parameter range is defined by parameters ‘from’ and ‘to’. Parameter ‘kind’ is typically set to ‘FixedUnit’, other valid values are ‘Power’, ‘Frequency’, etc. Parameter ‘unit’ is the unit of the new property.

 

Example

Add property “new_property” to an existing compound element ‘COMPOUND_1’

addproperty("COMPOUND_1");

Add property “width” to an existing compound element ‘COMPOUND_1’

addproperty("COMPOUND_1","width");

Add property “gain” to an existing compound element ‘COMPOUND_1’, place it on category ‘Standard’

addproperty("COMPOUND_1","gain","Standard");

Add “temperature” property to an existing compound element ‘COMPOUND_1’, place it on ‘Thermal’ category, set its type, range and unit.

addproperty("COMPOUND_1","temperature","Thermal","Number",0,100,"Temperature","C");

 

See Also

Manipulating objects, autoarrange, setexpression, createcompound

Copyright Lumerical Inc. | Privacy | Site Map