Is there a SKILL function that can be used to add a property to a layout instance?
I am trying to transfer properties attached to specific instances in one db to a duplicate db that is missing them.
I can locate instances in the source db with the property to be transferred - (something like this except it will ultimately operate on a library):
StPropInstList = setof( inst cv~>instances car(inst~>prop~>name) == "MY PROPERTY")
...but in my destination db, I cannot find SKILL code to perform the equivalent of - for each instance, opening the Edit Properties form (leHiEditProp()) and manually adding a new property and defining its name and value. It seemed that a new property could be assigned using myinst~>prop~>name = "My PROPERTY", but this does not work.
dbReplaceProp(inst "MY PROPERTY" 'string "whatever")
See the docs for dbReplaceProp for more details.
Here is another command that could help if you want to copy all the properties:
dbCopyPropList( d_dbId1d_dbId2 ) => t | nil
Copies all the properties from the database object given in the first argument to the database object given in the second argument in a single, atomic, copy operation. Properties with the same name in the destination object are overwritten. If the given database objects are pcell instances, then pcell evaluation happens exactly once after all the properties are copied.
dbCopySingleProp( d_srcPropId g_dstObjId ) => d_dstPropId
Copies a single property to a destination object.