Vous êtes sur la page 1sur 105

SmartPlant Instrumentation

Infomaker

Version 8.0.5.9 December 2008 DINT2-TP-100001A


SmartPlant Instrumentation and InfoMaker 2

Copyright
Copyright © 2004-2008 Intergraph Corporation. All Rights Reserved.
Including software, file formats, and audiovisual displays; may be used pursuant to applicable software
license agreement; contains confidential and proprietary information of Intergraph and/or third parties
which is protected by copyright law, trade secret law, and international treaty, and may not be provided or
otherwise made available without proper authorization.

Restricted Rights Legend


Use, duplication, or disclosure by the government is subject to restrictions as set forth
below. For civilian agencies: This was developed at private expense and is “restricted
computer software” submitted with restricted rights in accordance with subparagraphs (a)
through (d) of the Commercial Computer Software - Restricted Rights clause at 52.227-
19 of the Federal Acquisition Regulations (“FAR”) and its successors, and is unpublished
and all rights are reserved under the copyright laws of the United States. For units of the
Department of Defense (“DoD”): This is “commercial computer software” as defined at
DFARS 252.227-7014 and the rights of the Government are as specified at DFARS
227.7202-3.

Unpublished – rights reserved under the copyright laws of the United States.
Intergraph Corporation
Huntsville, Alabama 35894-0001

Warranties and Liabilities


All warranties given by Intergraph Corporation about equipment or software are set forth in your purchase
contract, and nothing stated in, or implied by, this document or its contents shall be considered or deemed a
modification or amendment of such warranties. Intergraph believes the information in this publication is
accurate as of its publication date.
The information and the software discussed in this document are subject to change without notice and are
subject to applicable technical product descriptions. Intergraph Corporation is not responsible for any error
that may appear in this document.
The software discussed in this document is furnished under a license and may be used or copied only in
accordance with the terms of this license.
No responsibility is assumed by Intergraph for the use or reliability of software on equipment that is not
supplied by Intergraph or its affiliated companies. THE USER OF THE SOFTWARE IS EXPECTED TO
MAKE THE FINAL EVALUATION AS TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN
ENVIRONMENT.

Trademarks
Intergraph, the Intergraph logo, PDS, SmartPlant, SmartSketch, FrameWorks, INtools,
MARIAN, ISOGEN, and IntelliShip are registered trademarks and SupportModeler and
SupportManager are trademarks of Intergraph Corporation. Microsoft and Windows are
registered trademarks of Microsoft Corporation. MicroStation is a registered trademark of
Bentley Systems, Inc. Other brands and product names are trademarks of their respective
owners.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 3

SmartPlant Instrumentation and InfoMaker


Introduction
InfoMaker is the report generator of PowerBuilder. We can increase the flexibility of SmartPlant
Instrumentation (SPI) by creating our own reports and use them within the SPI environment, or as
standalone reports.

InfoMaker can be used in a variety of ways to enhance SPI reporting:


- For adding custom browsers to the Browser module
- Creating or modifying Spec sheets
- Creating reports that may be run outside of SPI.

When you work in InfoMaker, you work in a graphical environment — and working with data in
this environment means you don't need to understand SQL (Structured Query Language), the
standard programming language for communicating with databases. InfoMaker creates all SQL
statements behind the scenes as you build your reports graphically.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 4

Connecting to a database Using InfoMaker

Task 1: Launching Informaker from SmartPlant Instrumentation


1. Launch SmartPlant Instrumentation then select File Æ Preferences.

2. Click the tab and make sure that the configured application is InfoMaker and the
path is correct.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 5

3. From SmartPlant Instrumentation click in order to open InfoMaker and connect


to the database profile that is being used.

Task 2: Configuring and creating a database profile in InfoMaker


SmartPlant Instrumentation is designed to work on the following database platforms:

1. Sybase SQL Anywhere (watcom)


2. Oracle
3. MSSQL

After identifying which database platform is being used, the following instructions will
apply.

Sybase SQL Anywhere (watcom)

1. Open InfoMaker and click on the DataBase profile button.


2. The Database Profiles screen opens.

3. Highlight ODB ODBC. Click to create a new profile.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 6

4. The Database Profile Setup opens.

NOTE: The ODBC profile (Data Source) IN_DEMO was created during the installation of
SmartPlant Instrumentation.

5. Give a unique name for the profile; choose the right Data Source from the Drop down List.
6. User ID & Password should be the Login Name & Login Pass of your Domain to access the
domain schema.

7. Click to change / edit the profile.

8. Once the profile is set, highlight it and click to connect to the database.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 7

Oracle

1. Open InfoMaker and click on the DataBase profile button.


2. The Database Profiles screen opens.

3. Highlight O90 Oracle 9i. Click to create a new profile.


4. The Database Profile Setup opens. When you fill in the following information, refer to
the following:
Profile Name – your choice
Server – Oracle SID (Service ID) created during the creation of the Oracle instance
Login – this value changes depending on which schema you’re logging into (system,
admin, domain, etc.)
Password – apply the appropriate value depending on the schema selected
Connect as – typically will leave this with Default selected

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 8

NOTE: It’s necessary to initially connect as the system user in Oracle to allow for
connection to the catalog tables.

5. Click OK.

6. Click

7. Click on

8. Click
9. Change Login ID and Password to access only a specific Domain schema. Instructor to
provide this information.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 9

10. Click OK
11. Right click on the profile name TINT 1004 Oracle and select Re-connect.

Re-connect allows you to connect to a profile again after a change has been made to it.

If you highlight any other profile under other database interfaces, click , the
database you’re connected to will change.

At this point you are now connected only to the domain schema which means you have access to
only those specific tables that hold data like instruments, lines, drawings, etc.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 10

MSSQL

1. Open InfoMaker and click on the DataBase profile button.


2. The Database Profiles screen opens.

3. Highlight ODB ODBC. Click to create a new profile.


4. The Database Profile Setup opens. Fill in the following information as shown (system
administrator Password to be provided):

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 11

NOTE: - It’s necessary to initially connect as the system user in MSSQL to allow
for connection to the catalog tables.
- The data source available in the drop down picklist was created during
the MSSQL 2005 installation.

5. Click OK.

6. Click

7. Click on

8. Click

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 12

9. Change Login ID and Password to access only a specific Domain schema. Instructor to
provide this information.

10. Click OK
11. Right click on the profile name TINT 1004 MSSQL and select Re-connect.

Re-connect allows you to connect to a profile again after a change has been made to it.

If you highlight any other profile under other database interfaces, click , the
database you’re connected to will change.

At this point you are now connected to the domain schema which means you have access to only
those specific tables that hold data including instruments, lines, drawings, etc.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 13

In the above Database profiles, we used passwords that allowed us access to the domain schema.
The Infomaker tool allows changes to be made in table views without running SQL update
statements using a graphical mode. This can be very dangerous!

It’s advisable to use the domain view only schema password. Typically this password is
formatted as <domain name>_view. By creating a profile in this manner, the users will still be
able to perform the functions as shown in this class but will not be able to update data in any
tables.

If you need assistance with finding the view only schema password, contact Intergraph Support.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 14

Libraries
InfoMaker saves objects in libraries. Objects could be reports, queries, or forms. The library is a
file with a PBL extension (sometimes we use DLL or PBD extensions in SmartPlant
Instrumentation). The Environment painter workspace displays a list of reports, forms, queries
and pipelines in the current library with the PBL file type. SmartPlant Instrumentation has a pre-
defined library called SP_STYLE.PBL which may be used for customizing specification sheets
or building custom browsers.

NOTE: Styles.pbl is no longer used.

You may want to create a new library of your own saving new reports, forms, queries, and
pipelines. When you create a new library, the new library becomes the current library.
• Task 1: Open an existing library.
• Task 2: Create a new library.

Task 1: Open an existing library.


1. Launch Infomaker.
Start Æ All Programs Æ Sybase Æ Infomaker 10.0 Æ Infomaker

2. Click .

3. On the Select Library screen, choose the Browse tab to open a pre-defined library.

4. Navigate to your \Program Files\SmartPlant\Instrumentation\ installation directory. Select


the sp_style.pbl from the list and click OK.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 15

Note: The active library will always appear in the top left corner of the Infomaker window.

NOTE: If the sp_style.pbl file is accessed for the first time by an Infomaker version, it’s
necessary to upgrade or migrate this file to the new version. In order to successfully migrate
this file, you will need to open Infomaker from the Programs menu and not through
SmartPlant Instrumentation.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 16

Task 2: Create a new library.

1. Choose and pick the New tab

2. Select the Library icon and click OK.

3. Click the ellipses button to the right of the Library field, and type the name Mylib in the
File name field to create a new library.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 17

4. Click Save and then Finish the wizard form. This new file will be set as your current
library.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 18

Queries
A query is a SQL SELECT statement with a name. You define queries in the Query painter,
provide a name, and save them. Anytime you want to create a new report, form, or data pipeline,
you can specify your data requirements by using a query as your data source.

1. Click on the toolbar.

2. In the dialog box that appears, select the Database tab.

3. Choose Query and click OK.

4. In the Select tables dialog box, select the Component & Loop tables.

5. Click Open and you should see both tables open.

6. If you do not see both selected tables, and their columns listed, select View -> Table Layout
from the Menu. Your screen should appear similar as shown:

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 19

7. Verify the relations between the tables (modify using the Join option if required).

NOTE: Infomaker attempts to create a join on the fly by matching the key fields between
two tables (and sometimes more than two fields). This join is not always correct for
relations in the SmartPlant Instrumentation database, so be sure to check these carefully.

8. Select by using the left mouse button.

9. In the Join window that appears, click Delete. In this case the Join that was auto created
between Component and Loop was correct but we’re going to remove and learn how to create
a Join between these two tables.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 20

10. Click

11. The mouse cursor should look like this when you hover over a table. Select
loop_id from COMPONENT and select the matching loop_id field from LOOP.

12. IMPORTANT! Once the Join is complete, click again to turn off the function. If

you have successfully turned off the Join function, you will see when you hover or
move the mouse curser over the tables.

13. Select the following fields from the tables respectively:


LOOP_NAME from LOOP
CMPNT_NAME and CMPNT_SERV from COMPONENT

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 21

NOTE: The field or column names listed for each table are not in alphabetical order. It’s
usually a good idea to extend the length of each table view so you may increase the number of
fields shown during your search.

14. Click to preview the data.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 22

15. While in the preview, select Rows Æ Sort. Drag and drop the columns as shown.

16. Click OK to see the result.

17. Click to return to the Query painter.

18. Within the Where window define the following condition:


Component.Cmpnt_id > 0

19. Save the Query into the library. Select File Æ Save as...

20. Type the name query#1 in the Queries field. Click OK.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 23

21. Click on the second toolbar.

22. Save the data to an external PSR (Powersoft Report) file. Select File Menu Æ Save Rows
As... You may save as a Powersoft Report (PSR), Excel file type, etc.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 24

NOTE: The Save options are different depending on which window you’re focused on. While
the Query window is shown, you may save the query itself to the library file. If you’re in a
preview of the data, your save option is to save the data into an external file.

23. Click until all open windows are closed.

24. Using steps 1 – 22, create a new Query based on the following tables :

- COMPONENT
- COMPONENT_MOD
- COMPONENT_LOCATION
- COMPONENT_MFR

NOTE: Remember Infomaker attempts to create a join on the fly by matching the fields
between two tables. This join is not always correct for column relationships in the
SmartPlant Instrumentation database, so be sure to check these carefully.

First make sure your joins are correct. Use the following primary key fields:

- CMPNT_MOD_ID - (between COMPONENT and COMPONENT_MOD)


- CMPNT_MFR_ID – (between COMPONENT and COMPONENT_MFR)
- CMPNT_LOC_ID – (between COMPONENT and COMPONENT_LOC)

Be sure to turn the Join function off after you have finished!!

Select the following fields from each table:


- CMPNT_NAME from table COMPONENT
- CMPNT_MFR_NAME from COMPONENT_MFR
- CMPNT_MOD_NAME from COMPONENT_MOD
- CMPNT_LOC_NAME from COMPONENT_ LOCATION

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 25

25. Click

The data result you see may not appear exactly as shown in the screenshot.

26. Click

27. Save as query#2.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 26

28. Click to close all open windows.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 27

Reports
Reports present data. When you preview a report in InfoMaker, you can view the data but not
modify it. When you create a new report, you always specify the data source and the presentation
style. InfoMaker will then show you what the report data and layout looks like. Once you are
satisfied with the appearance, you can assign a name to it and save. You may continue to enhance
the report until it appears as desired.

Report data sources


The data source you choose determines what data InfoMaker retrieves for your report.
Report presentation styles
The presentation style you choose determines the type of report that InfoMaker creates. If you
choose the tabular style, your draft report looks like a table. If you choose the label style, your
draft report is in the form of labels. You see the presentation styles in the bottom part of the New
Report dialog box. InfoMaker has eleven possible report presentation styles.

NOTE: Reports used in SmartPlant Instrumentation MUST be of the Tabular format. (Grid
format is acceptable but only for Powersoft Custom Browsers which will be discussed later.)

• Task 1: Create a Report based on a saved Query


• Task 2: Create a Report based on SQL Select

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 28

Task 1: Create a Report based on a saved Query

1. Click .

2. In the dialog box that appears, select the Object tab.

3. Choose Tabular and select OK.

4. Select Query then click Next.

5. Click the ellipses button next to the Specify Query field and choose query#1.

6. Pick the colors you would like on your report, then click Next.

7. Review your choices, and press Finish when ready to continue.

Once you have created the draft of your report, much of the remaining work involves modifying
the position and size of objects in the report.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 29

This is what the report layout will look like when finished. Please refer to this screenshot while
working the following steps.

1. Hover over the Header bar until you see a bi-directional arrow and pull the bar down to allow
more space in this area.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 30

2. Select the “Loop Loop Name” field and move it closer to the Header bar. Use the Style Bar
to make the necessary adjustments to the header as required

- Font size: 14

- Use the Properties window (select field and right click)…. select the General tab and
make sure you select Box in the Border field.

- You can also resize the field by hovering over the border limits of the field until you see
a bi-directional arrow then change the width and height.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 31

3. Make similar changes to the other two headers “Component Cmpnt Name” and “Component
Cmpnt Serv”

4. From the Menu bar, Select Insert Æ Control Æ Text

5. Click somewhere in the header area and you will see a new text field appear. Make the
changes as shown

Use the Properties window….select the Font tab and you may adjust background color, text
color, etc.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 32

6. Add the Page count function to the report header. Select Insert Æ Control Æ Page n of n
Click in the header area about where you would like this to appear and then position as
desired.
Font Size: 11

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 33

7. Select File Æ Save as.... and save the report as report#1. This saves the report to the active
library file.

8. Select Insert Æ Control Æ Today () to add the date.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 34

9. Hover over the footer bar and pull it down to make extra room.

10. Add a new text field No. of Tags then add a function that will count the total number of Tags
shown in the report. Do the following……

11. In the Detail section, select the field component_cmpnt_name

12. From the Menu, select Insert Æ Control Æ Count. A new field will appear. It may appear
in the Summary area. Just grab the field and move it next to the new text in the footer area.

13. In the Detail section, select each field to verify and, if necessary, adjust the width of each
field to better match the width of each header.

Note: There is a tool that allows you to align objects. If you resize and move a field in the
header section and you want to resize and move the associated data field in the detail section,
do the following:

a. Select the header field (this is the source field)

b. Hold the Ctrl key down and select the associated data field in the Detail section (this is
the target field). Depending on the adjustment needed, you may select more than one
target fields.
c. With both fields selected, you will now have these tools available which will allow you to
align, match width, height, etc.
SmartPlant Instrumentation Advanced Training
Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 35

14. Select to save changes to the report. Remember this is saving changes to the report
in the library file.

15. Click

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 36

16. Click until all windows are closed.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 37

Task 2: Create a Report based on SQL Select


This report will show data associated to the instrument.

1. Click .

2. Use Tabular as your Presentation Style & SQL Select as your Data Source.

3. Select the following tables:


- Component
- Drawing
- Line
- Loop

4. The joins created between each table in this instance should be correct. You might check

them by left clicking on each to see what key field has been selected.

Here are the fields that should be connecting each table:

- Component and Drawing: dwg_id


- Component and Line: line_id
- Component and Loop: loop_id

5. Select the following fields:


- CMPNT_NAME from Component
- DWG_NAME from Drawing
- LINE_NUM from Line
- LOOP_NAME from Loop

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 38

Additional discussion about Joins

When a P&ID drawing entry is created and added to the supporting table, a row entry for that
drawing is created with a unique dwg_id number. When that P&ID is selected and
associated to an instrument, the unique dwg_id is stored in a key field in the component table
(where instruments are created and stored). Since you have a reference in the component
table to that dwg_id, when the tables component and drawing are Joined using the key
field dwg_id then the Join makes it possible to show the P&ID drawing name in a report for
the instrument (tag). This same concept may be applied to other tables that relate back to the
component table.

6. Once you have finished selecting fields and working with the Joins, click

7. Make background changes as necessary then click Next and Finish.

8. Modify the report that you have just created as shown.

In order to create the text title P&ID, it is necessary to type P&&ID into the text field. &
is a special reserved character and must be typed twice in text fields to make it appear.

9. Make sure no objects or fields are selected, then in the Properties window, select the Print
Specifications tab. Make the adjustment shown.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 39

10. Select File Æ Save As…. as report#2 in your library.

11. Click

12. Click Close to close all windows.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 40

Open a PSR file in SmartPlant Instrumentation


This option enables you to view the contents of a PBL or PSR file when a report has been saved
as an external file.

1. Open Infomaker

2. Select . In the Object Type field select Reports.

3. Highlight report#1 and click OK.

4. Select File Æ Save As File.... PSR file type. This creates an external file for use elsewhere.

5. Open SmartPlant Instrumentation (Start Æ All Programs Æ Intergraph SmartPlant

Instrumentation Æ SmartPlant Instrumentation)

6. In SmartPlant Instrumenation, select File Æ Import PSR

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 41

7. Click to view reports already identified or added to this SmartPlant


Instrumentation Domain.

8. Click and choose the saved PSR report report#1_external.

9. Define a description.

NOTE: These report files should be located in a common location that is available to all users on

the network.

10. Select Save on the bottom toolbar.

11. Highlight the report definition.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 42

12. Click to view the report within SmartPlant Instrumentation.

13. Click to retrieve the data from the database.

Note: It’s a good idea to perform a retrieve when first opening a PSR file in SmartPlant

Instrumentation. The data that first appears may not be the correct data from the current

domain particularly if the PSR was saved (Save Rows As…..) while connected to another

domain.

The data retrieved is at domain level.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 43

Retrieval Arguments in a Report


When you specify data for a report or form, you have the most freedom when you use SQL Select
as the data source. With SQL Select, you can include columns from one or more tables. After you
choose the columns, you can specify Criteria that limit the rows retrieved; whether you want
retrieved rows to be sorted or grouped; conditions on grouped rows; computed columns; and one
or more arguments to be supplied when previewing a report or running a form.

1. Open the 1st Report in InfoMaker.

2. Click to switch into SQL mode.

3. Design Æ Retrieval Arguments....

4. Specify a Name (Loop_Number) & a Type (String)

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 44

5. Within the Where tab define the following parameters in order to use the Retrieval Argument:

¾ Column - “component “.”cmpnt_num”


¾ Operator - =
¾ Value – Right click ÆArguments... Æ choose the argument & paste it.

6. Return to design mode using the toolbar.

7. Preview the report.

8. Enter the No. of desired Tag / Loop to check the results.

9. Retrieve once again. (Rows Æ Retrieve)

10. Save the report.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 45

Use of Criteria Prompting


Prompt for Criteria is used to allow the user to filter the data to be pulled by the report.

1. Open an existing report, or create a new one as desired.

2. From the menu, select View Æ Column Specification. A new window will
appear in Infomaker.

3. In the Column Specification window, select the check box for the columns on
which you wish the user of the report to be prompted.

4. When the report is run (or the Retrieve button selected) the Criteria box will
appear. The user can specify any SQL format search to limit the data returned.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 46

For example, LIKE ‘%FT%’ could be used and the report would only return Flow Transmitter
tags. Careful format of the statement is required. (i.e. Case sensitivity, quotes, and wildcards
must be used.)

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 47

Create a PowerSoft Browser


This option enables you to add a browser to any existing Browser Group in the Browser Manager
in SmartPlant Instrumentation. First you create a report (external file) in InfoMaker as a PSR or
PBL file. You must follow specific rules when creating this browser in order to make it fully
compatible with SmartPlant Instrumentation.

Before beginning this lab, please refer to pg. 13 and switch to the library sp_style.

1. Create a new report. Click .

2. On the Object tab, choose Grid as your Presentation Style. Click OK.

3. Choose Sql Select as your data source and click Next.

4. Choose the following table:


- Component

NOTE: It is possible to select more than one table at a time but there is an issue existing with
the custom browser working properly in SmartPlant Instrumentation if multiple tables are
initially selected so it is necessary to select the primary table first. In this case the
component table. Select fields from this table then add additional tables to the report later.

5. Select the fields from the following table:


Component:
- CMPNT_NAME
- CMPNT_SERV
- DWG_ID (if the user wants to just see the P&ID name then they should select
dwg_name from the drawing table)
- UDT_SUPPORT_ID1

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 48

6. Select a Primary Key (ID field) from the table.

From table Component choose cmpnt_id

This field must be selected even if you don’t intend to include this field in the browser
design view list.

Hint: If you need to find out what the primary key is for a table, click on then do
the following:

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 49

The field with a check by it is the key field. Always look through the field list as there may be
more than one!

7. If your primary table (in this case component) contains the following fields, select them:
- plant_id
- area_id
- unit_id

8. Also if the primary table contains the following fields, select these fields as well (if a user
makes a change in this browser view, the user login name and date will be stored in the table
accordingly):
- chg_status
- user_name
- chg_date

NOTE: If these fields are not selected and added to the browser, the user’s name and change
date for any changes or updates made to the component table by a user will not be recorded in
these fields for the existing row where the change was made. For example if a user changes
the instrument service (if editable) for an existing instrument, the row for that instrument in
the component table will be updated with the user’s name and the date the change occurred if
these fields have been added to the browser’s SQL.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 50

9. Click on

10. Make color and border changes if necessary and click Next.

11. Click Finish. At this point your report design should look something like this:

12. The general properties of the report itself must be in inches for units. The default is
Powerbuilder. Click in a white area (no fields selected) on the report and change the
Properties as shown. If this isn’t set properly, the print preview and printout of the
report in SmartPlant Instrumentation will not show correctly and will appear without a
titleblock!

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 51

13. Delete ID fields except those selected in step 5 from the Design Screen. This will allow
those fields to be selected by the software, but not shown in the report.

NOTE: If you delete the fields in the Detail section, the associated header name will be
deleted as well.

When you’re done, your design should look like this:

14. Switch to the SQL data view with

15. Design Æ Select Tables

16. Choose the following tables from the list (single click on each table):

- Line
- Loop
- Udf_component

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 52

17. Adjust the joins between each table accordingly. Remember a join essentially is a field
which is common between your primary table (component) and the table you’ve added to
your report. This field is typically a primary key in any tables relating back to the table that is
considered primary to your report.

a. Delete the joins created by the software. It’s not always necessary to delete the joins as
some of them may be correct but, in this class, we will work with Joins from scratch for the
practice.

Left Click on to determine the join that’s been created. In that window, click
Delete to remove the join.

b. Click on to activate the function. Select the following fields between the
component table (primary) and the following tables:

For loop – select loop_id


For line – select line_id
For udf_component – select cmpnt_id

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 53

18. Be sure to turn the Join function off by clicking again!

19. Select the following fields from each table:

Line:
- line_num
Loop:
- loop_name
udf_component:
- udf_c10
- udf_c11

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 54

20. Select a Primary Key (ID field) from each table (remember the Hint from step 6 for
finding primary keys for tables)

- line – line_id
- loop – loop_id
- udf_component – cmpnt_id

21. Also if the added tables contains the following fields, select these fields as well (if a user
makes a change in this browser view, the user login name and date will be stored
accordingly):
- chg_status
- user_name
- chg_date

22. Design menu Æ Convert To Syntax.

23. Delete all the quotes marks ( “ ). Hint: Use the Edit Æ Replace feature

NOTE: If the user wishes to never see these quotation marks appear, it is possible to adjust

the Database Profile. Click . Verify the profile that’s selected and click Edit.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 55

Remove the check in the box. Remember this affects only this profile!
Click OK and Close.

You must reconnect to the database for the changes to take affect. From the Database
Profiles window:
- Select the profile in use (check by it)
- Right click
- Select Re-Connect.

24. Click

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 56

25. Select File Æ Save as file. Navigate to a location where you want to store your new PSR
file and provide the name modified instrument index.

26. Again Delete ID fields except those added in step 5 and 19 from the Design Screen. This
will allow those fields to be selected by the software, but not shown in the report. When
you’re done, your design should look like this:

27. In the Header area, edit the Header fields by removing the table name prefix (this will only
apply to fields that were added after the component table). The Name field should appear in
the following format:
<field name>_t: line_line_num_t Æ line_num_t

- Select the header field then right click to select Properties. Change as shown

TO

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 57

Check all the header fields in the Header area to make sure they are in the correct
format!

28. Edit the data fields in the Detail area by opening the Properties window and removing the
table name prefix (this will only apply to fields that were added after the component table).
The Name field should hold the following format:
<field name>: line_line_num Æ line_num

Check all the data fields in the Detail area to make sure they all have the correct
format!

29. For the header fields in the Header area, use the style bar to change font, size, type, and
position to
- MS San Serif
- size 8
- bold.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 58

- centered
TIP: You may select all the headers fields together and make the change by using the Ctrl
key or use a range box.

30. The following table provides suggestions for new header names:

data field name  header name  
cmpnt_name  Tag 
cmpnt_serv  Service 
dwg_id  P&&ID 
line_num  Line 
loop_name  Loop 
udf_c10  Instrument Painted 
udf_c11  Area Classification 
udt_support_id1  Instrument Color 

Make the name changes in the Properties window in the text field.

When finished the design view might look like this:

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 59

31. Some fields should be protected so the user can’t make changes to the data in those fields
while in a browser view. As a rule when a custom browser is created, it’s important to
verify or look at the fields in the browser view to determine if editing them should be
allowed. As an example, editing a loop name should not be allowed since we know it’s
comprised of multiple fields through a naming convention. The user should be forced to go
back to the loop properties window to change the name of a loop.

To protect loop_name field do the following:

a. select the loop_name field in the Detail area and open the Properties window.

b. Click on the icon next to the Protect field as shown

c. add the value of 1 in the Protect window and click OK. This value turns protection on.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 60

Note the icon next to the Protect field is now green. This indicates that it is in use.

d. Also as a standard in SmartPlant Instrumentation, those fields that may not be edited in a
browser view have a yellow background (you may of course choose another color).
Make this additional change to the loop_name field properties:

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 61

Make the same changes to cmpnt_name and line_num.

32. Click

TIP: Frequent saves are recommended

33. For the dwg_id field, we want to connect a report to this field which will allow the user to
access the P&ID supporting values from a drop down picklist. Make sure you’re connected
to the sp_style.pbl library (verify in the top left corner of the Infomaker window). If
necessary refer to the section in this training document discussing how to connect to a library
on pg. 13.

If you have not changed the library, you’ll need to close the object painter window down,
change the library then open your file again.

Make the following changes in the Properties window for dwg_id:

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 62

It’s a good idea to check the Vertical ScrollBar option.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 63

34. In a similar manner we want to connect a report to the field udt_support_id1. This is
adding the use of a custom table (Custom Table 1) in the browser. Select this field in the
detail section and open Properties. Make the following changes as shown.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 64

35. Make the following changes to the fields udf_c10 and udf_c11. These fields as a default are
free form editing fields but we want to change these fields to allow for a different type of
data input:

Udf_c10

Udf_c11

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 65

NOTE: The first row is inserted as blank to allow for a blank value selection.

36. Click

37. In order to use the custom table field in the browser, we need to make sure the custom table
is active. Start Æ All Programs Æ Intergraph SmartPlant Instrumentation Æ
Administration

- Enter Domain Administration


- Select Activities Æ Custom Tables…..
- Select Plant New Refinery
- Check the box for Custom table 1
- Enter the name Instrument Color in the header field
- Click Apply
- Click Close
- Close Administration

38. Open SmartPlant Instrumentation Æ Index

39. Tables Æ Custom Tables Æ Instrument Color. Enter 3 New values: Red, Blue, Green

40. Open the Browser module.

41. Add Browser Æ PowerSoft Browser

42. Select the PSR file and click Continue

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 66

43. Fill in the data for ALL fields -> Click Ok

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 67

44. Add a view to the browser that you just created and observe the results.

Important: After adding the custom browser, if you make changes to the source PSR file adding
additional fields, making header changes, ect., you will have to delete the existing custom
browser and add the new custom browser using your modified PSR file. You cannot overwrite or
add to a custom browser that has already been added to SmartPlant Instrumentation. Be sure
everything is set as you need it to be before you begin adding views to the custom browser. If
necessary you can always add another custom browser with the additional changes and leave the
existing one as is.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 68

There are additional SQL commands that may be applied and used in SmartPlant Instrumentation
such as UNIONS. This is an additional advanced topic which is included at the end of this
training document and is for study outside of this class.

Not all syntax used in SQL such as inner joins are supported in SmartPlant Instrumentation.
Infomaker may support such syntax embedded in the SQL for a report but that does not mean
SmartPlant Instrumentation programming code allows it.

Also alias table names are not allowed in SmartPlant Instrumentation. Typically this involves an
attempt to reference the same table more than once. An example would be trying to use two
references, drawing_1 and drawing_2, for the drawing table.

You should contact Intergraph support for confirmation on using such syntax.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 69

Using Sp_Style.pbl to Customize Specs


Task 1: Customizing Spec from InfoMaker

1. From SmartPlant Instrumentation Æ , Æ Æ Choose Form 11.


When it opens, note the name of the page at the top (Orifice Plate) and close the form
window.

2. From the Specifications Module window, select Æ Æ Pick Orifice Plate


and click OK. This is the page used by Form 11. We will save this page as an external file,
and edit in Infomaker. When done, we will use this modified file to create a new page and
then also create a new form.

3. Select and save the Orifice Plate page as a PSR file (Orifice Plate page.psr).

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 70

4. In InfoMaker, open the sp_style.pbl library using . This library file is the provided
source included in the SmartPlant Instrumentation software load. Specifications may be
modified using this library file. As previously seen sp_style may also be used in other
software areas such as working with custom browsers.

We will do the following modifications to the form:


¾ Modify an existing SPEC_UDF field to be a CHECK-BOX
¾ Modify an existing SPEC_UDF field to be a drop down List Box field.
¾ Add Checked By & Approved By to the Spec Form Title Block

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 71

5. Load the PSR file in Infomaker


- Open Infomaker

- Open an Explorer Window

- Drag the file Orifice Plate Page.PSR from Windows Explorer and drop in the
open Infomaker window.

- Click the cancel button if data retrieval begins.

NOTE: When initially opened, Infomaker does not provide an open command in the File
menu. To open an external file you must open it using one of two workflows:
- Double clicking on the file from an Explorer window
- Open the Infomaker window and an explorer window then drag the PSR file into the
Infomaker window.

6. Click on the Design tab at the bottom of the screen

7. On Line 15, click on Spec_Udf_C09 associated to the Quality header. Change the field to a
Drop Down List Box as shown below:
(you may need to right click to select the Properties window)

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 72

8. Also on Line 15, select spec_udf_c16 associated to the SuperHeat header. Change the field
to a Check-Box as shown.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 73

9. Make space in the titleblock area as shown. Be sure to reduce the width of the existing desc
fields (you can’t see the actual names of the fields unless you click on them and look at the
Property contents)!

10. Add the text headers Chkd and Appr using Insert Æ Control Æ Text

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 74

Add CHK_BY_X & APPR_BY_X where x = the no. of the Revision

11. Select Insert Æ Control Æ Text. Land the field somewhere in the Design area

12. Select the added field and modify as shown

x = the no. of the Revision

Move this new field into the first revision row as shown.

If desired, you may continue to add CHK_BY_2, CHK_BY_3, etc. in the remaining rows.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 75

13. In a similar manner, add APPR_BY_X above the header Appr where X = the no. of the
Revision (appr_by_1, appr_by_2, etc.)

NOTE: In both cases, the Text field is to remain empty. Ensure that you do not overlap data
fields. Data could become masked or hidden.

14. Choose both data fields on line 6 of the page, and delete them (spec_udf_c22 and c23).

15. In the area to the left, place a text field (Insert Æ Control Æ Text) with P&&ID as it’s
contents. On the font tab in properties, change the background color to Transparent.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 76

Note: The double ampersand (&) is required for a single & to be displayed in the text field.

16. On the menu, choose Insert Æ Control Æ Column and pick the data area on the right hand
side of line 6 (where spec_udf_c22 used to be). When the Select column window appears,
choose pid_no from the list and hit OK. Size and relocate as required.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 77

17. With the pid_no field still selected, right-click and choose properties.

18. Select the Edit tab. Change the Properties as shown.

19. Save the PSR file with File -> Save as File and close Infomaker.

20. Load the PSR into the Data Sheets module by choosing: Page Editor -> Open File -> Save
As Page. Call the new page Modified Orifice Plate.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 78

21. Reset the tab order and Save the page. Close Page Editor.

22. Choose Form Editor -> New Form. A list of available Pages is displayed. Choose the new
page loaded in step 12 and select Save as Form. Give the new form a number (111) and
name.

23. Open a Tag with Form 111. If the tag you choose already has a spec assignment, you will
need to change to form 111 (Actions Æ Change Spec Form) to complete the form
assignment for this tag. Add Revisions to see the results of the UDF fields + revisions.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 79

Custom Title Block


You can customize a title block and associate it with a form. Title blocks are first created as PSR
files in InfoMaker. You then use the Title Block Styles, Title Block Definition, and Associate
Title Block dialog boxes to add a new customized title block to the system, set the number of
revision lines, define the size of the new title block, and finally associate it with an existing form.
This functionality allows the user to overlay using this titleblock which hides the existing hard
coded titleblock.

1. In the \SmartPlant\Instrumentation\PSR\ folder, open one of the following depending on


which database platform you’re working in:

- TBSAMPLE.PSR which is used specifically for Sybase SQL Anywhere (watcom)


databases.
- TB_ORA.PSR for Oracle databases
- TB_MSS.PSR for MSSQL databases

The PSR files are used as sample title blocks for customization purposes.

2. Pull the Header bar down below the titleblock.

NOTE: The Detail bar where the revision data fields reside will move as well so there are no
data fields you will have to resize in the next step.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 80

3. Make the description label smaller and add the separating vertical lines as shown.

If you see this window appear, just click Cancel every time.

4. Add two labels Appr By & Chkd By using Insert Æ Control Æ Text.

Tip: With a field selected, you may use the arrow keys to position the field. If you hold the
Shift key down and use the arrow keys in combination, you can change the height and width
of the field.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 81

5. Select the text field Chkd By, right click, and select Properties. Make the change as shown.

Any text or graphics in the Header area should reside in the Background Layer.

Make the same change to the text field Appr By.

6. Select File Æ Save As File and save as shown

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 82

At this point close the existing file tb_ora.psr file opened in the Infomaker window. We
want to maintain this file in it’s original state with no changes saved. Find the file you just
created, custom TB for specs, and open that file. Continue making changes…….

7. Select the Header bar and move it back to it’s original position as shown.

8. In the Detail section, select the rev_desc field and use the shift and arrow keys to resize this
field to fit in the new Description area.

9. Make sure one of the new text fields is selected. This helps with the formatting of the new
field (font, color, ect.). Select Insert Æ Control Æ Column then click on the area where the
field should be placed as shown.

10. Select the rev_chk_by field.


Resize using the shift and arrow keys

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 83

11. Do the same for rev_appr_by field.

12. For each field just added, open up the Properties window and check in the Position
tab making sure the Layer field has the value Band in it. Fields in the Detail area
should reside in the Band layer.

Do not change anything else!

¾ The final result should look like this:

13. Click

14. Open SmartPlant Instrumentation Æ Specification. Select Action Æ Title Block Styles
Æ New. Open the file, give it a name. Adjust the spinner box to 10 units and decrease the
right side border by three increments.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 84

15. Open Action -> Associate Title Block.. -> Select the form (#68).

16. In the window, select the new style, and drag-drop to place it in position. When done, save
and exit.

¾ Test the customized Title block for any Spec sheet. Create a new tag using spec 68 if
required. Create a revision to the spec and ensure data is displayed.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 85

Software issues:
If you are on 2007 service pack 2 or earlier then make sure you request hotfix 88615. The issue
is the following:

Problem found on Oracle and Watcom and MSSQL 
If you associate a custom title block to a spec form, when you view the spec either as a
normal view or print preview, you do not see the title block. The bottom of the page has no
title block.

Steps to reproduce 
If you associate a custom title block to a spec form, when you view the spec either as a
normal view or print preview, you do not see the title block. The bottom of the page has no
title block.

Impact 
User is not able to use an associated custom TB

Workaround 
None

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 86

Fields on Specifications that appear only under


certain conditions
Sometimes you may have certain conditions which require that fields only appear on the
specification form under those conditions. This next exercise will show you how to
utilize setting the visibility properties for a field which may only be set in Infomaker.

Before we begin this exercise, we need to have access to fields from the loop table and
the cmpnt_criticality table. To provide access to these fields in the specification, we
create a view. Not all tables are directly accessible to specifications such as
spec_sheet_data, pd_general, or add_spec1 so it is necessary to create a view to certain
tables to access the required fields.

The following is the basic syntax for a view statement:

CREATE OR REPLACE VIEW <view name>


(<select fields to be added and used in specification here>) AS
<create a standard select statement referencing the fields selected above and calling
them from the tables they’re associated to>

SmartPlant Instrumentation provides a set of default view statements which allow access
to specific fields from various tables. For example the following is the view_line view:

CREATE OR REPLACE VIEW view_line


(cmpnt_id,insulation_type,insulation_desc,pipe_mat_name,linear_exp_coef,linear_exp_c
oef_add,linear_exp_coef_uid,border_temp,temp_min,temp_max,temp_uid)
AS
SELECT
COMPONENT.CMPNT_ID,
PD_INSULATION.INSULATION_TYPE,
PD_INSULATION.INSULATION_DESC,
PIPE_MATERIAL.PIPE_MAT_NAME,
PIPE_MATERIAL.LINEAR_EXP_COEF,
PIPE_MATERIAL.LINEAR_EXP_COEF_ADD,
PIPE_MATERIAL.LINEAR_EXP_COEF_UID,
PIPE_MATERIAL.BORDER_TEMP,
PIPE_MATERIAL.TEMP_MIN,
PIPE_MATERIAL.TEMP_MAX,
PIPE_MATERIAL.TEMP_UID FROM COMPONENT,
LINE, PD_INSULATION,
PIPE_MATERIAL
WHERE
( LINE.LINE_ID = COMPONENT.LINE_ID ) AND
( PD_INSULATION.PD_INSULATION_ID = LINE.PD_INSULATION_ID ) AND
SmartPlant Instrumentation Advanced Training
Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 87

( LINE.PIPE_ORIF_MAT_ID = PIPE_MATERIAL.PIPE_ORIF_MAT_ID );

Create a new view called loop_view, which will be added to the domain and used in the
specification for this exercise:

CREATE OR REPLACE VIEW loop_view


(cmpnt_id, criticality_description,loop_criticality_id) AS
SELECT
Component.cmpnt_id,
Cmpnt_criticality.criticality_description,
Loop.loop_criticality_id
FROM
Component,
Loop,
Cmpnt_criticality
WHERE
(component.loop_id = loop.loop_id) and
(loop.loop_criticality_id = cmpnt_criticality.cmpnt_critical_id);

1. Open Infomaker and click

2. Make sure you have both the ISQL (Interactive SQL) and Results windows open

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 88

If you don’t see these windows, go to the View menu and click on the appropriate
selections.

3. If the instructor has provided you a text file with the above view statement, just copy
and paste the statement into the ISQL window otherwise you’ll need to type it in.

4. Click . The view has now been added to the domain.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 89

5. Open SmartPlant Instrumentation.

6. Click . Select Actions Æ Specification Views

7. Click New

8. In the Specifications views field, type in loop_view

9. Scroll over in the table to the Item Type field and select Instrument

10. Click OK.

Now we will be able to reference this view as if it were a single table and the following
fields defined in the view will be valid to add to the specification:

- criticality_description
- loop_criticality_id

11. In SmartPlant Instrumentation, select Page Editor then Open Page and select the
new Modified Flow Orifice page previously created.

12. Click Regenerate and make sure you have selected the new view loop_view.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 90

By adding this view during the regeneration process, the fields from the view will be
immediately available for use in Infomaker.

13. Save as an external file using the name modified orifice plate.psr.

14. Open the file modified orifice plate.psr using Infomaker.

15. Create a place on the spec page in the design view which will allow for the addition
of a new field.

Now create a triangle which will appear when the loop criticality value is set to a value
other than none (loop_criticality_id > 0) and when specific text is set in the description
field for the criticality value selected.

16. Select Start Æ All Programs Æ Accessories Æ Paint

17. Draw a triangle that looks something similar to the following and save as an external
file. Use file type bmp.

18. Once the file has been created, go back to Infomaker then select Insert Æ Control Æ
Picure. Click in or around the space where you want to triangle to appear and
navigate to the triangle you just created. Use the keyboard to move and resize the
picture accordingly so it fits in the space as shown here.

NOTE: It’s acceptable to create a pointer or path to the file using a physical drive
letter such as D:\custom symbols\triangle.bmp. If functionality such as this is used,
it’s likely the file will need to be accessible for many SmartPlant Instrumentation
domains across the network. It’s more efficient to place this file in a folder that’s

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 91

shared on the network. You may then use a UNC (Universal/Uniform Naming
Convention) path. An example would be \\Spi2007\custom symbols\triangle.bmp.

Rather than describe the location of a file or directory by drive letter, the Network
Group will typically communicate a UNC path to describe the actual location of a
file or directory. Windows drive letter mappings are arbitrary, whereas a UNC path is
specific.

19. Click

20. Select the triangle (picture field) and open a Properties window.

21. Click on the icon across from the Visible field.

22. In the Visible window that opens, we’re going to add a statement of logic which will
allow this field to appear and disappear accordingly based on the conditions defined.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 92

a. In the Functions section of this window, scroll down to find if(b,t,f) and select it.

NOTE: This function has the same logic flow used in basic programming. In
basic programming, the user might see the following:

If a = 1, then
b=2
Else
c=3
End If

So if a = 1 then set b = 2 else set c = 3

In the function if(b,t,f)

b Æ a=1
t Æ b=1
f Æ c=1

What the user doesn’t see in a statement like this are syntax words like then and
else. They are implied.

b. In the columns section of the Visible window, scroll down to find


loop_criticality_id and select it. You’ll find this places the field reference inside
the parenthesis. You may add fields in this manner but we’re going to simply
type in the logic we need to use here. The logic should appear as the following:

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 93

if((loop_criticality_id > 0 and criticality_description = 'symbol'), 1, 0)

In this statement, 1 is visible and 0 is invisible.

If we translated this to a basic programming If/Then statement, it would look


something like this:

If (loop_criticality_id > 0 and criticality_description = ‘symbol’) then


Show triangle
Else
Do not show triangle

By using loop_criticality_id > 0, we’re saying if a Criticality supporting table


value other than null or none is used, then this condition is satisfied. For each
value that is added to the Criticality supporting table, there is an id that is created
that is greater than zero.

AND

When a user enters a criticality value into this supporting table, there is a
description field that may or may not be filled in. Our logic expects the word
“symbol” to appear in this field.

c. Click to make sure the logic passes validation tests.

d. Click OK to exit the Visible window.

23. Click

24. Using this newly modified PSR, add the spec page in SPI and over-write the existing
Modified Orifice Plate page. Remember to reset the tab order!

25. Let’s use tag 101-FE-100. This tag is likely using form 11 so change to form 111.

26. Open form 111 for tag 101-FE-100 to see that it opens properly.
SmartPlant Instrumentation Advanced Training
Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 94

27. To make the triangle appear, we must satisfy the logic statement. Do the following:

a. Open the properties for loop 101-F-100

b. Click on the ellipses button next to the Loop criticality field. Add the following:

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 95

c. Make sure the Critical selection is showing in the Loop Criticality field

28. Click OK to accept the changes to 101-F-100. Click NO to edit tag numbers.

29. If the spec page for 101-FE-100 is still open, move back to that window and click

or open the spec page for this tag again.

30. You should see the following:

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 96

NOTE: The user should note that the method we used to add the triangle bitmap is
dependent on a path existing to that file.

If the file was to move from its’ location, the picture would no longer appear on the
spec even if the visibility logic conditions were true.

If the file location did need to change, the user could click on and navigate to
the new location for the file.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 97

Additional Exercises
Queries
1. Define a new Query that will retrieve the following data:
Tag Numbers, Tag Services, Tag Equipment & Line Numbers.
Make sure that it will retrieve data only for tags that are belonged to a certain Line.

2. Define a new Query that will retrieve the following data:


Tag Numbers, Tag Services, Tag Equipment & Tag Fluid Name.
Make sure that the Process Function of those tags is “Flow” and their Phase is “Liquid”

Reports
1. Crete a new Report for the following data:
Cable Names & Cable Descriptions, Cable Colors, Cable Models, Cable Manufactures &
Cable Length.
Verify that this report will show only cables that certain color has been defined for them
(Condition).
Retrieve the data for cables > specified length (Argument).

2. Crete a new Report for the following data:


Tag Numbers & their Instrument Type & Instrument Description, Hook-Up Type, Hook-UP
Name & Hook-Up Description.
Retrieve the data for specified Hook-Up Type (Argument).

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 98

Using Styles.pbd

Define two UDF fields for the Instrument Index –Browse:


1. Two Radios Buttons - 3D Look.
2. Check Box - 3 States.

Browsers

1. Create a new Browser under the “Loop Drawings Group”, with the following fields:
Loop Name, Loop Type, Loop Function & Loop Service, P&ID, Generation Type, Revision
Number & Revision Description.

2. Crete a new Browser under the “Instrument Index Group”, with the following fields:
Line Number, Line Type, Line Size, Line Schedule, Line Internal Diameter, Pipe Material
&Pipe Size.

Using Sp_Styles.pbl

Define three Spec_UDF fields as:


1. Drop Down List for Line Number.
2. Drop Down List for Line Size.
3. Drop Down List for Line Internal Diameter.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 99

Additional topics

Create a Powersoft Browser Using a Union All


Sometimes a browser may be created pulling data from tables where rows don’t exist for
the item for which the browser is created. If that particular table is added to the table list
in the report, it can act as a filter showing only those items which have row entries in that
table. That will affect the overall report leaving items not shown that were there before
the table was added. In this case the User wishes to see all items in the report as before,
even with the addition of the new table.

For this example we’re going to continue to build on the previous PSR file created for use
in the Instrument Index group. This browser is created to show instrument tags. We
want to show flow process specific information for the instruments . The problem is not
all instruments will have a row entry in the flow related tables. If we add the FLOW
table to our SQL, the results will show only flow type instruments. We’re going to
modify our previously create PSR file to include flow related tables while allowing the
browser view to show all instrument process types.

1. Find your PSR file instrument index mod.psr and copy it.

2. Rename your copied psr file instrument index and flow.psr

3. Open the new file in Infomaker.

4. Click

When creating a union between two SQL statements, the user cannot work in the
graphic mode as before when initially creating this report so it will be necessary to
understand some of the basic SQL syntax. The following SQL statement will be used
to make this new report work (text highlighted is what will be added to the existing
SQL statement):

SELECT COMPONENT.CMPNT_NAME,
COMPONENT.CMPNT_SERV,
COMPONENT.DWG_ID,
COMPONENT.CMPNT_ID,
COMPONENT.PLANT_ID,
COMPONENT.UNIT_ID,
COMPONENT.AREA_ID,
SmartPlant Instrumentation Advanced Training
Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 100

COMPONENT.CHG_STATUS,
COMPONENT.USER_NAME,
COMPONENT.CHG_DATE,
LINE.LINE_NUM,
LOOP.LOOP_NAME,
UDF_COMPONENT.UDF_C10,
UDF_COMPONENT.UDF_C11,
LINE.USER_NAME,
LINE.CHG_STATUS,
LINE.CHG_DATE,
LOOP.USER_NAME,
LOOP.CHG_STATUS,
LOOP.CHG_DATE,
UDF_COMPONENT.CHG_STATUS,
UDF_COMPONENT.USER_NAME,
UDF_COMPONENT.CHG_DATE,
LINE.LINE_ID,
LOOP.LOOP_ID,
UDF_COMPONENT.CMPNT_ID,
FLOW.PD_F_RANGE_MIN,
FLOW.PD_F_RANGE_MAX,
FLOW.PD_F_RANGE_UID,
FLOW.PD_STAT,
FLOW.CMPNT_ID,
FLOW.CASE_ID
FROM COMPONENT,
LINE,
LOOP,
UDF_COMPONENT,
FLOW
WHERE ( LOOP.LOOP_ID = COMPONENT.LOOP_ID ) and
( COMPONENT.LINE_ID = LINE.LINE_ID ) and
( COMPONENT.CMPNT_ID = UDF_COMPONENT.CMPNT_ID ) and
( FLOW.CMPNT_ID = COMPONENT.CMPNT_ID ) AND
COMPONENT.CMPNT_ID > 0

UNION ALL

SELECT COMPONENT.CMPNT_NAME,
COMPONENT.CMPNT_SERV,
COMPONENT.DWG_ID,
COMPONENT.CMPNT_ID,
COMPONENT.PLANT_ID,
COMPONENT.UNIT_ID,
COMPONENT.AREA_ID,
COMPONENT.CHG_STATUS,
SmartPlant Instrumentation Advanced Training
Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 101

COMPONENT.USER_NAME,
COMPONENT.CHG_DATE,
LINE.LINE_NUM,
LOOP.LOOP_NAME,
UDF_COMPONENT.UDF_C10,
UDF_COMPONENT.UDF_C11,
LINE.USER_NAME,
LINE.CHG_STATUS,
LINE.CHG_DATE,
LOOP.USER_NAME,
LOOP.CHG_STATUS,
LOOP.CHG_DATE,
UDF_COMPONENT.CHG_STATUS,
UDF_COMPONENT.USER_NAME,
UDF_COMPONENT.CHG_DATE,
LINE.LINE_ID,
LOOP.LOOP_ID,
UDF_COMPONENT.CMPNT_ID,
0 PD_F_RANGE_MIN,
0 PD_F_RANGE_MAX,
‘ ‘ PD_F_RANGE_UID,
‘ ‘ PD_STAT,
0 CMPNT_ID,
0 CASE_ID
FROM COMPONENT,
LINE,
LOOP,
UDF_COMPONENT
WHERE ( LOOP.LOOP_ID = COMPONENT.LOOP_ID ) and
( COMPONENT.LINE_ID = LINE.LINE_ID ) and
( COMPONENT.CMPNT_ID = UDF_COMPONENT.CMPNT_ID )
and not exists
(SELECT 'X' FROM FLOW WHERE CMPNT_ID =
COMPONENT.CMPNT_ID) AND COMPONENT.CMPNT_ID > 0)

Again a UNION ALL was used to allow two SQL statements to be joined together. The
first SQL statement added in fields from the FLOW table. This allowed data from the
FLOW table to be added to the report. Once the FLOW table was added, the instrument
tag results were limited to only tags under process flow but particularly, only tags that
had an actual row entry into the FLOW table were shown.

The second SQL statement allows all the other tags that do not have a row entry in the
FLOW table to appear in the report result. This was accomplished by adding the AND
NOT EXISTS…. Portion to the statement.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 102

Both SQL statements must still hold the same number of field selections so it’s necessary
to still maintain the field selections from the FLOW table in the second SQL statement.
This is done by adding a place holder based on the field type.

For PD_F_RANGE_MIN and PD_F_RANGE_MAX, these fields are numeric so using


a 0 as a place holder is required.

For PD_F_RANGE_UID, this field is a data type of VARCHAR2 and has a display
width of 10 characters. Using single quotes and 10 spaces satisfies the requirements for
a placeholder.

PD_STAT only requires 1 character space between single quotes.

PD_STAT, CMPNT_ID, and CASE_ID are all primary keys for the FLOW table.
Remember primary keys for any table are required when building a report to be added as
a browser in SPI.

5. Once the SQL statements are in place, click

6. Remove all fields from the design view that you do not wish to show in the report. In
this case we’re wanting to add only:

- pd_f_range_min
- pd_f_range_max
- pd_f_range_uid

8. Remove table references from remaining fields and change font size, font type as
before. Adjust header names accordingly. When finished you might see
something like this:

9. Click

10. Add the new browser as before to SPI

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 103

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 104

NOTE: If the user performs a count between custom browser views, the number of tags
are identical. This is further proof that all tags in the UNION powersoft browser are
shown.

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7
SmartPlant Instrumentation and InfoMaker 105

Document Revision History

Revision Description
4 Revised for release of SmartPlant Instrumentation version 7.0
5 Revised for SmartPlant Instrumentation version 2007
6 Revised to remove styles.pbd section and update existing sections with
additional information
7 Revised adding topics, updating existing topics, and for use with IM 10.0 and
SPI 2007 (RDW 12/3/08)

SmartPlant Instrumentation Advanced Training


Doc: DINT2-TP-100001A
Revised: 5/13/2009 Rev. 7

Vous aimerez peut-être aussi