Move Custom DLLs to SharedContent Folder - Intergraph Smart 3D - Reference Data

Intergraph Smart 3D Molded Forms Reference Data

Intergraph Smart 3D
Reference Data
10.1 (2014 R1)

Custom DLLs are any DLLs that are not originally delivered with Smart 3D or delivered DLLs that have been modified by you to suit a specific purpose. Custom DLLs should be saved in the [Reference Data Folder]\SharedContent\Custom Symbols folder on your SharedContent share. Use the following workflow to copy your customized DLLs to this single location instead of registering each DLL on all client computers.

  1. Recompile each Visual Basic project in a Version 2014 R1 (10.1) client installation.

  2. Copy the new DLLs to the [Reference Data Folder]\SharedContent\Custom Symbols folder.

    • You can create hierarchy folders as needed under the Custom Symbols folder.

    • If a custom DLL has a localizer DLL, both files should be located in the same folder.

    • DLLs ending with "–Ref.dll" or "_Ref.dll" are treated as reference DLLs and are ignored. These DLLs do not need to be copied from the client machine containing the rules Visual Basic source code.

  3. In the Project Management task, select a catalog that uses the SharedContent folder in which your custom DLLs are located.

  4. Click Tools > Update Custom Symbol Configuration, or right-click the catalog node, and select Update Custom Symbol Configuration.

    The Update Custom Symbol Configuration Dialog Box displays.

    Update Custom Symbol Configuration creates or updates the CustomSymbolConfig.xml in the [Reference Data Folder]\SharedContent\Xml folder. CustomSymbolConfig.xml contains entries with the ProgID, CLSID, and DLL name for each class in the custom DLLs. After CustomSymbolConfig.xml is created, the software uses the custom DLLs from the [Reference Data Folder]\SharedContent\Custom Symbols folder without needing to register the DLL on the local computer.

  5. Click OK to begin processing.

    After you click OK, the options and commands on the dialog box are unavailable. This is to prevent you from interrupting the update process. The status bar at the bottom of the dialog box displays a message that the software is updating the symbol mapping file. When processing completes, the status bar shows whether the process finished with or without errors.

  6. Click View log files to open the log file in your default text editor, and review the results.

  7. Click Close to exit the dialog box.

  • The software searches [Reference Data Folder]\SharedContent]\Xml\CustomSymbolConfig.xml first and then SystemSymbolConfig.xml. If there are duplicate entries in CustomSymbolConfig.xml and SystemSymbolConfig.xml for the same ProgID, an error or warning is written to the error log that appears when the Update Custom Symbol Configuration command finishes processing, and the DLL is not added to either XML file (CustomSymbolConfig.xml and SystemSymbolConfig.xml). Please clear any errors or warnings that appear in the error log after running this command to prevent such a scenario.

  • Whenever a symbol or naming rule class is accessed, the software searches for the DLL as follows:

    1. It checks whether an entry for the ProgID exists in the xml files. If an entry exists, then the corresponding DLL is loaded, and an instance of the class is created.

    2. If an entry does not exist, it searches previously registered DLLs on the local computer.

    3. If any entry is not found for the ProgID in either XML file, and the DLL is also not registered on the local machine, the software returns an error. In this case, you should copy the DLL to the [Reference Data Folder]\SharedContent\Custom Symbols folder and run the Update Custom Symbol Configuration command in Project Management.

      If an entry exists for a ProgID in the xml files, it is used even though another or the same copy of the DLL is registered on the local machine. The order of priority when creating an instance of an object is: CustomSymbolConfig.xml, SystemSymbolConfig.xml, and then the registry.

  • When a new custom DLL is added to the [Reference Data Folder]\SharedContent\Custom Symbols folder or an existing custom DLL is modified, you must re-run the Tools > Update Custom Symbol Configuration command in Project Management.

  • If you choose to use option 1, then the custom DLLs in the [Reference Data Folder]\SharedContent\Custom Symbols folder should not be registered on the local computer.

  • If any of these components use helper classes, and the helper classes are instantiated by calling "CreateObject," the "CreateObject" needs to be replaced. If the helper class is in the same project, then "new" can be used instead of "CreateObject". If the helper class is in a different project, then "SP3DCreateObject" needs to be used, instead of "CreateObject". SP3DCreateObject tries to instantiate the object using the information in xml files. If no entry is found in xml files for the given ProgID, then it calls "CreateObject," SP3DCreateObject is implemented in [Product Folder]\Core\Runtime\SP3DCoCreateInstance.dll. When SP3DCreateObject needs to be used, [Product Folder]\Core\Runtime\SP3DCoCreateInstance.dll needs to be referenced in the Visual Basic project. Example usage of SP3DCreateObject is shown below:

    Set oHelperObject = SP3DCreateObject(strHelperProgId)

  • If the symbol class has any public structures or types, they should be made private. For example:

    Public Type InputType

    Name As String

    Description As String

    Properties As IMSDescriptionProperties

    uomValue As Double

    End Type

  • Should be changed to:

    Private Type InputType

    Name As String

    Description As String

    Properties As IMSDescriptionProperties

    uomValue As Double

    End Type

  • Debugging and maintaining Visual Basic project references, reference DLLs, and binary compatibility are beyond the scope of this document. Contact your Intergraph Support representative if you have questions.