Home > Community > Forums > Custom IC SKILL > naming of dummy instances

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

 naming of dummy instances 

Last post Wed, Mar 20 2013 11:30 AM by Malcolmw. 2 replies.
Started by Malcolmw 18 Mar 2013 12:22 PM. Topic has 2 replies and 634 views
Page 1 of 1 (3 items)
Sort Posts:
  • Mon, Mar 18 2013 12:22 PM

    • Malcolmw
    • Not Ranked
    • Joined on Tue, Nov 8 2011
    • Richardson, TX
    • Posts 3
    • Points 45
    naming of dummy instances Reply

    Greetings Forum, 1st time poster :

    I have been using this code to rename my dummy instances which works fine the first time I use this but subsequent runs report that "DUMMY0" already exists.  How to modify this to remember where it left off last time?

    One idea I had was parsing the current cellview with 

    zz=geGetEditCellView()

    then: parsing that list with  zz~>instances~>names to find "DUMMY(x)" and then start at last x+1 value.

     procedure( nameDummyInst()
       let((cv cnt instList)
         cv=geGetWindowCellView()
         instList=selectedSet()
         labelLayer = list("text" "drawing")
         cnt = 0; initialize CNT

         foreach(inst instList
            temp1=pcExprToString( cnt )
            newInstName=strcat( "DUMMY",temp1 )
            inst~>baseName=newInstName
            cnt++;
            ) ;foreach
          ) ;let
    ) ;procedure

    Thanks in advance

    Malcolm

    Filed under: ,
    • Post Points: 20
  • Tue, Mar 19 2013 3:54 PM

    • marcelpreda
    • Top 150 Contributor
    • Joined on Tue, Jan 19 2010
    • Bucharest, Romania
    • Posts 44
    • Points 715
    Re: naming of dummy instances Reply

     Hi Malcom,

    I guess that you can use dbFindAnyInstByName(cv instName)

    If the instance name already exists, then try next name.

    something like:

    foreach(inst instList
            newInstName=strcat("DUMMY" pcExprToString(cnt++))
            while( dbFindAnyInstByName(cv newInstName)
                     newInstName=strcat("DUMMY" pcExprToString(cnt++))
             );; while
            inst~>baseName=newInstName      

    ) ;foreach

     

    BR,

    Marcel

     

    • Post Points: 20
  • Wed, Mar 20 2013 11:30 AM

    • Malcolmw
    • Not Ranked
    • Joined on Tue, Nov 8 2011
    • Richardson, TX
    • Posts 3
    • Points 45
    Re: naming of dummy instances Reply

     Greetings Marcel - thank you very much for your help.  I tested the new code and works wonderfully.

    Regards,

    Malcolm

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by Malcolmw at 18 Mar 2013 12:22 PM. Topic has 2 replies.