create_parm()

Creates a parameter definition for a component. Returns a component parameter. The return value is used by create_item().

See also: Form Sets.

Syntax:

create_parm(name, label, attrib, formSet, unitCode, defaultValue[, cbList]);

where

name is a string; name of the parameter.

label is a string; descriptive label for the parameter.

attrib is an integer; an attribute code. Choices for parameters are:

create_parm() Attribute Choices
Attribute Numeric Equivalent Description
PARM_COMPLEX 524288 For complex parameter numeric value, the prompt in the standard component dialog box displays Complex, 1.2+j2.5.
PARM_COMPLEXARRAY 134217728 For complex array parameter numeric value, the prompt in the standard component dialog box displays Array, (1.5,3.6)(2.4,4.7).
PARM_DISCRETE_VALUE 32 For discrete parameter numeric value. Refer to Designing a Discrete Valued Parts Parametric Subnetwork.
PARM_DOE 4096 Allow doe entry page.
PARM_FIX 4194304 For fixed point parameter numeric value, the prompt in the standard component dialog box displays Fixed Point.
PARM_FIXARRAY 33554432 For fixed point array parameter numeric value, the prompt in the standard component dialog box displays Array, 1.25 3.5 ....
PARM_INT 131072 For integer parameter numeric value, the prompt in the standard component dialog box displays Integer.
PARM_INTARRAY 1677216 For integer array parameter numeric value, the prompt in the standard component dialog box displays Array, 1 2 3 ....
PARM_LAYOUT 256 Disable layout-related parameters if layout is not licensed.
PARM_NO_DISPLAY 512 Do not show parameter on schematic by default.
PARM_NOT_EDITED 1 The parameter value is not editable.
PARM_NOT_NETLISTED 64 The parameter should not be netlisted.
PARM_NOT_ON_SCREEN_EDITABLE 32768 The parameter value is not on-screen editable.
PARM_OPTIMIZABLE 1024 Allow optimization entry page.
PARM_PRECISION 8388608 For precision parameter numeric value, the prompt in the standard component dialog box displays Precision, 8.24.
PARM_REAL 65536 For real parameter numeric value, the prompt in the standard component dialog box displays Real.
PARM_REALARRAY 67108864 For real array parameter numeric value, the prompt in the standard component dialog box displays Array, 1.5 3.6 ....
PARM_REPEATED 2 This is a repeated parameter; s[1]=100; s[2]=200;
PARM_RIGHT_HAND_ONLY 128 Do not generate left hand side when netlisting. Can be tested with netlist format %30. Also, when this attribute is set, the onscreen edit can partition the parameter displayed in the annotation into separate fields according to the annotation fmtstring, such as: start=%1s step=%2s.
PARM_STATISTICAL 2048 Allow statistical entry page.
PARM_STRING 262144 For string parameter numeric value, the prompt in the standard component dialog box displays String.
PARM_STRINGARRAY 26843456 For string array parameter numeric value, the prompt in the standard component dialog box displays Array, (str1)(str2).

formSet is the name of the form set used for this value. This is the same as name in the create_form_set() function.

unitCode is the choice for units, where:

  • STRING_UNIT = -2
  • UNITLESS_UNIT = -1
  • FREQUENCY_UNIT = 0
  • RESISTANCE_UNIT = 1
  • CONDUCTANCE_UNIT = 2
  • INDUCTANCE_UNIT = 3
  • CAPACITANCE_UNIT = 4
  • LENGTH_UNIT = 5
  • TIME_UNIT = 6
  • ANGLE_UNIT = 7
  • POWER_UNIT = 8
  • VOLTAGE_UNIT = 9
  • CURRENT_UNIT = 10
  • DISTANCE_UNIT = 11
  • TEMPERATURE_UNIT = 12
  • DB_GAIN_UNIT = 13

defaultValue is optional; a value returned from the prm() function. The prm() function generates an acceptable default value for parameters with different form sets.

cbList is optional; the list of callbacks. For example,
list( dm_create_cb ("...", "..."), ...);. Currently-supported callbacks are:

  • PARM_DEFAULT_VALUE_CB
  • PARM_MODIFIED_CB

Example:

This example creates a parameter C representing capacitance, with attributes, using the StdFileFormSet form set, capacitance as the units and 1.0 pF as the default value. This might then be used by create_item() to create a capacitance with C as its parameter.

create_parm("C", "Capacitance", PARM_OPTIMIZABLE | PARM_STATISTICAL, "StdFileFormSet", CAPACITANCE_UNIT, prm( "StdForm", "1.0 pF"));

Download Example File:

The following link(s) lead to the Agilent EEsof EDA Knowledge center website. You will need to register at this site with a valid support contract to download an example file.

Generate SnP Component

Where Used:

Schematic

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources