• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. importing gerber data

Stats

  • State Suggested Answer
  • Replies 5
  • Answers 1
  • Subscribers 160
  • Views 2896
  • Members are here 0
More Content

importing gerber data

masamasa
masamasa 9 months ago

hello:

 

after importing gerber file into a design file, how can i assign a net into the imported shapes and clines?

 

there is no net assigned to a shape after the gerber file import although the vias connected to the shape have a net.

 

i have over 10k shapes and clines on my design.

 

regards

masa

  • Sign in to reply
  • Cancel
  • avant
    0 avant 9 months ago

    Have you tried moving the shape (ix 0)? It seems like the shape should inherit a net of a via after you pick it and drop it back down.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • DavidJHutchins
    0 DavidJHutchins 9 months ago in reply to avant

    I would try:

    derive connectivity lines

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 9 months ago

    Hi masa!

    Can you show me some pictures?

    Best Regaurds.

    HoangKhoi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • masamasa
    0 masamasa 9 months ago in reply to Hoangkhoipcb

    thank u for ur response, hoangkhoi

    somthing like this.

     

     

     

    regards

    masa

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 9 months ago in reply to masamasa

    Hi Masa!

    You can refer this code:

    Fullscreen code3.txt Download
    axlCmdRegister("change_net_trace" `change_net_trace )
    (defun change_net_trace ()
    	cmd_str_list = nil
    	ori_vis = axlVisibleGet()
    	axlVisibleDesign(nil)
    	axlVisibleLayer("VIA CLASS" t)
    	axlClearSelSet()
    	axlSetFindFilter(?enabled '(noall VIAS NAMEFORM) ?onButtons '(noall ALL))
    	axlAddSelectAll()
    	via_list = axlGetSelSet()
    	axlVisibleSet(ori_vis) 
    	axlClearSelSet()
    	axlSetFindFilter(?enabled '(noall CLINES SHAPES NAMEFORM) ?onButtons '(noall ALL))
    	mypopup = axlUIPopupDefine(nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun)))
    	axlUIPopupSet( mypopup)
    	axlSelect(?prompt "Please select an element...")
    	select_list = axlGetSelSet()
    	axlClearSelSet()
    	foreach(item select_list
    		sub = cadr(parseString(item->layer "/"))
    		if(item->objType == "path" then
    			cline = item
    			st_clines = cline->segments~>startEnd
    			st_seg = car(cline->segments)->startEnd
    			tmp = length(setof(e st_clines member(car(st_seg) e) != nil))
    			if(tmp == 2  then
    				st_seg = reverse(st_seg)
    			)
    			last_seg = lastelem(cline->segments)->startEnd
    			tmp = length(setof(e st_clines member(car(last_seg)  e) != nil))
    			if(tmp == 2  then
    				last_seg = reverse(last_seg)
    			)
    			poly = car(axlPolyFromDB(car(cline->segments) ?endCapType 'ROUND))
    			via = car(setof(e via_list axlPadOnLayer(e  strcat("ETCH/" sub)) == t && axlGeoPointInShape(e->xy poly nil) == t))
    			cmd_str_list = cons( sprintf(nil "pick %f %f; pick %f %f" xCoord(car(st_seg)) yCoord(car(st_seg)) xCoord(via->xy) yCoord(via->xy)) cmd_str_list)
    			poly = car(axlPolyFromDB(lastelem(cline->segments) ?endCapType 'ROUND))
    			via = car(setof(e via_list axlPadOnLayer(e  strcat("ETCH/" sub)) == t && axlGeoPointInShape(e->xy poly nil) == t))
    			cmd_str_list = cons( sprintf(nil "pick %f %f; pick %f %f" xCoord(car(last_seg)) yCoord(car(last_seg)) xCoord(via->xy) yCoord(via->xy)) cmd_str_list)
    		else
    			vias = nil
    			if(item->shapeBoundary == nil then
    				poly = car(axlPolyFromDB(item ?endCapType 'ROUND))
    				vias = setof(e via_list e->net->name != "" && axlPadOnLayer(e  strcat("ETCH/" sub)) == t && axlGeoPointInShape(e->xy poly nil) == t )
    			else
    				poly = car(axlPolyFromDB(item->shapeBoundary ?endCapType 'ROUND))
    				vias = setof(e via_list e->net->name != "" && axlPadOnLayer(e  strcat("ETCH/" sub)) == t && axlGeoPointInShape(e->xy poly nil) == t )
    				poly = car(axlPolyFromDB(item ?endCapType 'ROUND))
    				if(poly->holes != nil then
    					foreach(hole poly->holes
    						vias = setof(e vias axlGeoPointInShape(e->xy car(axlPolyFromHole(hole)) nil) == nil )
    					)
    				)
    			)
    			if(vias != nil then
    				via = car(vias)
    				axlChangeNet(item via->net)
    			)
    		)
    	)
    	if(cmd_str_list != nil then
    		axlShell("setwindow pcb; prepopup 0.0 0.0; done")
    		axlCmdRegister("_slide_seg" `_slide_seg ?cmdType "general")
    		axlShellPost("_slide_seg")
    	)
    )
    (defun _slide_seg () 
    	if(cmd_str_list != nil then
    		axlShell("setwindow pcb; slide; setwindow form.find; FORM find all_off ; FORM find cline_segs YES ; FORM mini allow_errors YES;")
    		foreach(cmd cmd_str_list
    			axlShell(cmd)
    		)
    		axlCmdUnregister("_slide_seg")
    		axlShell("setwindow pcb; done;change_net_trace")
    	)
    )

    Regards.

    HoangKhoi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information