|
CNCSIMULATOR.COM |
|
|
Home CncSimulator Info Downloads Petrol Station Support Developers Corner User Forum Products |
![]() |
DEVELOPERS CORNER
Interpreter development:
See the Interpreter page
|
Plugin development: Here is a description of how to use the CncSimulator Plug-in SDI in Microsoft Visual C++
#include "\msdev\Projects\CncSimPluginInterface\cncsimplugin.h"
\msdev\Projects\ CncSimPluginInterface\cncsimplugininterface.lib
Note! There is a debug library to use when debuging.
The name of it is cncsimplugininterface_d.lib. There is also a testprogram that
you can use when testing and debugging your plugin. The name of this program is
'PluginTest.exe'. A good idéa is to copy the plugintest.exe to your debug folder
and the enter its name under 'program settings' - 'debug' - 'executable for
debug session'.
EXTC DLL_DECL int MyFunc() { AFX_MANAGE_STATE(AfxGetStaticModuleState()); AfxMessageBox(“Hello World!”); return 0; } ENDEXTC
CMyPluginApp:: CMyPluginApp () { addDLLfunc("MyFunc","My Plug-in"); // note: one for each exported function }
CMyPluginApp::~ CMyPluginApp () { PluginCleanUp(); // this is important! }
The SDI also contains two functions for getting and returning CNC buffer data to and from the CncSimulator.
To get the active CNC code from the simulator, create an CString object and call the getInBuffer function with it.
Then you can manipulate the data and send it back using the sendBackData function.
DLL_DECL void getInBuffer(CString &data); data the cncbuffer
DLL_DECL void sendBackData(CString &data, double x=0, double y=0, double z=0, double inx=0, bool rad=false, bool turn=false , bool paste=false, bool partsize=false);
|
Remember to share your
great plug-in with others! You can mail it with a brief description to
staff@cncsimulator.com and we will put it up on
our webpage together with your name. You may also consider posting information
about your plug-in in the user forum for others to see.
| Home | Info | Downloads | Petrol | Using inch | Support | Developers | Forum | Products |