procedure( ex6_silk2assem()
from_class_value = "PACKAGE GEOMETRY"
from_subclass_value = "Silkscreen_Top"
to_class_value = "PACKAGE GEOMETRY"
to_subclass_value = "Assembly_Top"
classes_list = list("BOARD GEOMETRY" "PACKAGE GEOMETRY" "MANUFACTURING" "DRAWING FORMAT" "ETCH" "ANTI ETCH" )
from_layer = strcat(from_class_value "/" from_subclass_value)
to_layer = strcat(to_class_value "/" to_subclass_value)
printf("Lines copied \n from_layer :%s\n to_layer :%s\n\n" axlPPrint(from_layer) axlPPrint(to_layer))
;axlVisibleDesign(nil)
axlVisibleLayer(from_layer t)
axlVisibleUpdate(t)
axlSetFindFilter(?enabled list( "noall" "lines") ?onButtons list( "noall" "lines"))
copy_objs=axlGetSelSet(axlAddSelectAll())
;printf("sellect %L\n" copy_objs)
;axlVisibleLayer(to_layer t)
;axlVisibleUpdate(t)
;axlHighlightObject(copy_objs)
;foreach(o copy_objs
; axlHighlightObject(o)
; printf("sellect %L\n" o)
; )
foreach( obj, copy_objs
l_path = AFn_getPathFromSegments(obj ->segments )
axlDBCreatePath(l_path, to_layer)
);foreach
;axlDeleteObject(axlGetSelSet())
)
;i=axlDBGetDesign()->components
procedure( ex7_asm_ck()
pgAssembelyT="PACKAGE GEOMETRY/ASSEMBLY_TOP"
pgAssembelyB="PACKAGE GEOMETRY/ASSEMBLY_BOTTOM"
result='(nil)
pL=axlDBGetDesign()->symbols; refdes ;compdefs; text;pins ; components ;
printf("length %d \n" length(pL))
foreach( p pL
printf(">>>new loop<<<\n")
if(p->objType printf("p->objType %s\n" p->objType))
if(p->name printf("p->name %s\n" p->name))
if(p->refdes printf("p->refdes %s\n" p->refdes))
if( (p->name)&&( member(p->name result) == nil) then
counter=0
foreach( i p->children
if( (i->layer == pgAssembelyT )||(i->layer == pgAssembelyB)
then
counter++
;printf("counter=%d\n" counter)
)
)
if( (counter == 0 )&&(p->name)
then
printf("-->>NOTE: symbol %s without assembely \n" p->name )
result = cons( p->name result)
;printf("result = %L \n" result);
;else printf("symbol %s with %s\n" p->name pgAssembelyT)
)
)
)
printf("result=%L\n" result)
;axlPrintDbid(FP)
)
from_class_value = "PACKAGE GEOMETRY"
from_subclass_value = "Silkscreen_Top"
to_class_value = "PACKAGE GEOMETRY"
to_subclass_value = "Assembly_Top"
classes_list = list("BOARD GEOMETRY" "PACKAGE GEOMETRY" "MANUFACTURING" "DRAWING FORMAT" "ETCH" "ANTI ETCH" )
from_layer = strcat(from_class_value "/" from_subclass_value)
to_layer = strcat(to_class_value "/" to_subclass_value)
printf("Lines copied \n from_layer :%s\n to_layer :%s\n\n" axlPPrint(from_layer) axlPPrint(to_layer))
;axlVisibleDesign(nil)
axlVisibleLayer(from_layer t)
axlVisibleUpdate(t)
axlSetFindFilter(?enabled list( "noall" "lines") ?onButtons list( "noall" "lines"))
copy_objs=axlGetSelSet(axlAddSelectAll())
;printf("sellect %L\n" copy_objs)
;axlVisibleLayer(to_layer t)
;axlVisibleUpdate(t)
;axlHighlightObject(copy_objs)
;foreach(o copy_objs
; axlHighlightObject(o)
; printf("sellect %L\n" o)
; )
foreach( obj, copy_objs
l_path = AFn_getPathFromSegments(obj ->segments )
axlDBCreatePath(l_path, to_layer)
);foreach
;axlDeleteObject(axlGetSelSet())
)
;i=axlDBGetDesign()->components
procedure( ex7_asm_ck()
pgAssembelyT="PACKAGE GEOMETRY/ASSEMBLY_TOP"
pgAssembelyB="PACKAGE GEOMETRY/ASSEMBLY_BOTTOM"
result='(nil)
pL=axlDBGetDesign()->symbols; refdes ;compdefs; text;pins ; components ;
printf("length %d \n" length(pL))
foreach( p pL
printf(">>>new loop<<<\n")
if(p->objType printf("p->objType %s\n" p->objType))
if(p->name printf("p->name %s\n" p->name))
if(p->refdes printf("p->refdes %s\n" p->refdes))
if( (p->name)&&( member(p->name result) == nil) then
counter=0
foreach( i p->children
if( (i->layer == pgAssembelyT )||(i->layer == pgAssembelyB)
then
counter++
;printf("counter=%d\n" counter)
)
)
if( (counter == 0 )&&(p->name)
then
printf("-->>NOTE: symbol %s without assembely \n" p->name )
result = cons( p->name result)
;printf("result = %L \n" result);
;else printf("symbol %s with %s\n" p->name pgAssembelyT)
)
)
)
printf("result=%L\n" result)
;axlPrintDbid(FP)
)