Hello Guest it is April 19, 2024, 11:07:27 AM

Author Topic: Getting text input to show in control in screen (VB people will echo)  (Read 1925 times)

0 Members and 1 Guest are viewing this topic.

As seasoned VB programmer I was HOPING I can find suitable controls on user screen, but found just few, or I can't find other.
I have text strings coming over RS-232 comm with MACH using VB macro, and I wish to see them on the screen, like in VB textbox, label, and other textual controls.
I can't find "user controls", such as LABEL with ref num, so I can direct text from the macro to that label (or text box).
LABEL seems to ask for explicit text and has no ref number, same for DRO (fixed ref to some functions), couldn't find other text-looking controls.
To make it clear:
If i get text string like "ABC" into string variable in VB like ST, I wish to direct it to my control. LIke in VB I can send it to my textbox like text1.text=ST

It doesn't exists or I just didn't find it?

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Getting text input to show in control in screen (VB people will echo)
« Reply #1 on: August 06, 2018, 11:28:58 AM »
you have to use in Screen a Label with description Userlabel10 (just an example).


in VBScript you have to set userlabel like:

myString="hello world"

SetUserLabel(10, myString)
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Getting text input to show in control in screen (VB people will echo)
« Reply #2 on: August 06, 2018, 01:32:54 PM »
"with description Userlabel10"... Description WHERE???
The only options for label are:
- Global (Y/N)
- Label (expects explicit text)
- Locked for mouse (Y/N)

I don't see how to assign any variable to the label.
Your suggestion is exactly what I was looking for.

Thanks.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Getting text input to show in control in screen (VB people will echo)
« Reply #3 on: August 09, 2018, 12:43:38 PM »
text = userlabelXX
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Getting text input to show in control in screen (VB people will echo)
« Reply #4 on: August 09, 2018, 02:14:41 PM »
Where does the XX go? :-\
I don't see a place for ## on the label,
Thanks.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Getting text input to show in control in screen (VB people will echo)
« Reply #5 on: August 09, 2018, 03:13:38 PM »
The number is part of the name.
See page 20 (3-6) here:
http://www.machsupport.com/wp-content/uploads/2013/02/Mach2_6.11_Custom.pdf
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Getting text input to show in control in screen (VB people will echo)
« Reply #6 on: August 10, 2018, 10:48:15 AM »
Many thanks. It works.
(Not immediate or intuitive to VB folks, who expect the "name" to be one thing and the text ("caption") another.)
This is my first attempt in modifying Mach. The manual you sent was was unknown to me, not mentioned in Mach site or I missed it.
All is now well, my ATC works great with MACH3. 

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Getting text input to show in control in screen (VB people will echo)
« Reply #7 on: August 10, 2018, 11:04:49 AM »
It's on the Machsupport site under Mach2 manuals.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html