OnEndFileExport (XSIApplication)
Description
Fired after that an XSI file is exported as a result of a command such as ExportModel. This is valid for Model (.emdl), dotXSI (.xsi), mixer (.mixer), IGES (.iges) and material library (.matlib)
This event is installed using the XSIApplication.Advise method and can be removed using the XSIApplication.Unadvise method, please see these methods for a detailed example of installing and uninstalling events.
The event may be temporarily muted via the EventInfo.Mute property. All installed events can be viewed in the plugin manager dialog's event tab.
NOTE: The prefered and alternative method of installing this is event is as a self-installing plugin. See PluginRegistrar.RegisterEvent method for more details.
Scripting Syntax
XSIApplication.OnEndFileExport ([CustomData], [Input], [FileName], [FileType])
Parameters
Parameter |
Type |
Description |
CustomData |
Variant |
Custom data passed to the event handler. This argument is optional; you can specify one when binding an event with XSIApplication.Advise. The data is passed to the event handler whenever the event is fired, an empty value is passed if no custom data is specified. |
Input |
IDispatch |
The Model that is exported or any other input exported. |
FileName |
String |
The destination filename. |
FileType |
siFileType |
The type of file to import. The supported types are: siFileTypeModel, siFileTypedotXSI, siFileTypeMixer, siFileTypeIGES, siFileTypeMatLib |
Examples
1. VBScript Example
sub XSIApplication_OnEndFileExport( CustomData, Model, FileName, FileType ) logmessage "*** VBScript event - XSIApplication_OnEndFileExport: ***" ' your code here ' return consumed status in return code end sub
2. JScript Example
function XSIApplication::OnEndFileExport( CustomData, Model, FileName, FileType )
{
Application.LogMessage( "*** JScript Event - XSIApplication::OnEndFileExport ***");
// your code here
// return consumed status in return code
return 0;
}
3. PerlScript Example
sub XSIApplication_OnEndFileExport
{
my ($CustomData, $Model, $Filename, $FileType) = @_;
$Application->LogMessage( "*** PerlScript Event - XSIApplication_OnEndFileExport ***" );
# your code here
# return consumed status in return code
return 0;
}
4. Python Example
def XSIApplication_OnEndFileExport( CustomData, Model, FileName, FileType): # XSI will return a raw PyIDispatch for object model items. This # object needs to be wrapped in a dynamic dispatch before use. import win32com.client.dynamic Model = win32com.client.dynamic.Dispatch(cModel) Application.LogMessage( '*** PythonScript Event - XSIApplication_OnEndFileExport(%s) ***'%(Model.Name,) ) # your code here # return consumed status in return code return 0
See Also
PluginRegistrar.RegisterEvent |
|||
XSIApplication.EventInfos |
|