procedure( ex6_select()
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())
)
;---------------------------------------------------------------------
; external function ( can be removed if you use it )
;---------------------------------------------------------------------
defun( AFn_getPathFromSegments (segments @optional newWidth)
let((path, end, width)
path = axlPathStart(list(car(car(segments) ->startEnd)))
foreach(seg, segments
end = cadr(seg ->startEnd)
width = newWidth || seg ->width
case(seg ->objType
("line", axlPathLine(path, width, end))
("arc"
if(seg ->isCircle
then path = axlPathStartCircle(list(seg ->xy, seg ->radius) width)
else path = axlPathArcCenter(path, width, end, seg ->isClockwise, seg ->xy)
)
)
)
)
path
))
;---------------------------------------------------------------------
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())
)
;---------------------------------------------------------------------
; external function ( can be removed if you use it )
;---------------------------------------------------------------------
defun( AFn_getPathFromSegments (segments @optional newWidth)
let((path, end, width)
path = axlPathStart(list(car(car(segments) ->startEnd)))
foreach(seg, segments
end = cadr(seg ->startEnd)
width = newWidth || seg ->width
case(seg ->objType
("line", axlPathLine(path, width, end))
("arc"
if(seg ->isCircle
then path = axlPathStartCircle(list(seg ->xy, seg ->radius) width)
else path = axlPathArcCenter(path, width, end, seg ->isClockwise, seg ->xy)
)
)
)
)
path
))
;---------------------------------------------------------------------