config.xml Function Extension - pytha-3d-cad/pytha-lua-api GitHub Wiki

A Function extension supplies a button in the PYTHA user interface. The user can invoke the function by pressing that button.

Declaration of a function extension in the config.xml:

<extension type="function">
    <entry-point>main</entry-point>
    <caption>Text of the Button</caption>
    <description>A short description of the function goes here.</description>
    <help-file>help.html</help-file>
</extension>

The following information can be supplied:

  • entry-point - (Mandatory) Name of the lua function that is invoked when the user presses the button.
  • caption - (Mandatory) The text that is displayed on the button. This text is translatable in the .xlif file.
  • description - A short descriptive text that is displayed when the user hovers over the button with the mouse. This text is translatable in the .xlif file.
  • help-file - The name of a help file (should be .html or .pdf or .txt). This file is opened when the user right-clicks on the button and invokes help. This name of the file is translatable in the .xlif file if separate help files are supplied for different languages.

The entry-point is invoked without any arguments

main()

See also:

config.xml, Edit Extension, Attribute Extension, Anatomy of a Lua Api Plugin, Localization and Translation

⚠️ **GitHub.com Fallback** ⚠️