Save Free Text in Registered Reports - Intergraph Smart Electrical - Help - Hexagon

Intergraph Smart Electrical Help

Language
English
Product
Intergraph Smart Electrical
Search by Category
Help
Smart Electrical Version
10

You can add free text (text that is not part of engineering data that is kept in your Smart Electrical database) to any registered report that uses the fixed format option. This is especially useful with data sheet type reports. Retaining free text becomes possible after enabling a special Excel add-in the report templates. Note that you have to enable this add-in for the template of each registered report that will have free text.

After archiving a registered report, the software retains the free text and the smart data with every revision. This way, each revision can have different free text.

Prior to carrying out the following procedure, you have to select the Trust access to VBA project object model check box in your Microsoft Excel Options. To do this, in Excel Options, select Trust Center > Trust Center Settings > Macro Settings > Trust access to VBA project object model.

The following procedure provides the instructions for enabling this special Excel add-in and saving the free text.

  1. On the Smart Electrical menu bar, select Reports > Edit.

  2. Select the template that you require and select Open.

  3. For existing reports, add the following VB code in the report template:

    1. In the report template (Microsoft Excel), press Alt+F11.

    2. Under VBAProject, double-click ThisWorkbook.

    3. In the General declaration section, add the following string:

      Public m_objXLAgent As Object

    4. Locate the Public Sub BeginReport(vParam As Variant) string and then type the following underneath:

      Set m_objXLAgent = vParam

    5. Save your changes and close the template.

  4. In the report template, do the following to add a property that holds a unique value. For example, the ItemTag property (Motor_1, Motor _2, and so forth.)

    1. In Microsoft Excel, select Dedine_Report_Btn on the SmartPlant Reports toolbar.

    2. On the Define Report Contents dialog, select the item type for which the new report is intended and select Define.

    3. On the Define Report Item dialog, from the Available properties list, select any unique property and select the right arrow to add it to the Selected properties list and select OK.

      SHARED Tip We recommend that you select SP_ID because this property is known to be unique.

    4. Close the Define Report Contents dialog.

    5. In Microsoft Excel, select in any available cell where you want the selected property (for example, SP_ID) to appear.

    6. Select Map Properties on the SmartPlant Reports toolbar and point to the item type for which the current report is intended.

    7. From the list of the selected properties for this report, select the property that you selected (for example, SP_ID) to place this property in the selected cell.

    8. Select in the Name Box of Microsoft Excel and type Item_ID to name the cell that holds the selected property (for example, SP_ID).

      SHARED Tip Note that Item_ID is the only name that is available in the Excel Name Box. It does not actually matter where you place this cell as long as it exists in the report template.

  5. To register the report, select Actions > Registered Reports on the Smart Electrical menu bar.

  6. On the Registered Reports Common Properties dialog, select the required template.

  7. Type the report name and a brief description if needed.

  8. Select OK to add the report to the Registered Reports folder in the Electrical Index.

  9. Double-click the report in the Registered Reports folder.

  10. Edit the report as needed and add your free text in the data sheet.

    You can add free text only in those cells that do not hold macros or template headers.

  11. Do the following in Microsoft Excel to save the free text that you entered in the data sheet:

    1. Select the Add-Ins tab.

    2. Select Retain Free Text on the SmartPlant Reports toolbar.

  12. Add a new revision.

    Make sure that before you start this procedure, the Archive Documents option is enabled in the General Settings of Options Manager. Also, if you do not add a new revision the report, the free text will not be saved.

  13. Save the report before closing the data sheet.