Calling CIPs - Intergraph Smart Reference Data - Help - Hexagon

Intergraph Smart Reference Data Help (10.1)

Language
English
Product
Intergraph Smart Reference Data
Search by Category
Help
Smart Materials/Smart Reference Data Version
10.1

You can call a CIP (Customer-Implemented Procedure) from the following areas:

  • Custom Procedure button in the Spec Header

  • Cover page (Thickness Calculation button)

  • Pressure Temperature page (PT Curve Calculation button)

  • Project Setup dialog box, under Other

  • SRD menu > Spec > Custom

The call happens in two steps:

  1. Call a database procedure (execute_custom_procedure in m_pck_spec_custom package) with the following input values:

    • spec header id (only for Thickness grid and Pressure - Temperature page)

    • project id

    • discipline id

    • nls id

    • from region (where the CIP was invoked)

  2. Call of custom method with parameter list according to the return values of the CIP.

Execute custom procedure

Customers can define their own code (for example, for performing custom wall thickness calculations) in the M_PCK_SPEC_CUSTOM package. This package just provides a procedure definition with no code. Customers use this definition when creating their own code.

In this package the customer defines the assembly name, class name, method name, and parameter names and values for each p_from_region. Using these values, the customer dll is invoked.

The signature of the execute_custom_procedure in the M_PCK_SPEC_CUSTOM package is given below:

PROCEDURE execute_custom_procedure

(p_spec_header_id IN m_spec_headers.spec_header_id%TYPE

,p_proj_id IN m_projects.proj_id%TYPE

,p_dp_id IN m_disciplines.dp_id%TYPE

,p_nls_id IN m_nls.nls_id%TYPE

,p_from_region IN VARCHAR2

,p_assembly_name OUT VARCHAR2

,p_assembly_type OUT VARCHAR2

,p_class_name OUT VARCHAR2

,p_method_name OUT VARCHAR2

,p_parameter_tab OUT parameter_typ

,p_parameter_datatype_tab OUT parameter_typ

,p_query_data OUT CHAR

)

p_spec_header_id - Specifies the specification header identifier.

p_proj_id - Specifies the project identifier.

p_dp_id - Specifies the discipline identifier.

p_nls_id - Specifies the NLS language identifier.

p_from_region - Specifies the region from where a call to this procedure was made.

Page

p_from_region

Cover page

Custom Procedure button - SpecGeneral

Thickness Calculation button - ThicknessGrid

Pressure-Temperature page

Custom Procedure button - SpecPressureTemperature

PT Curve Calculation button - PTCurve

Components page

SpecComponents

Notes page

SpecNotes

SRD menu

SRDMenu

p_assembly_name - Specifies the name of the .NET assembly.

p_assembly_type - Specifies the type of the .NET assembly ('dll' or 'exe').

p_class_name - Specifies the name of the class within the assembly.

p_method_name - Specifies the name of the method within the class to be invoked.

p_parameter_tab - Specifies the parameter values for the method.

p_parameter_datatype_tab - Specifies the data type of the parameter of the .NET custom method. Valid values are Single, Double, Decimal, String, Long, Integer, Boolean, and Date.

p_query_data - Specifies whether the data is re-queried after the procedure is executed. If the value of p_query_data is given a different character other than Y/N, then by default, Y is used.

Assumptions

  • The custom assembly (dll or exe) must reside in the same directory as the Smart ReferenceData.exe.

  • If the class (containing the custom method) has parameterized constructors, they are not invoked. In such a case, a default constructor (containing no parameters) should be defined.

    If in the class (containing the custom method) no constructors are defined, the default constructor is invoked automatically.

Cover Page

The picture below shows the two places on the Cover page where you can click to call a custom procedure.

Pressure-Temperature Page

The picture below shows the two places on the Pressure-Temperature page where you can click to call a custom procedure.

Project Setup

This CIP, for example, can run procedures related to project configuration used later during Coding on the Fly or in a mechanical calculation. If EXE or DLL is not included and custom procedure is not called, then on double clicking the 'Other' option, a message is displayed as shown in the following screenshot.

with border

Cover page or Pressure-Temperature page

If the Cover page or Pressure-Temperature page is active (and the spec is open for edit) when you click the Custom Procedure button, the software displays the following message: "Any changes made to the specification will be saved before executing the CIP. Do you want to continue?"

If you click OK, the specification is saved, and the custom procedure is called. If you click Cancel, the execution of the CIP is stopped.

Components page or Notes page

The Custom Procedure button is available only when the specification is in read-only mode on the Components or Notes pages.

SRD Menu

You can also access a CIP from the SRD menu. The p_from_region value is SRDMenu.

SSpecc