
cellId=dbOpenCellViewByType(libname cellname viewname nil "a")

foreach(elem cellId->shapes println(elem->net->name))


3 listes: 
foreach(elem cellId->shapes println(elem->lpp))

("lm" "boundary")
("alcap" "boundary")
("alcap_pin" "drawing")
listkeepoutlm=setof(elem cellId->shapes elem->lpp==list("lm" "boundary"))
listkeepoutalcap=setof(elem cellId->shapes elem->lpp==list("alcap" "boundary"))

listPin=setof(elem cellId->shapes elem->lpp==list("alcap_pin" "drawing"))



foreach(lppElem car(cellId~>instances)~>instHeader~>master~>lpps println(lppElem~>layerName))


listdfPadlm=setof(elem cellId~>shapes elem~>lpp==list("dfPAD_lm" "drawing"))

listpaswb2=setof(elem cellId~>shapes elem~>lpp==list("paswb2" "drawing"))

leLayerAnd(cellId list("dfPAD_lm" "drawing") list("alcap_pin" "drawing") list("txt_lm" "drawing")

leFlattenInst(instId 32 t nil nil)

--------------------------------------------------------
Elem->master->instances~>?? ;;; toute les instances dans une cellule

foreach(lem  Elem->master->instances  lem~>cellName  == "pad" 
print("un objet"))


--------------------------------------------------------
formId=hiGetCurrentForm()
fileName=get(get(formId 'stringPin) 'value)
layerList=formId->hiLayerField->value
layerName=car(parseString(nth(3 layerList) " "))
layerPurpose=cadr(parseString(nth(3 layerList) " ")) 
layerPurpose=substring(layerPurpose 2 strlen(layerPurpose)-2)
lppList=list(layerName layerPurpose)
cv=hiGetCurrentWindow()->cellView ;;;current cellview

Curcell = cv ;;;current cellview
hierarchy = t
transformData = nil
instName = nil

find_layer(cv lppList transformData instName hierarchy)

procedure( find_layer(Curcell LayPurpPair transform_data inst_name Hier)
let((Localbox InstPath transform_data2 inst_name2)
/*search layer at topcell level*/

	foreach(Elem Curcell->shapes
		if( Elem->lpp == LayPurpPair
			then
			Localbox = Elem->bBox
			InstPath = ""
			elemList=list(Elem car(LayPurpPair) InstPath Localbox Ccenter( Localbox ))
			listA=finalSymbol->list
			listA=cons(elemList listA)
			finalSymbol->list=listA
		); en if
	); end foreach
/*end search layer at topcell level*/


/*search layer at subslevl (N-1)*/
	if( Hier == t
		then
		foreach( Elem Curcell->instances
		transform_data2 = cons( Elem->transform transform_data )
		inst_name2 = cons( Elem->name inst_name )
		
		find_layer(Elem->master LayPurpPair transform_data2inst_name2 Hier) ;;; ??????????????
		
		)  ; end foreach instance
	);end if

;;Hier = nil


/*end search layer at subslevl (N-1)*/



); end let
);end procedure find_layer
