Command Reference : Programming Language Reference
Register a program file as an EViews Add-in.
addin(options) [path\]prog_name
registers the specified program file as an EViews Add-in. Note that the program file should have a “.PRG” extension, which you need not specify in the prog_name.
If you do not provide the optional path specification, EViews looks for the program file in the default EViews Add-ins directory.
Explicit path specifications containing “.\” and “..\” (to indicate the current level and one directory level up) are evaluated relative the directory of the installer program in which the addin command is specified, or the EViews default directory if addin is run from the command line.
You may use the special “<addins>” directory keyword in your path specification.
Specify the Add-ins type, where arg is the name of a EViews object type. The default is to create a global Add-in.
Specifying an object-specific Add-in using a matrix object as in “type=matrix”, “type=vector”, etc. will register the Add-in for all matrix object types (including coef, rowvector, and sym objects).
Sample objects do not support object-specific Add-ins so that “type=sample” is not allowed.
User-defined command/procedure name. If omitted, the Add-in will not have a command form.
Text for the Add-in menu entry. If omitted, the Add-in will not have an associated menu item.
Note that you may use the “&” symbol in the entry text to indicate that the following character should be used as a menu shortcut.
Brief description of the Add-in that will be displayed in the Add-ins management dialog.
Path and filename for the Add-in documentation. Determination of the path follows the rules specified above for the addin filename.
addin(proc="myaddin", desc=”This is my add-in”) .\myaddin.prg
registers the file “Myaddin.prg” as a global Add-in, with the user-defined global command myaddin, no menu support, and no assigned documentation file. The description “This is my add-in” will appear in the main Add-ins management dialog. Note that the “.\” indicates the directory from which the program containing the addin command was run, or the EViews default directory if addin is run interactively.
addin(type="graph", menu="Add US Recession Shading", proc="recshade", docs=".\recession shade.txt", desc="Applies US recession shading to a graph object.") .\recshade.prg
registers the file “Recshade.prg” as a graph specific Add-in. The Add-in supports the object-command recshade, has an object-specific menu item “Add US Recession Shading”, and has a documentation file “Recession shade.txt”.
addin(type=equation, menu="Simple rolling regression", proc=roll, docs="<addins>\Roll\Roll.pdf", desc="Rolling Regression - simple version") "<addins>\Roll\roll.prg"
registers the Add-in file “Roll.prg” as an equation specific Add-in. Note that the documentation and program files are located in the “Roll” subdirectory of the default Add-ins directory.
See “Registering an Add-in” for further details.