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?
Hi naavikaIt 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 regardsQuek
In reply to Quek:
Thanks for the reply Quek!
In reply to naavika:
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.