• 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. Help! Documents for beginner.

Stats

  • Replies 5
  • Subscribers 160
  • Views 15133
  • Members are here 0
More Content

Help! Documents for beginner.

halinh12sinh
halinh12sinh over 9 years ago


Hello everyone,

I am a beginner with allegro skill.
I'm trying to read a piece of skill program as follows:
================
WIDTH_ScriptText = strcat(
"setwindow pcb ;"
"setwindow form.mini ;"
"FORM mini line_width " WIDTH_Number " ;"
"setwindow pcb ;"
)
================
WIDTH_Select = car(axlGetSelSet())
WIDTH_PadSelect = WIDTH_Select->pads
================
I having some issues:
+I can not find any information about the command" setwindow" in the document "Allegro User Guide: SKILL Reference"
and "SKILL Language User Guide"
+properties of the object in the allegro.(example:WIDTH_PadSelect = WIDTH_Select->pads)

Can you show the documents containing this information?Please!

Thanks and best regards,

Ken Le

  • Sign in to reply
  • Cancel
  • catalineacsu
    catalineacsu over 9 years ago

    these are not skill commands but script commands.

    There might be a better way to do it, but I personally learned them by recording scripts and then debugging them. Usually their names are quite intuitive.

    File->Script->Record/Stop.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • B Bruekers
    B Bruekers over 9 years ago

    You can also use "scriptmode +e"  (Allegro command prompt, not skill!) to find out certain script commando's. ( scriptmode -e to disable)

    Another hint, pressing ctrl-p in a form (like the artwork setup) will generate a file with all fields that are available on that form.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • halinh12sinh
    halinh12sinh over 9 years ago

    Hi catalineacsu and Bruekers

    Thank you very much! Your answers are useful.

    By the way,Do you know any separate tool to write and debug Skill?

    I'm reading a "change line width" skill. Please review the "Hight light" code bellows:

    one question, how can we know the properties of each object? such as "WIDTH_Select->pads"

    ; command: skill load("setwidth.il")
    ; command: w *
    ;
    ; WARRANTY: NONE!
    ;
    ; Must be called inside the "add connect" command
    ; - If you want to set Line Width to 25 mils, type: "w 25"
    ; - when you pick smd pad (ex: smd18x80) If you want to change
    ; the Line Width to the Width of pad size, only type "w"
    ; The Line Width will be change to 18mils.
    ; - when you pick on a trace (ex: 35 mils) If you want to change
    ; the Line Width to the Width of current trace, only type "w"
    ; The Line Width will be change to 35mils.
    ;
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    axlCmdRegister( "w" 'WIDTH_Start ?cmdType "sub_cmd")

    defun( WIDTH_Start ( @optional ( WIDTH_IsNumber "150" ) )

    if(WIDTH_IsNumber==nil then
    WIDTH_Auto()
    else
    WIDTH_Out(WIDTH_IsNumber)
    );end-if

    );end-defun( WIDTH_Start )


    defun( WIDTH_Out ( WIDTH_Number )

    version = axlVersion('version)
    if(version<16.0 then

    WIDTH_ScriptText = strcat(
    "setwindow pcb ;"
    "setwindow form.mini ;"
    "FORM mini line_width " WIDTH_Number " ;"
    "setwindow pcb ;"
    )
    else
    WIDTH_ScriptText = strcat(
    "setwindow pcb ;"
    "setwindow form.mini ;"
    "FORM mini acon_line_width " WIDTH_Number " ;"
    "setwindow pcb ;"
    )
    );end-if

    axlShell(WIDTH_ScriptText)
    printf("Change width to %s mils\n" WIDTH_Number)
    WIDTH_Number = nil
    WIDTH_ScriptText = nil

    );end-defun( WIDTH_Out )

    defun( WIDTH_Auto ()

    WIDTH_Select = car(axlGetSelSet())
    WIDTH_PadSelect = WIDTH_Select->pads
    WIDTH_PadMirrored = WIDTH_Select->isMirrored
    when( WIDTH_Select->objType=="pin"
    when( WIDTH_Select->isThrough==nil
    foreach(WIDTH_PadElem WIDTH_PadSelect
    when(WIDTH_PadElem->type=="REGULAR"
    when( ((WIDTH_PadElem->layer=="ETCH/TOP")&&WIDTH_PadMirrored==nil)||
    ((WIDTH_PadElem->layer=="ETCH/BOTTOM")&&WIDTH_PadMirrored==t)
    WIDTH_bBox = WIDTH_PadElem->bBox
    WIDTH_DisX = caadr(WIDTH_bBox)-caar(WIDTH_bBox)
    WIDTH_DisY = cadadr(WIDTH_bBox)-cadar(WIDTH_bBox)
    ;WIDTH_Width = truncate(min(WIDTH_DisX WIDTH_DisY))
    WIDTH_Width = min(WIDTH_DisX WIDTH_DisY)
    WIDTH_Width = sprintf(nil "%L" WIDTH_Width-1)
    WIDTH_Out(WIDTH_Width)
    );end-when
    );end-when
    );end-foreach
    );end-when
    );end-when

    when( WIDTH_Select->objType=="line"
    WIDTH_Width = WIDTH_Select->width
    WIDTH_Width = sprintf(nil "%L" WIDTH_Width)
    WIDTH_Out(WIDTH_Width)
    );end-when

    );end-defun(WIDTH_Auto)

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • catalineacsu
    catalineacsu over 9 years ago

    Hello  Linh Le,

    I am using notepad ++ for writing the SKILL style. You can define your own style. For debugging, I use the skill command line in Allegro and place useful variable inside the code to see what is going on in case of troubles.

    as for the properties there are a few ways to find them out.

    1. The "Allegro PCB Editor Database User Model" chapter in "Allegro User Guide: SKILL Reference" pdf document

    2. in skill command line by using my_id->? or my_id->??

    I usually use this code to interrogate different items (symbols in this example):

    axlSetFindFilter(?enabled `("NOALL" "SYMBOLS") ?onButtons `("SYMBOLS"))

    axlSingleSelectPoint()

    x = car(axlGetSelSet())

    and then type:

    x->xy

    x->?

    x->??

    etc.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • halinh12sinh
    halinh12sinh over 9 years ago

    You're a genius.^^ Thanks for your help.

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