Selection Functions
Selection functions let you specify schematic data in a type-in field. You give the designer the option of clicking on an item in the schematic window and having the information for that option automatically fill in the field. Typically, selection functions are used as callbacks in code that creates form fields and options.
The following example shows how you might use one of the selection functions as part of some code that creates a net1 button with an associated type-in field.
hiCreateStringField( ?name 'net1 ?prompt "Net Name" ?value "" ) hiCreateButton( ?name 'netSelect1 ?buttonText "Select" ?callback "asiSelectNet(’net1 ?prompt \"Select net1\")"
)
When the designer clicks on the button, the asiSelectNet function displays the "Select net1" prompt on the schematic window. The designer can click a net in the schematic window to automatically fill in the type-in field.
The next example shows how you might use one of the analysis-specific selection functions as part of some code that creates an outVsrc button with an associated type-in field. (This example does not show all the code for adding a noise analysis—it only shows how you might use the asiSelectAnalysisSource function.)
asiAddAnalysis( tool ?name 'noise ?prompt "Noise" asiCreateAnalysisField(
?name 'outVsrc
?prompt "Output Voltage Source"
)
asiCreateAnalysisField(
?name 'selectOutVsrc
?prompt "Select"
?type ’button
?callback "asiSelectAnalysisSource( 'noise
'outVsrc \"Select output voltage
source ...\" )"
)
)
When the designer clicks on the Select button, the asiSelectAnalysisSource function displays the "Select output voltage source" prompt on the schematic window. The designer can click a source in the schematic window to automatically fill in the type-in field.
Typically, the functions in this section are for integrators.
This topic lists the following SKILL functions that let designers set up forms.
Related Topics
Return to top