Addon.AddOtherItem
 
 
 

Addon.AddOtherItem

Description

Adds an 'Other' type of file to the add-on package. You can add any type of file to the add-on package using this method, but typically you would add support files such as HTML, help, text, and graphic files.

The file is installed in the subdirectory specified by the in_bstrDestination parameter. For example, if the file is "C:\temp\MyAddonHelp.html", the destination is "\help", and the addon is installed in "\\server1\workgroup\Addons\MyAddOn" then foo.txt will be found at "\\server1\workgroup\Addons\MyAddon\help\MyAddonHelp.html".

Note: You can add items only when you create an add-on package through scripting. After you create a package, you cannot edit it or add more items to it, except through the user interface (File > Add-on > Edit).

C# Syntax

Addon.AddOtherItem( String in_bstrFilename, String in_bstrDestination );

Scripting Syntax

Addon.AddOtherItem( in_bstrFilename, [in_bstrDestination] );

Parameters

Parameter Type Description
in_bstrFilename String Full path of the file to add.
in_bstrDestination String A subdirectory name. The file will be installed in the specified subdirectory of the add-on installation directory.

Default Value: The add-on installation directory (for example, siAddonPath)

Examples

VBScript Example

'
' This example shows how to add an HTML file to the add-on package.
'
NewScene , false
set oAddOn = Application.CreateAddon
' Add an HTML file (taken here from one of the installed synoptic pages) to the add-on package
oAddOn.AddOtherItem XSIUtils.BuildPath( _
        Application.InstallationPath( siFactoryPath ), _
        "Data", "XSI_SAMPLES", "Synoptic", "Rig", "BoxBipedSynoptic.htm"  _
)
' Save the package in the Addons directory
oAddOn.Save XSIUtils.BuildPath( _
        Application.InstallationPath( siUserAddonPath ), _
        "InstalledAddons", "myAddOn.xsiaddon" _
)