next up previous contents index
Next: Resistance/Inductance Extraction Up: Extraction Functions Previous: Physical Subcircuits   Contents   Index

Electrical Devices

(stringlist_handle) ListElecDevs(regex)
This function returns a handle to a list of strings containing device names from the electrical database. The names correspond to devices used in the current circuit. The argument is a regular expression used to filter the device names. If the argument is null or empty, all devices are listed. This function returns 0 on error.

(int) SetEdevProperty(devname, prpty, string)
This function is used to set property values of electrical devices and mutual inductors. It is equivalent to the Set command, or the keyboard !set command, with the devname.prpty syntax. The first argument is the name of a device in the current circuit. This is the value of a name property for some device. The second argument is a string giving the property type to set or modify. The possible strings are prefixes of ``name'', ``model'', ``value'', ``param'', ``other'', and ``nophys''. The single character string "n" implies name, and (additionally) "y" implies nophys. If the string is unrecognized, the property type defaults to other. If the device is a mutual inductor, only the name and value properties can be applied. The final argument is a string containing the body of the property. If the string is null or empty, the property is removed (or reset to the default in the case of the name property). The function returns 1 on success, 0 otherwise.

(string) GetEdevProperty(devname, prpty)
This function returns a string containing the text of the specified property for the given device. The two arguments have the same format and interpretation as the first two arguments of SetEdevProperty, i.e., the device name and property name. The return value is a string containing the text for that property. If the device or property does not exist or some other error occurs, a null string is returned.

(object_handle) GetEdevObj(devname)
This function returns a handle to the electrical subcell from the device library corresponding to the given device name. If an error occurs, 0 is returned.


next up previous contents index
Next: Resistance/Inductance Extraction Up: Extraction Functions Previous: Physical Subcircuits   Contents   Index
Stephen R. Whiteley 2024-09-29