Home > Community > Forums > PCB SKILL > Z-copy skill code

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: *

 Z-copy skill code 

Last post Tue, Sep 10 2013 5:28 PM by Randy R. 2 replies.
Started by Kot13 09 Sep 2013 11:16 AM. Topic has 2 replies and 2293 views
Page 1 of 1 (3 items)
Sort Posts:
  • Mon, Sep 9 2013 11:16 AM

    • Kot13
    • Not Ranked
    • Joined on Wed, Apr 25 2012
    • Posts 8
    • Points 215
    Z-copy skill code Reply

    Hi All,

     I am in the process of writing some Skill code to create a negative silkscreen label. One of the steps that i need to do is to Z-copy the label to the board geometry / silkscreen_top layer. I'm still fairly new to Skill coding and for this exercise I am sending a bunch of axlShell commands that i got from using scriptmode -i.

    The axlShell commands all work when i enter them one line at a time at the Skill prompt, however whenever I run my .il file I always get stuck in creating a bounding box around what I need to get Z-copied.

    Here is the area of the code where I seem to get stuck:

       zcopy = "zcopy shape; setwindow pcb; drag_start "

       zcopy2 = "setwindow pcb; drag_stop "

       sprintf(cmd "%s %d %d " zcopy (StartX-25) (StartY+25))

       axlShell(cmd)

    The last command always executes and I have the bouding box started.

       sprintf(cmd "%s %d %d" zcopy2 EndX EndY)

       axlShell(cmd)

       axlShell("pop Done")

    The above code never executes.

     

    I always wind up with a the Z-copy bounding box started and the end point attatched to my cursor. And the Skill prompt at:

    Select cline, shape, rectangle or closed polygon.
    Enter selection point
    Select cline, shape, rectangle or closed polygon.
    Enter selection point
    Skill >

     

    Can anyone point me to what i am doing wrong? Or suggest a better way of completing the Z-Copy using Skill?

    Thanks

    -K

     

    • Post Points: 5
  • Mon, Sep 9 2013 1:39 PM

    • Kot13
    • Not Ranked
    • Joined on Wed, Apr 25 2012
    • Posts 8
    • Points 215
    Re: Z-copy skill code Reply

    All,

     I have found my mistake. After adding a ";" after each of the drag_start and drag_stop the script finishes with the resired results.

     

    • Post Points: 20
  • Tue, Sep 10 2013 5:28 PM

    • Randy R
    • Top 50 Contributor
    • Joined on Wed, Jul 16 2008
    • Dupont, WA
    • Posts 192
    • Points 3,025
    Re: Z-copy skill code Reply

    Thanks for letting us know what the solution was.

    Good Day, R².
    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by Kot13 at 09 Sep 2013 11:16 AM. Topic has 2 replies.