Update Custom Reports Manually - Intergraph Smart P&ID - 10 - Help - Intergraph

Intergraph Smart P&ID Help

Language
English
Product
Intergraph Smart P&ID
Search by Category
Help
Smart P&ID Version
10
Smart Engineering Manager Version
11
SmartSketch Version
10.0(2018)

From Version 2019, the VBA code was updated for all shipped reports in accordance with the software migration to .NET. In order to make a similar update for your custom reports, this procedure explains how to enable custom reports by updating the VBA code manually.

  1. Open the desired Excel report template.

  2. Display the Microsoft Visual Basic environment by pressing ALT + F11.

  3. In the Project pane, under Microsoft Excel Objects, select ThisWorkbook.

    ExcelWorkbookVBA

  4. Locate the function Public Sub RunWorkbook() and rename this function Public Sub RunWorkbookEX().

    If your custom report came from an earlier version of Smart P&ID which did not include the Public Sub RunWorkbook() function, skip the rest of this procedure, and instead, copy the entire Public Sub RunWorkbookEX() function at the end of ThisWorkbook. The function appears in step 4 of the topic Improve the Performance of Custom Reports.

  5. In this function, replace the following line of code:

    Set objRunWorkBook = CreateObject("RunWorkBook.clsRunWorkBook")

    with:

    Set objRunWorkBook = CreateObject("RunWorkBook2019.clsRunWorkBook")

  6. Save your changes and close Excel.