Home > Community > Forums > PCB Design > Is there a way to set Dimensioning Parameters using SKILL

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Is there a way to set Dimensioning Parameters using SKILL 

Last post Mon, Jun 9 2014 11:27 PM by eDave. 4 replies.
Started by VijayVela 04 Jan 2013 01:04 PM. Topic has 4 replies and 2408 views
Page 1 of 1 (5 items)
Sort Posts:
  • Fri, Jan 4 2013 1:04 PM

    • VijayVela
    • Not Ranked
    • Joined on Tue, May 31 2011
    • Posts 11
    • Points 145
    Is there a way to set Dimensioning Parameters using SKILL Reply

    Hi,

    Is there a way to setup the Dimensioning Parameters using SKILL?

    Thanks.

     Regards,
    Vijay Anandh Vela, CID

    • Post Points: 20
  • Sun, Jan 6 2013 4:25 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 738
    • Points 16,055
    Re: Is there a way to set Dimensioning Parameters using SKILL Reply

    Yes but you need to do it via a script.

    Here is something I use for library symbols:

     defun( Public_setupDimensionParameters ()

     let((txtBlk, arrowLength, arrowWidth, dimParamFormName, p, scriptFile)

    txtBlk = 2

    arrowLength = axlMKSConvert(1.25, "mm")

    arrowWidth = arrowLength / 2.0

    dimParamFormName = "draft_parms"

    p = axlDMOpenFile("ALLEGRO_SCRIPT", "setupTaitLibDimensions", "w")

    when(p

    scriptFile = get_filename(p)

    fprintf(p, "setwindow pcb\n")

    fprintf(p, "generaledit\n")

    fprintf(p, "dimension edit\n")

    fprintf(p, "pop dyn_option_select @:@Parameters\n")

    fprintf(p, "setwindow form.%s\n", dimParamFormName)

     

    ;General tab

    fprintf(p, "FORM %s ansi_standard YES\n", dimParamFormName)

    fprintf(p, "FORM %s unit_metric YES\n", dimParamFormName)

     

    ;Text tab

    fprintf(p, "FORM %s text\n", dimParamFormName)

    fprintf(p, "FORM %s text_block_text %d\n", dimParamFormName, txtBlk)

    fprintf(p, "FORM %s place_period YES\n", dimParamFormName)

    fprintf(p, "FORM %s leading_zero YES\n", dimParamFormName)

    fprintf(p, "FORM %s trailing_zeros YES\n", dimParamFormName)

    fprintf(p, "FORM %s align_text NO\n", dimParamFormName)

    fprintf(p, "FORM %s diameter_symbol NO\n", dimParamFormName)

    fprintf(p, "FORM %s diameter_leading YES\n", dimParamFormName)

    fprintf(p, "FORM %s radius_leading YES\n", dimParamFormName)

    fprintf(p, "FORM %s special_none YES\n", dimParamFormName)

    fprintf(p, "FORM %s scale 1.0000\n", dimParamFormName)

    ;Primary dimensions:

    fprintf(p, "FORM %s units Millimeters\n", dimParamFormName)

    fprintf(p, "FORM %s accuracy 2\n", dimParamFormName)

    ;Secondary dimensions:

    fprintf(p, "FORM %s second_units Mils\n", dimParamFormName)

    fprintf(p, "FORM %s second_accuracy 1\n", dimParamFormName)

    fprintf(p, "FORM %s second_right YES\n", dimParamFormName)

    fprintf(p, "FORM %s dual_dimensions NO\n", dimParamFormName); This must be done after setting the second_units fields.

    ;Angular dimensions:

    fprintf(p, "FORM %s atol_accuracy 2\n", dimParamFormName)

     

    ;Lines

    fprintf(p, "FORM %s lines\n", dimParamFormName)

    ;Dimension Lines:

    ;Terminations

    fprintf(p, "FORM %s leader Arrow\n", dimParamFormName)

    fprintf(p, "FORM %s linear_top Arrow\n", dimParamFormName)

    fprintf(p, "FORM %s linear_bottom Arrow\n", dimParamFormName)

    fprintf(p, "FORM %s fill NO\n", dimParamFormName)

    ;Arrows

    fprintf(p, "FORM %s arrow_type 3 Point\n", dimParamFormName)

    fprintf(p, "FORM %s arrow_length %2.3f\n", dimParamFormName, arrowLength)

    fprintf(p, "FORM %s arrow_width %2.3f\n", dimParamFormName, arrowWidth)

    fprintf(p, "FORM %s arrow_inside NO\n", dimParamFormName)

     

    fprintf(p, "FORM %s bullet_diameter 4.000\n", dimParamFormName)

    fprintf(p, "FORM %s slash_length 4.000\n", dimParamFormName)

    fprintf(p, "FORM %s odd_angle Horiz/Vert\n", dimParamFormName)

    ;Extension Lines:

    fprintf(p, "FORM %s suppress None\n", dimParamFormName)

    fprintf(p, "FORM %s offset 0.250\n", dimParamFormName)

    fprintf(p, "FORM %s extension 0.500\n", dimParamFormName)

     

    ;Balloons

    fprintf(p, "FORM %s balloons\n", dimParamFormName)

    fprintf(p, "FORM %s type Circle\n", dimParamFormName)

    fprintf(p, "FORM %s size 5.00\n", dimParamFormName)

    fprintf(p, "FORM %s text_block_blln %d\n", dimParamFormName, txtBlk)

    fprintf(p, "FORM %s value 1\n", dimParamFormName)

    fprintf(p, "FORM %s autoincr YES\n", dimParamFormName)

    ;Auto-size

    fprintf(p, "FORM %s autosize YES\n", dimParamFormName)

    fprintf(p, "FORM %s max_character 2\n", dimParamFormName)

     

    ;Tolerancing

    fprintf(p, "FORM %s tolerancing\n", dimParamFormName)

    fprintf(p, "FORM %s use_tolerancing NO\n", dimParamFormName)

     

    fprintf(p, "FORM %s apply\n", dimParamFormName)

    fprintf(p, "FORM %s done\n", dimParamFormName)

    fprintf(p, "setwindow pcb\n")

    fprintf(p, "generaledit\n")

    axlDMClose(p)

    axlShell(sprintf(nil, "replay '%s'", scriptFile))

    deleteFile(scriptFile)

    ); when p

    ))

    Dave Elder, Tait Communications
    • Post Points: 35
  • Sun, Jan 6 2013 6:11 PM

    • VijayVela
    • Not Ranked
    • Joined on Tue, May 31 2011
    • Posts 11
    • Points 145
    Re: Is there a way to set Dimensioning Parameters using SKILL Reply

    Thanks Dave..
    Exactly what I was looking for... Didn't even cross my mind that we can write code that writes a script and replay it...
    This is getting more educational and interesting with every single day...

    Thanks once again...

    Regads,
    Vijay Anandh Vela, CID

    • Post Points: 5
  • Mon, Jun 9 2014 11:13 PM

    Re: Is there a way to set Dimensioning Parameters using SKILL Reply

    dave can you share the run command for this ill file

    • Post Points: 20
  • Mon, Jun 9 2014 11:27 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 738
    • Points 16,055
    Re: Is there a way to set Dimensioning Parameters using SKILL Reply

    Put the code into a skill file (say Public_setupDimensionParameters.il). Load it using skill load("Public_setupDimensionParameters.il"). Run it by typing skill Public_setupDimensionParameters(). You could also put it into your allegro.ilinit file and register a command.

    Dave Elder, Tait Communications
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by VijayVela at 04 Jan 2013 01:04 PM. Topic has 4 replies.