;;; This procedure is called from SCLMouseSingleSelectPt() procedure( SCLSetLSWEntryLayerByShape( selection ) let( ( ( cvId nil ) ( tfId nil ) ( objId nil ) ( lpp nil ) ( proceed t ) ) ;;; If the selection has multiple items, then all object types have to be the same. ;;; This is to get this script to work with wires. A wire is a special type of path. ;;; A wire may consist of multiple segments, which will result in "selection" being ;;; a list of more then 1 item. With the 'setof' part all items NOT equal to the first ;;; item will be listed, thus signaling that not all items are from the same object type. ;;; This works when only one object has been selected too. when( selection if( setof( item selection nequal( item~>objType car( selection )~>objType ) ) then ;;; Different object types have been selected (like rectangles/paths/instances) proceed = nil else foreach( item selection when( proceed cond( ;;; The item must be a shape AND it must have an lpp. ;;; If it doesn't comply to this, no use to proceed... ;;; For instance: an instance does not have an lpp... ( not( and( item~>isShape item~>lpp ) ) proceed = nil ) ;;; It is a valid item (it did not past the first conditional test), ;;; now see if the lpp has already been set: if not, this is the first item, thus set lpp. ( not( lpp ) lpp = item~>lpp ) ;;; It is a valid item, and the lpp has already been set, thus it is not the first item. ;;; Chech whether or not the LPP different, if it is, no need to proceed: which lpp ;;; should be used? ( nequal( lpp item~>lpp ) proceed = nil ) ) ;;; end of cond ) ;;; end of when ) ;;; end of foreach item ) ;;; end of if when( proceed objId = car( selection ) cvId = objId~>cellView tfId = techGetTechFile( cvId ) when( leIsLayerValid( lpp tfId ) unless( leIsLayerVisible( lpp tfId ) leSetLayerVisible( lpp t tfId ) ) ;;; end of unless leSetEntryLayer( lpp tfId ) ) ;;; end of when ) ;;; end of when ) ;;; end of when ) ;;; end of let ) ;;; end of procedure SCLSetLSWEntryLayerByShape