Defining Procedures - Intergraph Smart Materials - Version 10.2 - Administration & Configuration - Hexagon

Intergraph Smart Materials Integration (10.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Administration & Configuration
Smart Construction Version
8
Smart Materials/Smart Reference Data Version
10.2

On PDS 10.03, you can define SQL procedures that operate on the PDS interface results after generation by Smart Materials.

On PDS 10.01, you can select the Run Procedures check box so that your procedures of type PMC start automatically after each PCD/PMC creation from PDS 10.12. You can also start them manually using the button on PDS 10.12. Use PDS 10.04 to assign a list of procedures to each specification type.

Procedures of type PWL can be started automatically after project-wide list generation on PDS 10.10. You can attach a list of procedures to each project on PDS 10.10.

Defining procedures requires SQL knowledge.

Procedures of the type PMC can contain a single SQL statement such as:

update m_pds_pcd set

or

update m_pds_pmc set

Next are the attribute name(s) and the value(s) you want to change.

Do not put semicolons at the end of your single SQL statement. Smart Materials automatically generates a commit operation after execution, so do not include a COMMIT in any procedures.

Describe each statement with a header comment using a double hyphen or /* */ brackets.

It is possible to define complete PL/SQL bodies (declare..begin..end) that contain calls to existing PL/SQLs functions, procedures, or packages or to define single calls to functions, procedures, or packages. For a procedure of type PMC, you can use the strings &PMC_ID and &SPEC_HEADER_ID that will be replaced by actual values during runtime. If neither string is found in a procedure, Smart Materials assumes that it is a conventional (non-procedural) statement (insert, update, delete) to which the following is appended: where pmc_id =... resp. and pmc_id = ...

If the type of the procedure is PWL or INDEPD, Smart Materials will not append anything to the procedure text, but if the type is PWL, the placeholder &LIST_TYPE will be replaced by the list type that was just generated by the standard function. The usage of this placeholder is the following:

On PDS 10.10, you can attach a list of procedures that run after PWL generation. All procedures are started for each list type selected for generation. You cannot dedicate a procedure to a special list type. With the placeholder you can control which code is executed for which project-wide list:

BEGIN

IF’C577’ IN (&LIST_TYPE)THEN
<specific code>
END IF;

This feature also allows you to have the complete code for your PWL in one procedure.

You must use the IN statement as in the example above, because you can have a comma-separated list as the argument for &LIST_TYPE.

PWL and INPEPD procedures can also be started manually on PDS 10.10.

Use the Execute button to start the selected procedure, If you start PWL or PMC procedures on PDS 10.03, you must submit parameter information about the spec/pmc or the list type. In the case of type PMC, you must use the LOV to populate the Parameter field. In the case of type PWL, you can also enter your own list type (enclosed by single quotes) manually in the Parameter field. For all procedure types, you must delete the entry in the Parameter field manually if you want to delete the parameter information.

Procedures of type INDEPD can be started here on PDS 10.03 or on PDS 10.10 manually.

Your statement will be converted to uppercase before execution. So if you use mixed-case or lowercase literals, they will change. For example, the comparison "...where geom_type='Branches' " may fail. Instead, use the following code, for example: "...where UPPER(geom_type)='Branches' "