Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

dbGetq, dbGet

dbGetq( d_object St_AttrOrPropName ) 
 => g_value 

dbGet( d_object St_AttrOrPropName ) 
 => g_value 

Description

Retrieves the value of an attribute or a property associated with a database object.

For dbGetq and the ‘‘~>’’ operator, the attribute or property name St_AttrPropName can be specified as either a string or a symbol. For dbGet, this argument can also be specified as a variable because dbGet evaluates its second argument.

The value of an attribute can be a string, an integer, a floating-point number, a symbol, a Boolean value, a relationship, another database object, or a list. The following are examples of list values.

The value of a user-defined property can be a string, an integer, a floating-point number, a file name string, a hierProp, an IL expression string, an IL list, an NLP expression string, a time value, or a Boolean value. Time-valued properties are converted to strings. Boolean values appear as strings with the value TRUE or FALSE rather than t or nil. In this way, you can distinguish between existence and nil (FALSE) or undefined.

dbGet, dbGetq, and the ~> operator can be used with SKILL control statements to sequence over each value of an object’s attribute that contains a list, as illustrated below:

foreach( shape cellview~>shapes 
; process the shape here...
)

Arguments

d_object

dbObject of the object to be queried.

St_AttrOrPropName

The attribute or property name to be retrieved. It can be specified as a SKILL symbol or a string. For dbGet, this can also be a SKILL variable containing a symbol or a string that represents the attribute or property name.

Value Returned

g_value

Value of the attribute or property St_AttrOrPropName of object d_Object.

Examples

Retrieves the value of the shapes attribute associated with a cellview object c by any of the following:

dbGetq(c shapes)         ; Does not evaluate second argument
c~>shapes ; Equivalent to above
c~>"shapes" ; Equivalent to above
dbGet(c ’shapes) ; Evaluates both its arguments
str = ’shapes ; Assigns attribute name
dbGet(c str)   ; "str" is evaluated to shapes

Related Topics

dbGet Functions

Retrieving the List of Attribute Names for a dbObject Using the ~> Operator

Retrieving the List of Attribute Names for a dbObject Using the ~> Operator

The ~> ? operation returns a list of all available attributes for a dbObject. The list of attributes is based on the database object’s type.

d_object ~> ? => l_attributeNames 

The sample below finds the names of all attributes of a property:

<1> cv = dbOpenCellViewByType(nil "inv" "symbol") 
; open a cellview
db:2066752
<2> prop = car(cv~>prop)     ; ; get the first property 
db:2068776
<3> prop~>?              ;; fetch the attribute names 
(cellview objType prop enum name object range value valueType)

Retrieving the List of Attributes or Values for dbObjects Using the ~> Operator

The ~> ?? operation returns a list of all available attributes and their values as a disembodied property list for a dbObject. The list of attributes is based on the database object’s type.

d_object ~> ?? => l_attributeValuePairs 

In the previous example, the property’s attributes and values could be asked by the following:

<4> prop~>??
(db:2068776 cellview db:2066752 objType "prop"
prop nil enum nil name "lastSchematicExtraction"
object db:2066788 range nil
value "May 20 19:41:08 1991" valueType "time")

The following is an example of retrieving attributes of a rowHeader from the cellview.

<1> cv = geGetEditCellView()
<2> cv~> rowHeaders~>??
((db:0x03b02412 cellView db:0x03b0001d objType "rowHeader"
prop nil siteDef db:0x03b02514 siteDefName
"CORE" siteDefWidth 0.51 siteDefHeight 4.59
bBox
((0.0 0.0)
(8.67 4.59)
) rows
(db:0x03b01912)
)
)

The following is an example of retrieving attributes for a pathSeg.

<1> pathSeg = geGetSelectedSet()
(db:0x03b01a1f)
<2> pathSeg~>??
((db:0x03b01a1f cellView db:0x03b0001d objType "pathSeg"
prop nil bBox
((-9.435 0.665)
(-5.465 0.935)
) children
nil groupMembers nil isAnyInst nil
isShape t matchPoints nil net
nil parent nil pin nil
purpose "drawing" textDisplays nil assocTextDisplays
nil markers nil figGroup nil
layerName "METAL1" layerNum 3 lpp
("METAL1" "drawing") connRoutes nil width 0.27
beginExt 0.0 endExt 0.0 beginPt
(-5.6 0.8) endPt
(-9.3 0.8) boundary
((-9.435 0.665)
(-9.435 0.935)
(-5.465 0.935)
(-5.465 0.665)
)
beginStyle "extend" endStyle "extend" topology
"none" isOrthogonal t route nil
)
)

Related Topics

dbGet Functions

Retrieving the List of Attribute Names for a dbObject Using the ~> Operator


Return to top
 ⠀
X