• 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. Changing spacing constraints when opening Allegro

Stats

  • Replies 23
  • Subscribers 159
  • Views 20978
  • Members are here 0
More Content

Changing spacing constraints when opening Allegro

Mstrghettorigg
Mstrghettorigg over 12 years ago

Hi All,

 I was wondering if anyone can guide me in the right direction.

I'm trying to make it so I can set the bottom SMD pin to TH distance when allegro starts up.  This will need to be done to all files being opened.

I'm not familiar with writing skills, but I was wondering if anyone has ran into similar Skill file or at least guide me in the right direction.

I looked through some forum and it looks like I can use axlCmdRegister and axlTriggerSet commands to run the skill automatically once I have the skill file create.

I think this command is where I need to get started from, but I don't think it's that simple. 

axlCNSSetSpacing("" TOP 'Thru Pin_SMD Pin .050 INCH) 

Any help will be appreciated.

Thanks! 

  • Sign in to reply
  • Cancel
  • Mstrghettorigg
    Mstrghettorigg over 12 years ago

    I tried putting the text in the skill file and it came up with an error.  I tried it on allegro.ilinit file and it also gave me an error.

    I have few skill files being loaded via that allegro.ilinit file so I am assuming it is working correct. 

    I typed "1" in front of axltriggerset... and I get the message below.

    E- 1axlTriggerSet('open 'TH_SMT) 

    E-                ^

    E- SYNTAX ERROR found at line 25 column 16 of file allegro.ilinit

    E- *Error* lineread/read: syntax error encountered in input 

    Opening existing drawing... 

    Does "Opening existing drawing..." mean that axlTriggerSet is running before the board actually opens and that's why it's not working? 

    Thank you again. 

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

    GOT IT!

    You need to include an arument in your function for the trigger to work. Try:

     defun( TH_SMT (t_open) axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils"))

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

    Hello Dave,

    It worked perfectly! 

    Thank you very much for your assistance! 

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

    Hello Dave,

    I was wondering if you could help me with this.  I found a older thread on how to make a form by Venkata and I was not able to get the buttons to work.  I would like the OK button (Button 1) to run the code we worked on for setting the constraints of bottom SMT to TH to be 50 mils and NO button (button 2) to just close the form.  Please see below for the skill file content.

     /*Created by xml2bnf  perl utility

    Coded by Venkata Ramanan/Sant Clara, CA

    Version History*/

     

     ; WARRANTY:

     ; NONE. NONE. NONE.

    (defun test ()

    CreateForm()

    myform=axlFormCreate( (gensym) form_file nil 'Form_Action t)

    axlFormDisplay(myform)

    axlUIWPrint(myform date)

     

    )

     

     

    (defun CreateForm ()

    drain()

    form_file = "test_form.form"

    myform = outfile(form_file "w")

    fprintf(myform "#Created by xml2bnf  perl utility\n")

    fprintf(myform "#Coded by Venkata Ramanan/Santa Clara, CA\n\n")

    fprintf(myform "FILE_TYPE=FORM_DEFN VERSION=2\n")

    fprintf(myform "FORM AUTOGREYTEXT\n")

    fprintf(myform "FIXED\n")

    fprintf(myform "PORT 45 23\n")

    fprintf(myform "HEADER \"Form Field Type Demo\"\n\n")

    fprintf(myform "POPUP <ENUM>\"ITEM1\"\"0\",\"ITEM2\"\"1\",\"ITEM3\"\"2\",\"LAST ONE\"\"3\".\n\n")

    fprintf(myform "TILE\n\n")

    fprintf(myform "## Button Field in FORM ## \n")

    fprintf(myform "FIELD Button1\n")

    fprintf(myform "FLOC 8 13\n")

    fprintf(myform "MENUBUTTON \"OK\" 11 3\n")

    fprintf(myform "FGROUP \"TH to SMT Bottom Constraints\"\n")

    fprintf(myform "ENDFIELD \n\n")

    fprintf(myform "## Button Field in FORM ## \n")

    fprintf(myform "FIELD Button2\n")

    fprintf(myform "FLOC 24 13\n")

    fprintf(myform "MENUBUTTON \"NO\" 11 3\n")

    fprintf(myform "FGROUP \"TH to SMT Bottom Constraints\"\n")

    fprintf(myform "ENDFIELD \n\n")

    fprintf(myform "## Text Field in Form## \n")

    fprintf(myform "TEXT \"Change TH to SMT Bottom Constraints to 0.050?\"\n")

    fprintf(myform "FLOC 5 5\n")

    fprintf(myform "TGROUP \"TH to SMT Bottom Constraints\"\n")

    fprintf(myform "ENDTEXT\n\n")

    fprintf(myform "ENDTILE\n\n")

    fprintf(myform "ENDFORM\n\n")

     

    close(myform)

    )

     

     

    (defun Form_Action (myform)

    (let (t1 item index field cnt)(printf "field/value %L = %L (int %L\n)" 

    myform->curField myform->curValue, myform->curValueInt )

    (printf "doneState %L\n" myform->doneState )

    case(myform->curField

    ("Button1"

     

    ;Button Field 

    ;Enter Action Here

    )

    ("Button2"

     

    ;Button Field 

    ;Enter Action Here

    )

    )

    )

     

    if((nequal myform->doneState 0)

    axlFormClose(myform))

    )

     

    It says button field 
    ;Enter action here so I'm assuming this is where I put the code in.
     
    I tried
    defun( TH_SMT (t_open) axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils"))) and axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils"))), but neither worked.  

    Please let me know if you are able to help.
     
     
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 12 years ago
    (defun Form_Action (myform)
     let((t1 item index field cnt)
     (printf "field/value %L = %L (int %L\n)" myform->curField myform->curValue, myform->curValueInt )
    (printf "doneState %L\n" myform->doneState )
    case(myform->curField
    ("Button1"
    println("OK pressed")
    if(axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils")) then println("Successful") else println("Failure"))
    )
    ("Button2"
    ;Button Field 
    ;Enter Action Here
    )
    )
    unless(zerop(myform ->doneState), axlFormClose(myform))
    ))
    • 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