How to create an add-on for Antidoc
The LabVIEW Toolkit Manual is probably the best project to glance at to see how to implement an add-on for Antidoc. |
Steps to create the add-on project
-
Create and save a blank project
-
Add a library to the project
-
Add a class to the library
-
Make this class inherit from
Document Type
-
Add a class to the library
-
Make this class inherit from
Config
To change the inheritance the parent class must be in memory. Load the |
-
Override the required functions
Interface call order in Antidoc
To understand how to override functions you need to understand how Antidoc is going to call the add-on code.
The following picture shows the call sequence (/labview-doc-generator/Sources/Tool/Generate Project Documentation.vi
).
1 | Open the select add-on dialog |
2 | Update the config object |
3 | Check if the add-on configuration is valid - SHOULD BE OVERRIDE |
4 | Init the document creation - SHOULD BE OVERRIDE |
5 | Parse the source of the documentation - MUST BE OVERRIDE |
6 | Compose the final document - MUST BE OVERRIDE |
7 | Release anything used during the documentation creation - SHOULD BE OVERRIDE |
8 | Define the general documentation information - SHOULD BE OVERRIDE |
9 | Save the configuration on disk to load it the next time the Antidoc UI is open |
Purpose of Override Functions in Antidoc
The classes in the Blocs
folder of the add-on project represent the sections of the document, and each of these inherits from Antidoc’s bloc class.
-
Render.vi
(override VI) in each bloc class should put content into the blocs, formatted using AsciiDoctor functions
Additionally
-
Parse.vi
in<add-on name>.lvclass
is where the information for the content is read in (e.g. from LabVIEW/ TestStand file ref) -
Compose.vi
is for adding blocs into sections and organising the different sections