Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: IndyJack on June 28, 2009, 01:09:11 PM
-
Hello All, I'm new to Mach3, I use it with VCarve Pro but I'd like to see if I can write some wizards. Although I'm new to Mach3, I have over a decade of VB programming under my belt.
Can someone point me to a place to get started please?
Jack
-
Hi Jack,
You can have a look at the Mach wiki on the Mach support page. And, there is also a customization pdf manual that you can download from the downloads page, which contains a lot of useful information to start with.
Hope it helps.
Daniel
-
This seems to be simple for others, but for me it took forever to figure out:
You can create a button with screen 4 double click the button and tell it you are assigning VB to it. Then in order to assign said VB you have to go back into mach 3, bring in your new screen then under the operator drop down, there is a vb script editor to actually write the code.
Why you cant write it in Screen 4 is beyond me, but finally I figured that part out.
Other than that I think knowledge of the language is all you need.
Good luck
-
In screen 3 you could write the code in the screen designer. But then when you were running the screen if you wanted to edit code you had to exit the screen, open screen3, make your change then go back and re-start MAch.
Adding the edit button script option under the operator menu was a BIG improvement.
-
You can edit the code in MachScreen, Klaus's designer.
And for the OP, the Mach2 customization guide has info on creating wizards.
-
How do I get inyo the wizard code? I am afully licenced user.
-
This seems to be simple for others, but for me it took forever to figure out:
You can create a button with screen 4 double click the button and tell it you are assigning VB to it. Then in order to assign said VB you have to go back into mach 3, bring in your new screen then under the operator drop down, there is a vb script editor to actually write the code.
Why you cant write it in Screen 4 is beyond me, but finally I figured that part out.
Other than that I think knowledge of the language is all you need.
Good luck
I would really recommend NOT using actual button scripts for one simple reason - they are embedded in the screenset itself. Lose the screenset, and you lose all your button scripts. You want to use the same script in more than one button on muliple screen pages, or in multiple screensets? You have to copy and paste the code. You now found a bug? You have to go find and edit ALL those scripts. Instead, put the script into an M-macro, and make the button script nothing more than a 'Code "M*********"', and you can now edit the script all you like, using any editor you like, and call it from as many buttons, or anything else, you like. You then also have the ability to have a single script perform multiple functions, since you can pass arguments to the M-script when you call it from the one-line button script, by doing 'Code "M********* Pn.nnn Qn.nnn Rn.nnn"'. The P, Q, and R arguments are accessible through the Param1(), Param2() and Param3() functions.
Mach3 v4 will very likely support calling scripts by name, rather number, which will make things even nicer...
Regards,
Ray L.