Results 1 to 5 of 5

Thread: Question on VB

  1. #1
    Registered
    Join Date
    Sep 2006
    Location
    USA
    Posts
    133
    Downloads
    0
    Uploads
    0

    Question on VB

    I'm learning Screen4 and building custom screens. I have figured out how to design buttons and assign VB code to each. My question is "Do you have to enter VB code from scratch for each button or is there a way to copy, paste, and edit code from one button to another?" For example, code for finding center of the four corners of work for probe are similar. Would like to enter for one corner, then copy and paste to next corner, edit, and save. Is this possible? How?


  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,297
    Downloads
    0
    Uploads
    0
    In Mach3, choose Operator > Edit Button Script and select the button. When the VB window opens, select all and copy. Then again, Operator > Edit Button Script, select other button and paste.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Registered
    Join Date
    Sep 2006
    Location
    USA
    Posts
    133
    Downloads
    0
    Uploads
    0
    I had attempted that procedure before. Tried again with same results. When I select 2nd button to paste the script there is the "paste" option is not showing as available both in drop down or right click.


  4. #4
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,297
    Downloads
    0
    Uploads
    0
    Try control-C for copy and control-V for paste. Sounds like it's not copying, though. Try copying and pasting into notepad, then copy and paste from there.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  • #5
    Registered
    Join Date
    Sep 2006
    Location
    USA
    Posts
    133
    Downloads
    0
    Uploads
    0
    For some reason the mouse click on select all, copy, etc. not working for the "button edit". Does work in other programs, etc. so know is good. Did try with the key board commands and it works. Being able to copy/paste code with many lines of VB sure does speed up things. Thanks for your help.


  • Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.