Don’t you hate it when you find out that one of your VISUAL users is using an old version of a macro? Wouldn’t it be great if you could modify a macro and it would instantly be deployed across your VISUAL network?
Well you can…and here’s how you can do it.
The solution involves 2 sets of macros.
The first set of MACROS (let’s call them your ACTION macros) are your main macros that contain the scripts that account for your business logic and rules. Place these ACTION macros in a centralized location on your network where your VISUAL users have access to.
The second set of macros (let’s call them your SHELL macros) will have the same file name as your ACTION macros but will contain a script that will run it’s respective ACTION macro. These SHELL macros are the ones that should be place on each VISUAL workstation (and/or profile) in their respective VISUAL local directory. You will only have to configure these SHELL macros once for each workstation.
Once the ACTION & SHELL macros are in place – any modifications you do to the ACTION macros will immediately be deployed in your VISUAL environment because your SHELL macros are pointing to the ACTION macros and executing them.
Say what?!? How do you get these SHELL macros to run the ACTION macros?
I’ll demonstrate with a simple example (much easier to explain)
Let’s say you have an OnSave macro in Part Maintenance that checks to see if the user has populated the PRODUCT CODE field.
Your ACTION macro would contain something similar to the following:
So this ACTION macro would have the filename “VMPRTMNT_OnSave.vms”. You will want to place this ACTION macro file on your network where your VISUAL users have access to. In this example – let’s assume it’s stored in location \\SHARED\MACROS
Now let’s create it’s respective SHELL macro, which will also be an OnSave macro, BUT it will contain the following script to call the ACTION macro.
Place this SHELL macro on each VISUAL workstation (in the local directory).
You’re all set.
Now when you save in PART MAINTENANCE, the SHELL macro will call the ACTION macro to verify whether the PRODUCT CODE has been entered.
With this setup – you don’t need to chase down and update workstations if you modify a macro (or have users log out & log back to initial the login script to deploy macro files).
Just modify the ACTION macros – and the update is instant.
I would like to thank Jenifer Barcus, Applications Specialist at Waukesha Foundry Inc., and Jim Herzfeld for allowing me to share this solution on VisualNuggets.com. It’s awesome!