• 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. Modifying ns_gerber.il

Stats

  • Replies 5
  • Subscribers 162
  • Views 13796
  • Members are here 0
More Content

Modifying ns_gerber.il

joma
joma over 12 years ago

 Hi,

I am trying to modify the ns_gerber.il to add some extra layers to the conductor films. My if-then statements seem to work ok for the TOP and BOTTOM layers but I cannot get the inner layers to work. If you look at the commented out lines in the code below you can see my various attempts using else, != and using layer names directly. Any help telling me where I am going wrong greatly appreciated.
Jim O'Mahony

; get conductor layers
my_layers = axlGetParam("paramLayerGroup:etch")
etchcount = 0
i = 0
foreach(layer my_layers->groupMembers
layerparams = axlLayerGet(strcat("ETCH/" layer))
if(layerparams->type=="PLANE" && layerparams->drcPhotoType=="negative" then
pm = 0 ; plot mode negative
else
pm = 1 ; plot mode positive
)

if(layer=="TOP" then tex = strcat("Texttop")

else tex=strcat("Text" layer))

;if(layer=="L1" then tex = strcat("Text" layer))
;if(layer=="L2" then tex = strcat("Text" layer))
;if(layer!="TOP" then tex = strcat("Text" layer)

if(layer=="BOTTOM" then tex = strcat("Textbot"))

 

sprintf(film_name "%d_%s" ++i layer)
ld1 = strcat("VIA CLASS/" layer)
ld2 = strcat("PIN/" layer)
ld3 = strcat("ETCH/" layer)

tc = strcat("BOARD GEOMETRY/TOOLING_CORNERS")
texlayer = strcat("BOARD GEOMETRY/" tex)

data_list = (list ld1 ld2 ld3 tc texlayer)
param_list = (list 0 0 0 ulw sbb pm 0 0 0 0 0 1 1)
(axlfcreate film_name param_list data_list)
++etchcount)

  • Sign in to reply
  • Cancel
Parents
  • joma
    joma over 12 years ago

    Thanks guys, I realised my initial mistake after driving home for an hour !
    I think I get no response for the inner layers because they do not exist in the design.

    To explain, I have existing inner layers called textc2(first inner), textc3(second inner) etc. depending on the number of layers in the design. I see from the exising code that Cadence uses L1 for the first inner layer and L2 for the next etc. Having thought about it, I would rather adapt the code to match my existing library layer names than change the library.
    Therefore gives me the problem of how to parse the layer name in order to strip the "L" and leave the layer number (as integer value) and then add one to it (to say variable foo) before using a stringcat("textc" foo) to finish.
    Many years ago I used grep and/or awk to do substitutions but I have no idea how to do that in Skill code.

    Jim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • joma
    joma over 12 years ago

    Thanks guys, I realised my initial mistake after driving home for an hour !
    I think I get no response for the inner layers because they do not exist in the design.

    To explain, I have existing inner layers called textc2(first inner), textc3(second inner) etc. depending on the number of layers in the design. I see from the exising code that Cadence uses L1 for the first inner layer and L2 for the next etc. Having thought about it, I would rather adapt the code to match my existing library layer names than change the library.
    Therefore gives me the problem of how to parse the layer name in order to strip the "L" and leave the layer number (as integer value) and then add one to it (to say variable foo) before using a stringcat("textc" foo) to finish.
    Many years ago I used grep and/or awk to do substitutions but I have no idea how to do that in Skill code.

    Jim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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