config.xml Native Macro - pytha-3d-cad/pytha-lua-api GitHub Wiki
A "Native Macro" extension allows you to customize the CAM output for my-macros (selected CAM systems).
Declaration of a native macro extension in the config.xml:
<extension type="cam-native-macro">
<entry-point>customize_macro</entry-point>
<id>Macroname</id>
<cam-system>bsolid_cix</cam-system>
</extension>The following information can be supplied:
-
entry-point- (Mandatory) Name of the lua function that is invoked when the my-macro is exported -
id- (Mandatory) Exact name of the my macro -
cam-system- Identifier of the CAM system. The following ones are supported: "bsolid_cix"
The entry-point is invoked with one argument
customize_macro(macro)| Parameter | Type | Description |
|---|---|---|
macro |
table |
A table containing the macro parameters as they appear in the output. Parameters may be changed, added or removed (i.e. set to nil) |
To change the CAM output for the my macro, change the content of the macro table.
There is no return value.
E.g. the following code adds a "TOOL" parameter
function customize_macro(macro)
MACRO.TOOL = "S29"
endconfig.xml, Function Extension, Edit Extension, Anatomy of a Lua Api Plugin