Creating a custom operation
Objectives
- Create a new operation type with settings.
Practical part
Order of actions:
- Open the repository in our GitHub account and clone it.
- Find the directory
Operation\ExtensionOperationSimpleNet- this is what you will base your new extension on. - Pay attention to:
- XML-file
project\main\OperationSimpleNet.xml- this file contains the operation settings:- Settings that allow ENCY to understand that the tool path calculation is handled by an external extension;
- Operation settings that the user can configure in the UI;
ContainerIDcannot be changed;SolverIDcontains value, which will be later provided intoExtensionFactory.Create;
ExtensionFactory.cs:- Methods
OnLibraryRegisteredandOnLibraryUnRegistered- they edit the globalUserOperationsList.xml, which contains custom operations.
- Methods
- The tool path calculation is performed in a subthread, and .NET only allows working with COM objects created in the same thread. Therefore, you should avoid declaring the properties of
ExtensionOperationSimpleNetinRunInitialize.
- XML-file
- Modify main.cpp (optional). You can write your own code using the API - there are no restrictions.
- Call task 'Pack', which will create
*.dextfile - execute it. This action must be performed the first time - only then will the globalUserOperationsList.xmlbe edited. It will add the path tobin\Release\OperationSimpleNet.xml. - Restart ENCY to update list of available operation types;
- Click to add new operation. It should be located in the group specified in the XML file under the
MultiGroupnode. If it’s not there, check withunavailable operationsspecified. - Click
generate toolpathon the new operation.