next up previous contents index
Next: Computational Geometry and Layer Up: Geometry Editing Functions 2 Previous: Other Object Management Functions   Contents   Index

Property Management

The functions described in this section provide an interface for working with properties.

When specifying the property ``number'' for electrical mode properties, either a number or string equivalent can be used. The string equivalent is a prefix of one of the supported property names. In addition, some of the properties have a letter that any word that starts with the letter will indicate that property. The idea was that each property could be keyed by a single letter, and this is almost still true (node is the exception).

The following table identifies the recognized strings. Not all of these properties apply in all functions. The listed order is the order of testing, the first match yields the equivalence.

Number Name String
1 model prefix
2 value prefix
3 param prefix
3 initc prefix
4 other prefix
11 name prefix
5 nophys prefix or starts with `y' or `Y'
6 virtual prefix or starts with `t' ot `T'
7 flatten prefix
8 range prefix
10 node prefix
18 nosymb prefix or starts with `s' or `S'
20 macro prefix or starts with `c' or `C'
21 devref prefix

The initc is an archaic alias for the param property that is still recognized. In some functions, an additonal keyword ``all'' is recognized in a way that has significance to the function. If the string does not match, an error is indicated.

(prpty_handle) PrpHandle(object_handle)
This function returns a handle to the list of properties of the object referenced by the passed object handle. The function fails if the argument is not a valid object handle, use CellPrpHandle to list cell properties.

(prpty_handle) GetPrpHandle(number)
Since there can be arbitrarily many properties defined with the same number, a generator function is used to read properties one at a time. This function returns a handle to a list of the properties that match the number passed. This applies to the first object in the selection queue (the most recent object selected). The returned value is used by other functions to actually retrieve the property text.

If the number argument is a prefix of ``all'', then any property string will be returned. In physical mode, the number argument should otherwise be an integer. In electrical mode, the number argument can have string form as described in the introduction to this section.

(prpty_handle) CellPrpHandle()
This function returns a handle to the list of properties of the current cell, applicable to the current display mode in the main window.

(prpty_handle) GetCellPrpHandle(number)
Since there can be arbitrarily many properties defined with the same number, a generator function is used to read properties one at a time. This function returns a handle to a list of the properties that match the number passed, from the current cell. The returned value is used by other functions to actually retrieve the property text.

A prefix of the string ``all'' can be passed for the number argument, in which case the handle will reference all properties of the cell. In physical mode, the number argument should otherwise be an integer. In electrical mode, the number argument can have string form as described in the introduction to this section.

(int) PrpNext(prpty_handle)
This function causes the referenced property of the passed handle to be advanced to the next in the list. If there are no other properties in the list, the handle is closed, and 0 is returned. Otherwise, the handle (same as the argument) is returned. The number of remaining reference objects can be obtained with the HandleContent function.

(int) PrpNumber(prpty_handle)
This function returns the number of the property referenced by the handle.

(string) PrpString(prpty_handle)
This function returns the string of the property referenced by the handle. The ``raw'' string is returned, meaning that if the property comes from an electrical object, all of the detail from the internal property string is returned.

(string) PrptyString(obj_or_prp_handle, number)
The first argument can be a property handle, or an object handle. If a property handle is given, the function returns the string of the first property referenced by the handle that matches the number. If the number argument is a prefix of ``all'', then any property string will be returned. In physical mode, the number argument should otherwise be an integer. In electrical mode, the number argument can be a string, as described in the introduction to this section. The handle is set to reference the next property in the reference list, following the one returned. When there are no more properties, this function returns a null string.

If the first argument is an object handle, the function returns the strings from properties or pseudo-properties for the object referenced by the handle.

In physical mode, the function will locate a property with the given number, and return its string. If no property is found with that number, and a pseudo-property for the object matches the number, then the pseudo-property string is returned. If no matching pseudo-property is found, a null string is returned. Note: objects can be modified through setting pseudo-properties using the PrptyAdd function.

In electrical mode, the number argument can be a string, as described in the introduction to this section. In the case of an object handle, the ``all'' keyword is not supported.

The function will fail if the argument is not a valid object or property handle. Use
GetCellPropertyString to obtain strings from cell properties.

If the requested property is a name property of an electrical device or subcircuit, only the name is returned (the internal property string is more complex). Otherwise the ``raw'' string is returned.

(string) GetPropertyString(number)
This function searches the selection queue for an object with a property matching number. The string for the first such property found is returned. A null string is returned if no matching property was found.

(string) GetCellPropertyString(number)
This function searches the properties of the current cell, and returns the string for the first property found that matches number. If no match, a null string is returned.

(int) PrptyAdd(object_handle, number, string)
This function will create a new property using the number and string provided, on the object referenced by the handle. The object must be defined in the current cell. The function will fail if the handle is invalid. Use CellPropertyAdd to add properties to the current cell.

In physical mode, the property number can take any non-negative value. This includes property numbers that are used by Xic for various purposes in the range 7000-7199. Unless the user is expecting the Xic interpretation of the property number, these numbers should be avoided. It is the caller's responsibility to ensure that the properties in this range are applied to the appropriate objects, in the correct context and with correct syntax, as there is little or no checking. Adding some properties in this range such as flags, flatten, or a pcell property will automatically remove an existing property with the same number, if any.

The pseudo-properties in the range 7200-7299 will have their documented effect when applied, and no property is added (see 10.1.2),

In electrical mode, it is possible to set these properties of device instances:

name, model, value, param, devref, other, range nophys, symblc
and the following properties of subcircuit instances:
name, param, other, flatten, range nophys, symblc.
Attempts to set properties not listed here will silently fail. The object must be defined in the current cell, thus the mode must be electrical.

If the function succeeds, 1 is returned. otherwise 0 is returned.

(int) AddProperty(number, string)
This function adds a property with the given number and string to all selected objects.

In physical mode, the property number can take any non-negative value. This includes property numbers that are used by Xic for various purposes in the range 7000-7199. Unless the user is expecting the Xic interpretation of the property number, these numbers should be avoided. It is the caller's responsibility to ensure that the properties in this range are applied to the appropriate objects, in the correct context and with correct syntax, as there is little or no checking.

The pseudo-properties in the range 7200-7299 will have their documented effect when applied, and no property is added,

In electrical mode, it is possible to set these properties of device instances:

name, model, value, param, devref, other, range nophys, symblc
and the following properties of subcircuit instances:
name, param, other, flatten, range nophys, symblc.
Attempts to set properties not listed here will silently fail. The object must be defined in the current cell, thus the mode must be electrical.

The number of properties added plus the number of pseudo-properties applied is returned.

(int) AddCellProperty(number, string)
This function adds a property to the current cell.

In physical mode, the property number can take any non-negative value. This includes property numbers that are used by Xic for various purposes in the range 7000-7199. Unless the user is expecting the Xic interpretation of the property number, these numbers should be avoided. It is the caller's responsibility to ensure that the properties in this range are applied to the appropriate objects, in the correct context and with correct syntax, as there is little or no checking. Adding some properties in this range such as flags, flatten, or a pcell property will automatically remove an existing property with the same number, if any.

Numbers in the pseudo-property range 7200-7299 will do nothing.

In electrical mode, it is possible to set the param, other, virtual, flatten, macro, node, name, and symbolic properties of the current cell. The last three are not ``user settable'' but are needed when building up a new circuit cell in memory, as in the scripts produced by the !mkscript command. The string should have the format as read from a native cell file.

The function returns 1 if the operation was successful, 0 otherwise.

(int) PrptyRemove(object_handle, number, string)
This function will remove properties matching the given number and string from the object referenced by the handle.

In physical mode, the property number can take any non-negative value. This includes property numbers that are used by Xic for various purposes in the range 7000-7199. It is the caller's responsibility to make sure that removal of properties in this range is appropriate. Giving numbers in the pseudo-property range 7200-7299 will do nothing.

If the string is null or empty, only the number is used for comparison, and all properties with that number will be removed. Otherwise, if the string is a prefix of the property string and the numbers match, the property will be removed.

In electrical mode, it is possible to remove these properties of device instances:

name, model, value, param, devref, other, range nophys, symblc
and the following properties of subcircuit instances:
name, param, other, flatten, range nophys, symblc.
Attempts to remove properties not listed here will silently fail. Except for other, the string argument is ignored. For other properties, the string is used as above to identify the property to delete.

Objects must be defined in the current cell. The function returns the number of properties removed.

(int) RemoveProperty(number, string)
This function will remove properties from selected objects.

In physical mode, the property number can take any non-negative value. This includes property numbers that are used by Xic for various purposes in the range 7000-7199. It is the caller's responsibility to make sure that removal of properties in this range is appropriate. Giving numbers in the pseudo-property range 7200-7299 will do nothing.

If the string is null or empty, only the number is used for comparison, and all properties with that number will be removed. Otherwise, if the string is a prefix of the property string and the numbers match, the property will be removed.

In electrical mode, it is possible to remove these properties of device instances:

name, model, value, param, devref, other, range nophys, symblc
and the following properties of subcircuit instances:
name, param, other, flatten, range nophys, symblc.
Attempts to remove properties not listed here will silently fail. Except for other, the string argument is ignored. For other properties, the string is used as above to identify the property to delete.

The number of properties removed is returned.

(int) RemoveCellProperty(number, string)
This function will remove properties from the current cell.

In physical mode, the property number can take any non-negative value. This includes property numbers that are used by Xic for various purposes in the range 7000-7199. It is the caller's responsibility to make sure that removal of properties in this range is appropriate. Giving numbers in the pseudo-property range 7200-7299 will do nothing.

If the string is null or empty, only the number is used for comparison, and all properties with that number will be removed. Otherwise, if the string is a prefix of the property string and the numbers match, the property will be removed.

In electrical mode, it is possible to remove the param, other, virtual, flatten, and macro properties of the current cell. Except for other, the string argument is ignored. For other properties, the string is used as above to identify the property to delete.

The function returns the number of properties removed.


next up previous contents index
Next: Computational Geometry and Layer Up: Geometry Editing Functions 2 Previous: Other Object Management Functions   Contents   Index
Stephen R. Whiteley 2024-09-29