Page 1 of 2

MDI Command Log

PostPosted: Tue Jun 19, 2018 9:47 pm
by pupdogg
It would be useful to have a clickable button to the right of the MDI field for end users to access a clearable buffer of previously entered MDI commands so that they don't have to fully type them out again. Pls see attached. In the past, I used a variant of LinuxCNC called CommandCNC and it had this feature. It was extremely useful and a time saver. Thank you in advance!

Re: MDI Command Log

PostPosted: Wed Jun 20, 2018 12:02 am
by Derek
That one looks like it is a drop down menu which would be amazing to have. There is weirdness for sure when I arrow through the MDI. Seems like if I go one direction then back the MDI I had just typed in disappears.

Re: MDI Command Log

PostPosted: Wed Jun 20, 2018 6:24 am
by cncdrive
Yes, the MDI makes an invisible log just for the current run and when you accessing the MDI and moving the up/down arrows you can select the previously types in g-code lines.
Making a dropdown list would be also possible for us to develop, but it is not as easy as it seems, because UCCNC is using OpenGL for drawing, so drawing things is not as easy as placing a windows control on the screen. And the other bigger issue I see is that currently the toolpath view is a separate control, so we can't draw GUI items on top of it and so if a toolpath view is above the MDI in a sceenset then what we draw there would not be seen, e.g. the dropdown list would not be seen, it would dissapear behing the toolpath view control.
We could change the toolpath view, could make it in the same control as the main GUI, but the issue is that it would require newer OpenGL version and we already learnt that some people want to use ancient computer hardwares. And moving from OpenGL 1.5 to 2.0 would be required to do that... so, for now we do not want to do that change.

Re: MDI Command Log

PostPosted: Wed Jun 20, 2018 1:35 pm
by Dan911
I think this plugin is useless since I'm very happy with the MDI scroll log UCCNC provides. Only posting to show if you find a feature in another controller UCCNC don't have it provides the tools to create it in most cases.

MDI.JPG
MDI.JPG (22.54 KiB) Viewed 15679 times


Check Enable in Configure Plugins.
Create a button and give it button # 7222

MDI.rar.zip
(5.01 KiB) Downloaded 873 times

Re: MDI Command Log

PostPosted: Wed Jun 20, 2018 1:59 pm
by Dan911
The MDI log file is not accessible in plugin either, I just created my own log file.

Dan

Re: MDI Command Log

PostPosted: Wed Jun 20, 2018 2:05 pm
by cncdrive
OK, I've added these 3 functions. They will be available in the next release:

Function: List<string> Getlist(int labelnumber)
Description: This function returns all items of a screen list. The return type is a list of strings.
Example: List<string> mylist = AS3.Getlist(2);

Function: List<string> GetMDIhistory()
Description: This function returns all items previously typed into the MDI control.
Example: List<string> mylist = AS3.GetMDIhistory();

Function: void ClearMDIhistory()
Description: This function clears the MDI history list.
Example: AS3.ClearMDIhistory();

Re: MDI Command Log

PostPosted: Wed Jun 20, 2018 2:15 pm
by Dan911
Vmax549 wrote:Hi Dan, Did you use an onclick() or a ontype() function to gather data for teh MDI log ??

Not being a programmer I rarely dive into teh plugin side unless it is absolutely needed :roll:

(;-) TP



//Called when the user enters text into the Textfield and it gets validated
//The labelnumber parameter is the ID of the accessed Textfield
//The bool Ismainscreen parameter is true is the Textfield is on the main screen and false if it is on the jog screen.
//The text parameter is the text entered and validated by the user
public void Textfieldtexttyped_event(int labelnumber, bool Ismainscreen, string text)
{
if (Ismainscreen)
{
if (labelnumber == 1000)
{

}
}
}

Re: MDI Command Log

PostPosted: Wed Jun 20, 2018 2:20 pm
by dezsoe
Hi Balázs,

That's nice! Will it be available also in plugins?

Re: MDI Command Log

PostPosted: Wed Jun 20, 2018 2:23 pm
by Dan911
dezsoe wrote:Hi Balázs,

That's nice! Will it be available also in plugins?


+1

Re: MDI Command Log

PostPosted: Wed Jun 20, 2018 2:29 pm
by cncdrive
Hi Dan,

Yes, I've added them also to the plugininterface.