Hi Tom,
I would like to use a message input box in one of my programs but would like to preload the drop down list with a series of numbers like .1, .2 .3 etc.
The message box pops up in my program but the drop down is empty. I can type in a number and the program continues on successfully. Is there a simple way to load the drop down with the same numbers everytime?
Jack
Using a Message Input Box
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Using a Message Input Box
Hi Jack,
Here is a patch for Version 5.3.6 to allow the drop down values to be specified separated by ';'. Copy to the \KMotion\Release folder.
KMotionCNC.exe
Modifed source code:
SetValue.cpp
Example
Please let us know if it works for you.
Here is a patch for Version 5.3.6 to allow the drop down values to be specified separated by ';'. Copy to the \KMotion\Release folder.
KMotionCNC.exe
Modifed source code:
SetValue.cpp
Example
Code: Select all
#include "KMotionDef.h"
#define TMP 10 // which spare persist to use to transfer data
#include "KflopToKMotionCNCFunctions.c"
main()
{
float value;
// Ask Operator desired rotation angle with drop down values specified
if (!InputBox("Enter Angle in degrees;45.0;90.0;10.0",&value))
{
printf("value = %f\n", value);
}
}
Please let us know if it works for you.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Using a Message Input Box
Hi Tom,
The patch was a bust. When I loaded the patch (KmotionCNC.exe) my machine started behaving strangely. If I raised the Z axis as soon as I release the up arrow the Z would turn around and return to where it was before I pressed the up arrow. When I pressed the up arrow then the left arrow disaster struck. The Y returned to it's start position but the Z just kept moving down. Hitting the EStop had no effect. The bit went into the table before I could kill power. The good news is my table is MDF so the engraving bit was not harmed. I tried reflashing the Kflop but that didn't help. Going back to the original KmotionCNC everything worked correctly again.
I wasn't sure what to do with the SetValue.cpp. I copied it to the Kmotion\Release sub-directory. Obviously the InputBox dropdown list is still not working.
Jack
The patch was a bust. When I loaded the patch (KmotionCNC.exe) my machine started behaving strangely. If I raised the Z axis as soon as I release the up arrow the Z would turn around and return to where it was before I pressed the up arrow. When I pressed the up arrow then the left arrow disaster struck. The Y returned to it's start position but the Z just kept moving down. Hitting the EStop had no effect. The bit went into the table before I could kill power. The good news is my table is MDF so the engraving bit was not harmed. I tried reflashing the Kflop but that didn't help. Going back to the original KmotionCNC everything worked correctly again.
I wasn't sure what to do with the SetValue.cpp. I copied it to the Kmotion\Release sub-directory. Obviously the InputBox dropdown list is still not working.
Jack
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Using a Message Input Box
Hi Jack,
Sorry for the problem. GCodeInterpreter.dll needs to be updated also. Copy to the \KMotion\Release folder.
Make sure you are running Version 5.3.6.
GCodeInterpreter.dll
Sorry for the problem. GCodeInterpreter.dll needs to be updated also. Copy to the \KMotion\Release folder.
Make sure you are running Version 5.3.6.
GCodeInterpreter.dll
You don't need this unless you need to re-compile KMotionCNC.exe. If so, it would replace the SetValue.cpp in folder \PC VC Examples\KMotionCNCI wasn't sure what to do with the SetValue.cpp.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Using a Message Input Box
HI Tom,
That was it. The new DLL file fixed the rubber band effect I was having and the drop down is working!!
Happy Thanksgiving.
Jack
That was it. The new DLL file fixed the rubber band effect I was having and the drop down is working!!
Happy Thanksgiving.
Jack