Plugin structure

Top | Previous | Next

 

Let's take a quick look at the structure of a typical Assembly Copier plugin. This simple plugin modifies component file names by prefixing them with "Copy_".

Add-On Code example

 

1.

First of all, the plugin class to be created uses Assembly Copier functions which must be declared as Assembly Copier libraries.

2.

Definition of a plugin class.

The class itself declares two text variables:

Display Name

Description

 

These variables carry information that appears in the drop-down list of registered plugins.

Add-On Display Name and definition

 

3.

The plugin must include the Init method. This method is interpreted by the Assembly Copier program and populates the Context data tree. This variable contains all the information about the assembly that the Assembly Copier has collected during its operation.

4.

A user-created function call has to be performed in the class. As an argument, the NamingShemes collection of the Context object is passed to the function.

5.

The user-created function itself is declared below. It is in this function that the recursive traversing of the tree is performed and the user-defined logic of how and what properties the user will change is implemented.