Contents
- Index
Dynamic G Code
With dynamic G Code insertion, clicking on the appropriate icon results in a dialog being displayed. Once the dialog is successfully executed, the block of code is inserted after the current cursor line position.



The CSFCgTemplates.XML node <Item> that defines this dynamic dialog:
<Folder>
<folder_name>Mill 2</folder_name>
<Items>
.
.
.
<Item>
<item_name>mywidget</item_name>
<item_type>pyscript</item_type>
<item_text>import mywidget; myDialog = mywidget.createMove()</item_text>
<item_imageidx>25</item_imageidx>
</Item>
.
.
.
<item_name>mywidget</item_name>
This defines the icon name displayed in the user interface.
<item_type>pyscript</item_type>
This defines this element as a dynamic dialog.
<item_text>import mywidget; myDialog = mywidget.createMove()</item_text>
This is the script that is passed to the python interpreter, it imports module mywidget (file mywidget.py) and then creates the dialog ( myDialog = mywidget.createMove()).
CodeSharkFCs expects to find the python script file in the same directory as the CodeSharkFCs executable file.
See Dynamic G Code Dialog Creation for more information.
<item_imageidx>25</item_imageidx>
This element defines the image displayed in the user interface. It is an index into a delphi imagelist.
See CSFCgTemplates.XML File for more information.
G Code Templates
Home