Home > Community > Forums > Custom IC SKILL > SKILL to add instance properties

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 SKILL to add instance properties 

Last post Tue, Oct 22 2013 7:06 AM by dmay. 2 replies.
Started by jaleco 21 Oct 2013 05:08 PM. Topic has 2 replies and 2226 views
Page 1 of 1 (3 items)
Sort Posts:
  • Mon, Oct 21 2013 5:08 PM

    • jaleco
    • Top 100 Contributor
    • Joined on Wed, Mar 21 2012
    • Posts 68
    • Points 985
    SKILL to add instance properties Reply

    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):

    {

    cv=geGetEditCellView()

    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.

    • Post Points: 35
  • Tue, Oct 22 2013 5:49 AM

    Re: SKILL to add instance properties Reply

    dbReplaceProp(inst "MY PROPERTY" 'string "whatever")

    See the docs for dbReplaceProp for more details.

    Regards,

    Andrew.

    • Post Points: 5
  • Tue, Oct 22 2013 7:06 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 386
    • Points 7,290
    Re: SKILL to add instance properties Reply

    Here is another command that could help if you want to copy all the properties:

    dbCopyPropList(
    d_dbId1
    d_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.

    OR

    dbCopySingleProp(
    d_srcPropId
    g_dstObjId
     )
         => d_dstPropId

    Copies a single property to a destination object.

    Derek

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by jaleco at 21 Oct 2013 05:08 PM. Topic has 2 replies.