dbResetPropList
dbResetPropList(d_object l_props) =>t/nil
Description
Resets a list of properties on a given object with the specified list of properties.
The function works in the following ways in different scenarios:
- The values of already existing properties specified in the property list are updated with the new values.
- New properties in the specified property list are created on the object.
- The properties that already exist on the object, but are not specified in the property list, are deleted.
- If the specified property list is empty, all the existing properties on the object are deleted.
Arguments
|
Database ID of the object whose properties are being replaced. |
|
Value Returned
|
List of properties on a given object are reset with the specified list of properties. |
|
Examples
lib = ddCreateLib("lib")
; Create Pcell Master
pcellM = dbOpenCellViewByType("lib" "pcellM" "layout" "maskLayout" "w")
; Create top cellview
top = dbOpenCellViewByType("lib" "top" "layout" "maskLayout" "w")
; Define pcell function
pcDefinePCell(
(list (ddGetObj "lib") "pcellM" "layout")
((w float 1)
(l float 1)
(h float 1)
(b float 1)
(k float 1))
warn("INFO 1\n")
)
; Create instance I1 with 3 parameters
i1 = dbCreateParamInst(top pcellM "I1" list(0 0) "R0" 1 '(("l" "float" 2) ("h" "float" 3) ("b" "float" 4)))
; Create properties on I1 that are not Pcell parameters
dbCreateProp(i1 "prop1" "int" 1)
dbCreateProp(i1 "prop2" "string" "prop2")
; Reset the properties
dbResetPropList(i1 '(("prop2" "string" "newProp2") ("prop3" "int" 10) ("l" "float" 4)))
;Examine the results
mapcar(lambda((p) printf("%s %s %L\n" p~>name p~>valueType p~>value)) i1~>prop)
; The result will be:
; prop3 int 10
; prop2 string "newProp2"
; l float 4.0
; (t t t)
Related Topics
Property Creation and Modification Functions
Return to top