How to create interactions between macro and user
Hi,
I would like to update some macros to make them more flexible.
For example, I have some tolerance values written directly in the TCL file.
It is better if the user can put the tolerance value when the macro is launched thanks to a dialog box.
I found a way to do that but it needs the command window and I prefer a message like tk_messageBox.
Can I do that ?
Thanks for you help,
Regards.
Answers
-
Yes, certainly
you can use function of hm, for example
set a [hm_getfloat 'input value of a' 'a =']
or hm_getint, hm_getstring, ...
0 -
Oh, thanks, that's perfect !
Just another thing in the same mind.
I have two macros doing the same thing. One for nodes, one for elems.Is there a way to open a box saying 'Would you like to play for : Nodes (option 1) - Elems (option 2)'
In order to have one file instead of two. /emoticons/default_wink.png' alt=';)' srcset='/emoticons/wink@2x.png 2x' width='20' height='20'>
0 -
Sure, there is /emoticons/default_biggrin.png' alt=':D' srcset='/emoticons/biggrin@2x.png 2x' width='20' height='20'>
set answer [hwt::Message msgTitle 'Have a good job Cya' msgText 'What would you like to play for?' msgAccept 'Nodes' msgAlt 'Elems' returnButtonText]
0 -
Perfect, thanks ! /emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>
0 -
Sorry but I come back, again ! /emoticons/default_biggrin.png' alt=':D' srcset='/emoticons/biggrin@2x.png 2x' width='20' height='20'>
I tryed this :
hwt::Message msgTitle 'Have a good job Cya' msgText 'What would you like to play for?' msgAccept 'Nodes' msgAlt 'Elems' returnButtonText
But I would like to have :
Option 1 - Option 2 - Option 3 - ReturnButton
When I just add another 'msgAlt Option3', it removes option 2.
And I don't find the 'help page' of this function.
0 -
Hi
Read help about it in help>Tools>hwGuiToolKit
you can add 3rd button by 'msgCancel Option3'
if you need 4 buttons then create a message box your self. it's a modal toplevel
0 -
Ok perfect, thank you, I'll take a look to that ! /emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>
Another question about another subject.
Is there a possibility to run the script without graphic interface update to improve calculation time ?Because I guess that show on screen every single action of the script involve a waste of time ?
Thank you !
0 -
Hello,
to stop update graphic you can set off by *entityhighlighting, hm_setmouse
0