Register a program file as an EViews Add-in.
Syntax
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.
Options
type=arg | 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. |
proc=arg | User--defined command/procedure name. If omitted, the Add-in will not have a command form. |
menu=arg | 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. |
desc=arg | Brief description of the Add-in that will be displayed in the Add-ins management dialog. |
docs=arg | Path and filename for the Add-in documentation. Determination of the path follows the rules specified above for the addin filename. |
version=arg | Version number of the Add-in. If no version number is supplied, EViews will assume version 1.0. |
url=arg | Specify the location of an XML file containing information on the Add-in used for updating the Add-in to the latest version. If not supplied, EViews will default to an XML file hosted on the EViews website. |
nowarn | Removes the prompt warning that an add-in already exists with the same name (and forces an overwrite of that add-in). |
Examples
addin(proc="myaddin", desc="This is my add-in", version="1.0") .\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. The version number is “1.0”. 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", url="www.mysite.com/myaddins.xml", version="1.2") "<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. The XML file located at www.mysite.com/myaddins.xml is used when checking for available updates for the Add-in, and the current version number is set to “1.2”.
Cross-references
See
“Add-ins” for a detailed discussion of Add-ins.