You can develop custom functions for use in retrieve mappings when you want to transform published data in some manner. For example, a custom function could be created to convert SI units to imperial units.
-
Create a custom function, as detailed in the ReadMe.txt file in the SPC_CustomRetrieveMapFunction folder.
-
Browse to [Drive]:\Program Files\SmartConstruction\Customization\Samples\SPC_CustomServerHandlers\SPC_CustomRetrieveMapFunction\SPC_CustomRetrieveMapFunction.
-
Check out and open the SPCRetrieveMappings.xlsm workbook.
-
Type the function call in the EFProperty column, using the syntax [Property definition]:FUNCTION([Function name], [Argument]).
-
If including arguments, separate each argument with a comma.
-
A property definition is optional. If you are not specifying a property definition, use the syntax FUNCTION([Function name], [Argument]).
-
-
Save changes to the SPCRetrieveMappings.xlsm workbook.
-
Select the Main tab of the worksheet.
-
Click Generate Retrieve Mapping to generate a new XML file.
-
Check in and sign off the file in the SmartPlant Foundation Desktop Client.
-
Retrieve data in Smart Construction and execute the function.