Home > Community > Forums > Custom IC SKILL > Descending into an instance

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

 Descending into an instance 

Last post Thu, Mar 29 2012 10:44 PM by Andrew Beckett. 3 replies.
Started by naavika 13 Mar 2012 02:38 AM. Topic has 3 replies and 2990 views
Page 1 of 1 (4 items)
Sort Posts:
  • Tue, Mar 13 2012 2:38 AM

    • naavika
    • Not Ranked
    • Joined on Mon, Mar 12 2012
    • Hubli, Karnataka
    • Posts 4
    • Points 65
    Descending into an instance Reply

    I am using geSwitch() to descend into an instnce as:

    dvid=dbGetInstanceByName(geGetEditCellView() "Instance_name");
    geSwitch(hiGetCurrentWindow() "r" dvid 0 1 1 ); descend into the instance of which the id is given by previous command 

    This doesn't take care of the config views.

    For example, if the "instnce_name" is made as symbol in config (which is opened in read mode),

    the above command will just escends into the instance_name taking the instance as schematic and not symbol.

    Can anyone please let me know how to take care of the view set by the config? and if instance_name is symbol, then how to give a popup saying that "This is out of context" and not descend into schematic view?

    • Post Points: 20
  • Mon, Mar 26 2012 8:04 PM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,051
    • Points 15,990
    Re: Descending into an instance Reply

    Hi naavika

    It is not possible for geSwitch to make use of the information in a config view. How about using dbGetAnyInstSwitchMaster? Please refer to $CDSHOME/doc/skdfref/skdfref.pdf.


    Best regards
    Quek
     

    • Post Points: 20
  • Mon, Mar 26 2012 9:20 PM

    • naavika
    • Not Ranked
    • Joined on Mon, Mar 12 2012
    • Hubli, Karnataka
    • Posts 4
    • Points 65
    Re: Descending into an instance Reply

     Thanks for the reply Quek!

    This helps.

    • Post Points: 20
  • Thu, Mar 29 2012 10:44 PM

    Re: Descending into an instance Reply

    You could use this approach:

    win=hiGetCurrentWindow()
    cv=geGetEditCellView()
    inst=car(geGetSelSet())
    pathVector=deGetVector(win)
    if(pathVector then
       bindInfo=hdbBind(pathVector inst~>libName inst~>cellName inst~>viewName inst~>name nil nil nil)
       viewList=caddr(bindInfo)
    else
       viewList=win~>viewNameList
    )
    dePush(list(nil 'instanceName inst~>name 'viewNameList viewList) win)

    In other words, use dePush - and use hdbBind to find out the config binding. The above will work if there's no config too - it uses the viewNameList as defined in the Editor options.

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by naavika at 13 Mar 2012 02:38 AM. Topic has 3 replies.