Overriding the SmartConverter - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

Sometimes it is necessary to override the SmartPlant Foundation Server code that launches the SmartConverter. For example, you may need to preprocess the input file before it is converted. To do this create an assembly with the interface ISPFNavigationFileComposition1 (that inherits ISPFNavigationFileComposition), and then override the MethodDef OnConvertFileForNavigation.

Function OnConvertFileForNavigation(ByVal pstrInputFile As String, ByVal pstrOutputFile As String, ByRef rstrGraphicsMapFile As String) As Boolean

This MethodDef is called after the file has been copied from the vault to be converted. The default implementation simply calls the SmartPlant Foundation SmartConverter. The customized code can preprocess the unconverted file and then call MyBase.OnConvertFileForNavigation to convert the file.