586,104 active members*
3,385 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > BobCad-Cam > Bobcad V20.6 Script
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2013
    Posts
    70

    Bobcad V20.6 Script

    If somebody could help me out with this I would appreciate it. I just started to experiment with script writing and have written this toolpath generating script that works in Metric, but when you try to run it in English it won't work. I have tried a few variations and can't manage to get it right.




    dim V_X2 as double
    dim V_Y2 as double
    dim V_Z2 as double
    dim V_COPIES as integer

    Ask Header="Translate Repeat", Output, Cancel=canc, "X Translate;0"=V_X2, "Y Translate;0"=V_Y2,"Z Translate;0"=V_Z2
    If canc Then
    Exit
    End If

    Translate Type = 2, X1 = 0, Y1 = 0, Z1 = 0, X2 = V_X2, Y2 = V_Y2, Z2 = V_Z2 \
    , Copy = FALSE, Scale = 1, NCopies = 0, Drag = FALSE


    Ask Header="Translate Repeat2", Output, Cancel=canc, "X Translate Repeat;0"=V_X2, "Y Translate Repeat;0"=V_Y2,"Z Translate Repeat;0"=V_Z2,"# COPIES;0"=V_COPIES
    If canc Then
    Exit
    End If

    Translate Type = 2, X1 = 0, Y1 = 0, Z1 = 0, X2 = V_X2, Y2 = V_Y2, Z2 = V_Z2 \
    , Copy = TRUE, Scale = 1, NCopies = V_COPIES, Drag = FALSE

    Reverse2
    Linejoin

    UnselectAll



    Thanks, Idiod

  2. #2
    Join Date
    Mar 2005
    Posts
    368
    Scripting defaults to metric.
    Need to add multipliers, the easiest is as shown.

    You can go further with coding and add a step that will detect "mm" in the input and skip the multipliers.
    Attached Thumbnails Attached Thumbnails 2013-04-28_1101.jpg  

  3. #3
    Join Date
    Apr 2013
    Posts
    70
    Could you explain a little about what you mean about coding because I do both Metric and Standard work and it would be nice if the same script would work for both. Also the number of copies I'm generating seems to be multiplying in Standard. Thanks for your help.
    Idiod

Similar Threads

  1. BobCAD V20 Script, Loop Syntax?
    By Chipload in forum BobCad-Cam
    Replies: 18
    Last Post: 09-10-2009, 11:04 PM
  2. BOBCAD Model Airplane Wing Design Script
    By cely in forum BobCad-Cam
    Replies: 6
    Last Post: 08-21-2009, 04:11 AM
  3. Run G-code from script
    By leif_brunosson in forum LinuxCNC (formerly EMC2)
    Replies: 1
    Last Post: 11-11-2008, 08:39 PM
  4. VB6,VB.net,VB script,What one???
    By hydrospin01 in forum Visual Basic
    Replies: 11
    Last Post: 05-25-2008, 02:09 AM
  5. Bobcad and script letters
    By Claude Boudreau in forum BobCad-Cam
    Replies: 6
    Last Post: 03-25-2008, 11:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •