Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: spandadk on July 17, 2019, 06:10:14 AM
-
Passing a parameter to my macro function through the Mach4 MDI - how would I go about that?
I've tried to trigger a couple of things from the MDI, which naturally isn't correct/ supported, among other:
- mdi101(666)
- mdi101 #666
-
take a look at this example I created of how to pass data, might help you.
https://www.machsupport.com/forum/index.php?topic=27162.msg261221#msg261221
-
Thanks a lot, that was really helpful! :)
So basically I need to pass a,b,c,d.... etc. a long with the a value, like: m101 a666
And then in my function I can read that A parameter by doing:
mc.mcCntlGetLocalVar(inst, hParam, mc.SV_A)
Getting passed value b would then be mc.SV_B etc.
Is that correctly understood?
And a bonus question: it's not possible to pass a string only to the function?