• 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 20987
  • 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

    Thank you Dave.

     I'm little busy for the next couple of days, but I will give it a shot once I get sometime.

     Appreciate your help! 

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

    Hi Dave,

    The code worked great!

    I appreciate your help! 

     

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

    Hi Dave,

    After adding couple more constraints from the code you provided me I am considering making it so that the form will not pop up if the 3 criteria I specify exist on the board already.

    Also, I would like to have the form close when I select one of the options after it successfully runs. 

    I was wondering if you could guide me into the right direction again.  Please see below for the changes I made.

    Thank you,

     

    (defun my_form (t_open)

    time = getCurrentTime()

    time = parseString(time)

    day = nth(1 time)

    month = car(time)

    month = upperCase(month)

    year = nth(3 time)

    date = strcat(" Date: " day " " month " " year)

    CreateForm()

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

    axlFormDisplay(myform)

    axlUIWPrint(myform date)

     

    )

     

     

    (defun CreateForm ()

    drain()

    form_file = "output-orig_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"

    println("OK pressed")

    if(axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils")) then println("Successful") else println("Failure"))

    if(axlCNSSetSameNet(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils")) then println("Successful") else println("Failure"))

    if(axlCNSSameNetModeSet('thrupin_smdpin 'on) then println("Successful") else println("Failure"))

    )

    ("Button2"

    println("NO pressed")

    ;(axlFormClose(myform))

    )

    )

    unless(zerop(myform ->doneState), axlFormClose(myform))

    )) 

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

    Hi,

    You seem to be getting in too deep before you understand how Skill and forms work. May try a few, simple examples first.

    Anyway, just use  axlFormClose to close the form after any button push.

    Just test your values before you open the form. ie. if( a && b && c then println("ok") else CreateForm() .......)

    Good luck,

    Dave 

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

    Hi Dave,

     

    Thank you again for the input.  I do feel like I'm getting too far ahead of myself, but every time something works it seems like it needs something else. :)

    I looked through the doc folder in the install, but I can't seem to find anything about making skill from scratch.  All I really saw was the PDF with different commands.  Do you have a suggestion on what reading material I should work off of?

     

    • 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