The following code should do what you want:
/* abWhichView.il
Author A.D.Beckett
Group Custom IC (UK), Cadence Design Systems Ltd.
Language SKILL
Date Oct 03, 2005
Modified
By
Function which can be used as a label on a symbol, to say
which view is being used in a config.
Create an ILLabel, with value "abWhichView()"
***************************************************
SCCS Info: @(#) abWhichView.il 10/03/05.15:07:34 1.1
*/
/*******************************************************************
* *
* (abWhichView [instId] [wid]) *
* *
* Returns the name of the view bound in the config, or nil *
* if there is no config. instId defaults to ilInst - the currently *
* drawn instrane, and wid defaults to the current window. *
* *
*******************************************************************/
(procedure (abWhichView @optional (instId ilInst) (wid (hiGetCurrentWindow)))
(let (pathVector bindInfo)
(setq pathVector (deGetVector wid))
(when pathVector
(setq bindInfo
(hdbBind
pathVector
(dbGetq instId libName)
(dbGetq instId cellName)
(dbGetq instId viewName)
(dbGetq instId name)
nil nil nil
))
;-----------------------------------------------------------
; The third entry in the list is the view used
;-----------------------------------------------------------
(caddr bindInfo)
) ; when
) ; let
) ; procedure
Regards,
Andrew.
Originally posted in cdnusers.org by adbeckett