<< 点击显示目录 >> 主页 mappView帮助助手 > mapp View帮助信息 > Widgets > Motion > MotionPad > Concept > Working with widget "MotionPad" |
This section explains how to use widget MotionPad in the browser.
CNC programs (G-code) can be loaded, created, edited, deleted, copied, etc. Using Keyboard shortcuts makes it easier to work with the editor.
To interact with widget "MotionPad", you must use a hardware keyboard or set property "keyboard" to true.
Action "OpenFileExplorer" can be used to open CNC programs.
The action can be enabled by clicking on a button. In this example, button "OpenExplorer" was added:
The following binding can be used for the button:
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="MyContent" widgetRefId="OpenExplorer" event="Click" />
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.MotionPad.Action" contentRefId="MyContent" widgetRefId="MyMotionPad" >
<Method xsi:type="widgets.brease.MotionPad.Action.OpenFileExplorer" />
</Target>
</Action>
</EventHandler>
</EventBinding>
If the file browser is to be opened in the browser using the button, the desired data storage device must first be selected by using the button marked in red below:
If the specified storage medium is not available, this is indicated in the window using the following icon:
All existing files (G-code programs) are then listed. A file can be selected and loaded. The contents of the file are displayed in widget "MotionPad".
The opened program (or even a new program) can then be edited as desired. Lines can be deleted, copied, added, etc. The shortcuts described in section Keyboard shortcuts can be used for this purpose.
For example, you can search for words using Ctrl+F:
If the program was edited in the editor, it can be saved. Actions "Save" or "SaveAs" can be used for this purpose. For more information about actions, see here.
In the following example, action "SaveAs" is used. A new button "SaveProgramAs" is also used.
The following binding can be made:
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="MyContent" widgetRefId="SaveProgrammAs" event="Click" />
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.MotionPad.Action" contentRefId="MyContent" widgetRefId="MyMotionPad" >
<Method xsi:type="widgets.brease.MotionPad.Action.SaveAs" />
</Target>
</Action>
</EventHandler>
</EventBinding>
If you click on the button in the browser, a file explorer appears in which the name of the file can be specified:
If an error occurs while using widget "MotionPad" (e.g. opening a file although access is not allowed), the error appears using action "OnError".
Additional information is also available in the Logger. This information is entered by mapp File.