You are on page 1of 217

Plant Design System (PDS)

Equipment Eden Interface

Plant Design System (PDS) Equipment Eden Interface Version 2011 (V12) June 2011 DPDS3-PB-200041F

Version 2011 (V12) June 2011

DPDS3-PB-200041F

Plant Design System (PDS) Equipment Eden Interface Version 2011 (V12) June 2011 DPDS3-PB-200041F

Copyright

Copyright © 1984-2011 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 from Intergraph Corporation.

U.S. Government 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 P.O. Box 240000 Huntsville, AL 35813

Terms of Use

Use of this software product is subject to the End User License Agreement ("EULA") delivered with this software product unless the licensee has a valid signed license for this software product with Intergraph Corporation. If the licensee has a valid signed license for this software product with Intergraph Corporation, the valid signed license shall take precedence and govern the use of this software product. Subject to the terms contained within the applicable license agreement, Intergraph Corporation gives licensee permission to print a reasonable number of copies of the documentation as defined in the applicable license agreement and delivered with the software product for licensee's internal, non-commercial use. The documentation may not be printed for resale or redistribution.

Warranties and Liabilities

All warranties given by Intergraph Corporation about equipment or software are set forth in the EULA provided with the software or applicable license for the software product signed by Intergraph Corporation, 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.

Intergraph is not responsible for the accuracy of delivered data including, but not limited to, catalog, reference and symbol data. Users should verify for themselves that the data is accurate and suitable for their project work.

Trademarks

Intergraph, the Intergraph logo, PDS, SmartPlant, FrameWorks, I-Convert, I-Export, I-Sketch, SmartMarine, IntelliShip, INtools, ISOGEN, MARIAN, SmartSketch, SPOOLGEN, SupportManager, and SupportModeler are trademarks or registered trademarks of Intergraph Corporation or its subsidiaries in the United States and other countries. Microsoft and Windows are registered trademarks of Microsoft Corporation. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. MicroStation is a registered trademark of Bentley Systems Inc, all rights reserved. Other brands and product names are trademarks of their respective owners.

Contents

Preface PDS

9

What's New in Equipment Eden Interface

11

The Eden Basics

13

Equipment Symbol Processor

13

 

Tutorial Definition Table

17

Forms Interface

22

Eden Language Structure

23

Beginning Statements

 

23

Ending Statements

24

 

24

25

26

27

Global Variables Common to Piping, Equipment, and Pipe Support Modeling

28

Global Variables Common to Equipment and Pipe Support Modeling

29

Global

Variables

(EQP Specific)

30

Subscripted Global Variables

30

Common Keywords

31

TYPE Statement

32

DESCRIPTION Statement

32

Comments

33

Operators

33

Arithmetic

Operators

33

Relational

Operators

34

Logical Operators

34

Expressions

34

 

35

35

36

36

If - then - else Statement

37

Functions

37

Primitives

38

Convert NPD to Subunits

40

 

Define Active

Orientation

40

Draw

Cone

41

Draw

Cylinder

42

Draw

43

44

Draw Projected Triangle

45

Draw

Semi-Ellipsoid

46

Draw

Sphere ...................................................................................................................................

47

Draw

Torus

47

Abort

48

Contents

 

Convert Unit

48

Define

49

Define

Datum Point

49

Define

Library

50

Define

Nozzle

51

Define

Orientation By Points

52

Define

Placepoint

53

Define

Point

54

Display

Message

55

Display

Tutorial

55

Draw

Arc

57

Draw

Complex

58

Draw Con Prism

60

Draw

Curve

61

Draw

Ecc

Prism

61

Draw Ecc Transitional Element

62

Draw

Ellipse

63

Draw

Line

64

Draw

Line

String

64

Draw

Proj

Hexagon

65

Draw

Proj

Octagon

66

Draw

Proj

Shape

67

Draw Rectangular

68

Draw

Revolved Shape

69

Draw

Shape

70

Draw

Transitional Element

71

Get

Arc

Points

71

Get

Arc

Size

72

Get

Date

73

Get

EQP

Category

73

Get

Line Size

74

Get

Point

74

Move

Along

Arc

76

Move

Along

Axis

77

Move

Along

Line

77

Move

By Distance

78

Move

Data

79

Move To Placepoint

79

Place

COG

80

Position Cursor

81

Put Field

81

 

82

Retrieve Nozzle Parameters

83

 

Rotate Orientation

84

Start

Complex Shape

84

Stop

Complex

85

Store

Orientation

86

Store

Nozzle Parameters

86

User Function

87

Creating a New Equipment Component

97

 

Setup for Equipment

97

 

98

Contents

Extracting Sample Modules

 

99

Editing

100

Compiling New Modules

 

100

Revising Modules

101

 

101

Input Fields

 

102

System-Defined Field Numbers

 

102

Application Commands

103

User-Defined Application Commands

103

System-Defined Application Commands

103

 

104

Defining Symbols

 

107

Eden Debugger

 

111

Invoking the Debugger

 

111

Exiting the Debugger

111

Concurrent Display

112

 

112

Switch Modes (ON and OF)

 

112

Set Line Break (B)

113

Call Tutorial (C)

113

Deposit

 

114

Deposit

114

Examine Local Variables (EL)

 

114

Examine Global Variables (EG)

115

Examine

Symbol Name (ES)

116

Examine

Source

116

Move to Specific Source Line or Continue (Go)

117

Step through Source Code (S)

 

117

Step into User Function (SI)

117

Switch the Prompt Terminal (P)

118

Appendix: Codelist

 

119

Appendix: Equipment Data Definition

125

Equipment Group Database Table

126

Equipment Nozzle Database Table

126

Appendix: EQP Eden

Program

Examples

129

Example 1 (Use of loops)

129

Example 2 (Use of arrays and loops)

130

Example 3 (Placing nozzles)

130

 

131

Example 5 (Graphic selection commands)

 

131

Example

6

132

Example

7

132

Example

8

133

Example

9

133

 

137

Contents

Appendix: Delivered Parametrics

139

Circular Platform (A001)

141

Miscellaneous Platform (A003)

143

 

Holes

for

Platforms (A015)

145

 

147

Thru

Ladder

A (A021)

149

 

150

 

Side Ladder A (A031)

152

Side Ladder Details (A039)

153

 

Stairs A (A041)

154

Handrail A

156

Davit

A

(A061)

157

Davit

B

(A063)

159

Define

(E200)

160

Define

Weights (E201)

161

Complex Vertical Cylindrical Equipment, Skirt (E205)

163

Simple Vertical Cylindrical Equipment, Skirt (E210)

165

Simple Vertical Cylindrical Equipment, Legs (E215)

167

Spherical Equipment (E230)

169

Complex Horizontal Cylindrical Equipment (E240)

170

Simple Horizontal Cylindrical Equipment (E245)

172

Horizontal Shell and Tube Exchanger (E305)

174

Kettle Exchanger (E307)

176

Vertical Shell and Tube Exchanger (E310)

178

Exchanger Ends (E319)

180

Double Pipe Exchanger (E320)

181

Plate Exchanger (E325)

183

 

Air Cooler (E330)

185

Induced Draft Air Cooler Bay (E332)

186

Forced Draft Air Cooler Bay (E334)

188

Horizontal Rotating Equipment and Driver (E405)

189

Vertical Rotating Equipment and Driver (E410)

191

E1

Ends

(E905)

193

E2

Ends

(E906)

194

E3

Ends

(E907)

195

Complex Vertical Cylindrical Equipment (N205)

196

Simple Vertical Cylindrical Equipment (N210)

197

Simple Vertical Cylindrical Equipment (N215)

197

Spherical Equipment (N230)

198

Complex Horizontal Cylindrical Equipment

198

Simple Horizontal Cylindrical Equipment (N245)

199

Horizontal Shell and Tube Exchanger (N305)

199

Kettle Exchanger (N307)

200

200

Double Pipe Exchanger (N320)

201

Plate Exchanger (N325)

201

 

Air Cooler

(N330)

202

Horizontal Rotating Equipment and Driver (N405)

202

Vertical Rotating Equipment and Driver (N410)

203

 

Gear Cover (U850)

203

 

204

206

207

Contents

Flat

Oval

Torus

Miter (U863)

208

Flat

Oval

Prism

(U870)

209

Flat

Oval

Torus

(U880)

210

 

212

User Projected Shape (USRPRJ)

213

Index

215

Contents

Preface PDS

This document provides command reference information and procedural instructions for the Plant Design System (PDS) Equipment Eden Interface task.

List of PDS Documentation

  • DPDS3-PB-200003 - DesignReview Integrator (PD_Review) Reference Guide

  • DPDS3-PB-200004 - Drawing Manager (PD_Draw) User's Guide

  • DPDS3-PB-200005 - EE Raceway Modeling Reference Guide

  • DPDS3-PB-200006 - Interference Checker/Manager (PD_Clash) User's Guide

  • DPDS3-PB-200010 - PDS 3D Theory User's Guide

  • DPDS3-PB-200013 - PDS EDEN Interface Reference Guide Volume I : Piping

  • DPDS3-PB-200015 - PDS Equipment Modeling (PD_EQP) User's Guide

  • DPDS3-PB-200017 - PDS ISOGEN Reference Guide, Vol. 1

  • DPDS3-PB-200022 - PDS Piping Component Data Reference Guide

  • DPDS3-PB-200023 - PDS Project Setup Technical Reference

  • DPDS3-PB-200025 - PDS Stress Analysis Interface (PD_Stress) User's Guide

  • DPDS3-PB-200026 - Pipe Supports Modeler Reference Guide

  • DPDS3-PB-200028 - Piping Design Graphics (PD_Design) Reference Guide

  • DPDS3-PB-200030 - Project Administrator (PD_Project) Reference Guide

  • DPDS3-PB-200033 - Project Engineer HVAC (PE-HVAC) Reference Guide

  • DPDS3-PB-200034 - Reference Data Manager (PD_Data) Reference Guide

  • DPDS3-PB-200035 - Report Manager (PD_Report) User's Guide

  • DPDS3-PB-200041 - PDS EDEN Interface Reference Guide Volume 2 : Equipment

  • DPDS3-PB-200042 - PDS EDEN Interface Reference Guide Volume 3 : Pipe Supports

  • DPDS3-PE-200016 - PDS Express Project Creation Quick Start Guide

  • DPDS3-PE-200052 - PDS Ortho Draw User's Guide

  • DPDS3-PE-200029 - Piping Model Builder (PD_Model) Reference Guide

  • DPDS3-PE-200031 - Project Engineer HVAC Getting Started Guide

  • DPDS3-PE-200032 - Project Engineer HVAC Overview

  • DPDS3-PE-200045 - PDS Label Library Merger Utility

  • DPDS3-PE-200047 - PDS Reference Data Auditing Tool

  • DPDS3-PE-200048 - Pipe Supports Explorer Utility

  • DPDS3-PE-200050 - Batch Services Quick Start Guide

  • DPDS3-PE-200051 - Batch Services User's Guide

What's New in Equipment Eden Interface

What's New in Equipment Eden Interface

The following changes have been made to the Equipment Eden Interface:

Version 2011 (V12)

  • No changes were made for this release.

S E C T I O N

1

The Eden Basics

Eden is a high-level symbol definition language modeled on the FORTRAN programming language that allows you to design your own symbols for equipment, piping, instrumentation, and specialty items.

The Eden language syntax is not case sensitive. You can write code with whatever case conventions make it easiest for you to read. While you do not need a programming background to write Eden programs, any programming experience is highly recommended.

Most of the symbol definition functions are built into Eden's command structure. This high-level command structure makes it easier to share code among several different symbol definitions.

Eden is flexible enough to allow you to design codes specific to your company's needs, yet offers predefined subroutines, called primitives, which carry out functions often repeated within symbol definitions.

For example, the following primitive draws a cone with a length of X units, a diameter at the active point (first end) of Y units and a diameter at the opposite end of Z units:

Call Draw_Cone (X, Y, Z)

The output produced will look similar to the following graphic:

S E C T I O N 1 The Eden Basics Eden is a high-level symbol
S E C T I O N 1 The Eden Basics Eden is a high-level symbol

You can call up to five nested subroutines within a program.

Equipment Symbol Processor

The symbol processor is the Eden code that defines an equipment component. It calls all the subroutines or modules that activate forms, check input data, assign placement points, and place graphics.

The first line of an Eden module defines the module name. The following statement is used in the Eden modules to indicate a symbol processor module:

Symbol_Processor 'MODULE NAME'

The module name should be entered using UPPER CASE characters. For example:

Symbol_Processor 'APUMP'

The following example symbol processor defines a horizontal pump:

The Eden Basics

SYMBOL_PROCESSOR 'E405' ! #TYPE =Pumps,All equip #DESC =Hor Rot Equip & Driver ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! E405 : Horizontal Rotating Equipment and Driver ! ! APPLICATION COMMAND ! 4075 - HELP (SPECIFIC) ! 4074 - HELP (GENERAL) ! 4073 - DEFINE ! 4072 - DEFINE CG ! 4051 - RETURN (from help menu) ! 4052 - UPDATE DATE ! ! SYSTEM DEFINED COMMAND USED ! 4001 - EXIT ! 4002 - ACCEPT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! INT2 accepted LOCATION pointzero [3]

!

 

pointzero = POINT_0 Dimension [100] = 0.0 accepted = 0 tutname = 'E405' Cstring [29] = 'E405' Call Get_Date( Cstring [38] )

!

Do While ( accepted .EQ. 0 ) Call Display_Tutorial ( tutname ) Call Put_Field( Cstring [29], 19 )

The Eden Basics

If( LAST_INP_TYPE .EQ. USER_KEYIN ) then If( LAST_INP_NUM .GE. 2 .AND. LAST_INP_NUM .LE. 18 ) then Call User_Function ( 'E405_CHECK' ) accepted = Dimension [100] Else accepted = 0 Endif Else If( LAST_INP_TYPE .EQ. APPLICATION_CMD ) then if( LAST_INP_NUM .eq. 4075)then Call Display_Tutorial ( 'H405' ) accepted = 0 else if( LAST_INP_NUM .eq. 4074)then Call Display_Tutorial ( 'H200A' ) accepted = 0 else If( LAST_INP_NUM .eq. 4073)then Call User_Function ('E200') accepted = 0 Else If( LAST_INP_NUM .eq. 4072)then Call User_Function ('E201') accepted = 0 Else If( LAST_INP_NUM .eq. 4052 )then Call Get_Date( Cstring [1] ) accepted = 0 Else accepted =1 Endif Endif Endif Endif endif else accepted = 1 Endif Endif Enddo

! ! define PLACE POINTS and DATUM POINTS Call Define_Active_Orientation ( NORTH, UP ) Call Define_Placepoint ( PP1, POINT_0 ) Call Define_Datum_Point ( DP [1], POINT_0) offset = Dimension [4] + Dimension [11] Call Move_Along_Axis ( - offset, SECONDARY ) Call Define_Placepoint ( PP2, POINT_0 ) Call Define_Datum_Point ( DP [2], POINT_0) ! Draw base plate

The Eden Basics

base_length = Dimension [1] base_width = Dimension [2] + Dimension [3] base_thickness = Dimension [4] offset_base = 0.5 * Dimension [1] + Dimension [5] offset_norm_base = 0.5 * base_width - Dimension [3] Call Move_To_Placepoint (PP2) Call Move_Along_Axis ( offset_base, PRIMARY ) Call Move_Along_Axis ( offset_norm_base, NORMAL ) Call Rotate_Orientation ( 90.0, NORMAL ) If( base_length .gt. 0.0 .and. base_width .gt. 0.0 .and. base_thickness .gt. 0.0 ) then Call Draw_Proj_Rectangle ( base_length, base_width, base_thickness ) Else Call Abort (0) Endif ! Draw driver driver_length = Dimension [6] + Dimension [7] driver_width = Dimension [8] + Dimension [9] driver_thickness = Dimension [10] + Dimension [11] vert_offset_driver = - Dimension [11] horiz_offset_driver = 0.5 * driver_length - Dimension [6] norm_offset_driver = 0.5 * driver_width - Dimension [9] Call Move_To_Placepoint (PP1) Call Move_Along_Axis ( vert_offset_driver, SECONDARY ) Call Move_Along_Axis ( horiz_offset_driver, PRIMARY ) Call Move_Along_Axis ( norm_offset_driver, NORMAL ) Call Rotate_Orientation ( 90.0, NORMAL ) If( driver_length .gt. 0.0 .and. driver_width .gt. 0.0 .and. driver_thickness .gt. 0.0 ) then Call Draw_Proj_Rectangle ( driver_length, driver_width, driver_thickness

)

Endif ! Draw shaft Call Move_To_Placepoint (PP1) Call Move_Along_Axis ( Dimension [7], PRIMARY ) If( Dimension [12] .gt. 0.0 .and. Dimension [13] .gt. 0.0 ) then Call Draw_Cylinder ( Dimension [12], Dimension [13] ) Endif ! Draw housing house_length = Dimension [14] house_width = Dimension [15] + Dimension [16] house_thickness = Dimension [17] vert_offset_house = - Dimension [11] horiz_offset_house = 0.5 * house_length + Dimension [12] + Dimension [7] norm_offset_house = 0.5 * house_width - Dimension [16] Call Move_To_Placepoint (PP1) Call Move_Along_Axis ( vert_offset_house, SECONDARY ) Call Move_Along_Axis ( horiz_offset_house, PRIMARY ) Call Move_Along_Axis ( norm_offset_house, NORMAL ) Call Rotate_Orientation ( 90.0, NORMAL ) If( house_length .gt. 0.0 .and. house_width .gt. 0.0 .and. house_thickness .gt. 0.0 ) then Call Draw_Proj_Rectangle ( house_length, house_width, house_thickness ) Endif

The Eden Basics

! define CGs Call Move_To_Placepoint ( PP1 ) Call Place_Cog (DRY, Dimension [71], Dimension [72], Dimension [73]) Call Place_Cog (OPERATING_1, Dimension [74], Dimension [75], Dimension

[76])

Call Place_Cog (OPERATING_2, Dimension [77], Dimension [78], Dimension

[79])

Call Move_To_Placepoint ( PP2 ) STOP END

Tutorial Definition Table

You can create or modify tutorial definition tables using an ASCII editor. The first line in a tutorial definition table defines the tutorial name. This entry must begin in column 1.

Each input field in a tutorial must have a corresponding row in a tutorial definition table. Each row includes seven entries: field number, data type, global variable, nozzle number, input attribute, default string, and field name.

  • 1. field number The tutorial field number defining the form (gadget number).

  • 2. datatype The data type of the field. This entry is a number whose values include:

  • 3. number

1

=

linear dimension

  • 2 angular dimension

=

3

=

integer (no units)

  • 4 length for NOZ_LENGTH1

=

  • 5 length for NOZ_LENGTH2

=

  • 6 length for NOZ_RADIUS

=

  • 7 equipment entity database attribute

=

  • 8 nozzle entity database attribute

=

  • 9 field to receive values for CSTRING_x variables

=

A table data entry which the system interprets differently for each data type:

For data types 1, 2, and 3, number is a value that can range from 1 to 100 defining the global variable DIMENSION_n, which holds the field’s input. For example, if number is set to 10 in the table, then any input into the field is placed by the software into DIMENSION_10. The symbol can then refer to DIMENSION_10 and use it in any of its calculations. For data types 4, 5, and 6, this field is ignored.

For more information on the Equipment Modeling DDL, refer to Appendix: Equipment Data Definition (on page 125).

For data types 7 and 8, number defines the attribute number in the appropriate database entity to which the field inserts input. These numbers provide the link to the database.

The Eden Basics ! define CGs Call Move_To_Placepoint ( PP1 ) Call Place_Cog (DRY, Dimension

Use the following numbers for the respective attribute:

The Eden Basics

equip_group ( datatype = 7 )

  • 1 , equip_indx_no , integer

  • 2 , equip_no , character(30)

  • 3 , equip_descr_1 , character(40)

  • 4 , equip_descr_2 , character(40)

  • 5 , tutorial_no , character(6)

  • 6 , equip_class , character(2)

  • 7 , dry_weight , double

  • 8 , oper_weight_1 , double

  • 9 , oper_weight_2 , double

    • 10 , insulation_thk , double

    • 11 , construction_stat , short

, standard note 130

  • 12 , equipment_division , short

, standard note 69

  • 13 , approval_status , short

, standard note 35

  • 14 , insulation_purpose , short , standard note 220

equip_nozzle ( datatype = 8 )

  • 1 , nozzle_indx_no , integer

  • 2 , nozzle_no , character(10)

  • 3 , equip_indx_no , integer

  • 4 , nominal_piping_dia , short , rating

  • 5 , character(8)

, preparation

  • 6 , short , standard note 330

  • 7 , piping_mater_class , character(16) , unit_no

  • 8 , character(12)

  • 9 , fluid_code , short , standard note 125

    • 10 , unit_code

, character(3)

  • 11 , line_sequence_no , character(16)

  • 12 , heat_tracing_reqmt , short , standard note 200

  • 13 , heat_tracing_media , short , standard note 210

  • 14 , insulation_purpose , short , standard note 220

  • 15 , insulation_thk , double

  • 16 , table_suffix , short

, standard note 576

  • 17 , service , character(20)

  • 18 , schedule_thickness , character(8)

  • 19 , nor_therm_growth_X , double

  • 20 , nor_therm_growth_Y , double

  • 21 , nor_therm_growth_Z , double

  • 22 , alt_therm_growth_X , double

  • 23 , alt_therm_growth_Y , double

  • 24 , alt_therm_growth_Z , double

  • 25 , construction_stat , short , standard note 130

For example, if the data type is 7 and number is 1, then any input to this field is put in the equipment entity, attribute number 1 (or equipment name) field of the record that is written to the database when the component is placed. Refer to the model database DDL for a complete description of each attribute in both the equipment and nozzle entities.

For data type 9, number specifies the CSTRING variable to receive the value.

The Eden Basics

  • 4. A number that identifies the nozzle with which a field will be associated. This field is only needed for data types 4, 5, 6, and 8. Each nozzle in a parametric symbol must be assigned a unique umber. (Refer to the DEFINE_NOZZLE and the RETRIEVE_NOZZLE_PARAMETERS primitives.) This number is the same as the RETRIEVE_NOZZLE_PARAMETERS primitive. Each nozzle in a parametric requires a set of fields for defining the nozzle size, rating, facing, tag, possibly length, and possibly other database attributes. The nozzle number allows the software to distinguish one nozzle tag input field or one nozzle size input field from another.

nozzle

  • 5. An entry that describes the input field itself. The available values for this item include:

attributes

  • 1 User input is optional.

-

  • 2 User input is required.

-

  • 3 User input is optional but causes return to the symbol. This type of field has also been called a terminated key-in field. Refer to the DISPLAY_TUTORIAL primitive for more information on how to handle these fields from the symbol.

-

  • 4 User input is required but causes return to the symbol. This is also a terminated key-in field.

-

Example:

A tutorial has a field for which the attribute entry in the tutorial definition table contains the number two. You are not allowed to select the ACCEPT field to exit from the tutorial until you have provided a valid input for the field.

  • 6. An entry allowing you to define a default for a particular tutorial input field. The entry can take on several forms. All of the expressions outlined below must be surrounded by single quotes in the tutorial definition table.

default

The default types include:

’"XXX-"’

A literal string used for defaulting character string input fields.

The double quote must be included as a delimiter. Example:

"101-C"

’Fxxx-

Use the current value of tutorial field number xxx as the default for this field. Note that user-defined field numbers can range from 1 to 200. (System-defined fields range from 201 to 256 and may not appear in default expressions.) Example: F23

The Eden Basics

’Dxxx-

Use the contents of DIMENSION_xxx as the default for this field. There is no practical limit on the number of tutorials that a symbol can activate. Therefore, any calculations that were made before the symbol definition activated the current tutorial can provide defaults for that tutorial. Example: D23

’Cxx-

Use the contents of CSTRING_xx as the default for this field.

’xx.x-

Decimal constant with or without a decimal point. All distances are assumed to be in English subunits (inches). If the default is a metric constant, then the constant should be given a suffix of M. Example: 125M

’expr-

Combine any of the above three default types to form a valid arithmetic expression. Valid operators are +, -, *, /, and ˆ. Use parentheses to alter order of evaluation. An expression is not evaluated until all fields are defined. Example: (F1+F2)/2+30. This expression is not computed until both fields 1 and 2 are defined.

Default expressions are currently limited to 20 characters in length. Example:

’’’101-C’’’ - default for an equipment item name field Example:

’F1/2+10’ - use the first input to field 1 divided by 2 plus 10 inches as the default.

  • 7. name

Defines an alphanumeric name for the field which will be used in future software releases for reporting and alphanumeric placement of parametrics. The field name can be a maximum of 10 characters in length.

The gadget numbers 1-10 (Column 1 - Field) in the tutorial definition table correspond to gadget numbers 951-960 on the form.

  • 1 = 951

  • 2 = 952

  • 3 = 953

  • 4 = 954

  • 5 = 955

  • 6 = 956

  • 7 = 957

  • 8 = 958

  • 9 = 959

10 = 960 Gadget numbers 11, 12, 13

...

remain 11, 12, 13 ....

Example

The following example tutorial definition table displays a piece of equipment with 7 dimensional inputs (rows 1-7), 4 nozzles (rows 11-26), and 3 fields for equipment entity database attributes (rows 8-10).

The Eden Basics

EXCHNG

1, 1, 1, , 1, ’30’, ’DIA’ 2, 1, 2, , 1, ’’, ’NOZ1’ 3, 1, 3, , 1, ’F2’, ’NOZ2’ 4, 1, 4, , 1, ’’, ’NOZ3’ 5, 1, 5, , 1, ’’, ’SUPP1’ 6, 1, 6, , 1, ’’, ’SUPP2’ 7, 1, 7, , 1, ’’, ’PROJ’ 8, 7, 1, , 1, ’’, ’EQPNAM’ 9, 7, 2, , 1, ’’, ’DESCR’ 10, 7, 5, , 1, ’"C"’, ’CLASS’ 11, 8, 1, 20, 1, ’’, ’TAG1’ 12, 8, 3, 20, 1, ’’, ’SIZE1’ 13, 8, 4, 20, 1, ’’, ’RATING1’ 14, 8, 5, 20, 1, ’21’, ’FACING1’ 15, 8, 1, 19, 1, ’’, ’TAG2’ 16, 8, 3, 19, 1, ’F12’, ’SIZE2’ 17, 8, 4, 19, 1, ’F13’, ’RATING2’ 18, 8, 5, 19, 1, ’21’, ’FACING2’ 19, 8, 1, 18, 1, ’’, ’TAG3’ 20, 8, 3, 18, 1, ’’, ’SIZE3’ 21, 8, 4, 18, 1, ’’, ’RATING3’ 22, 8, 5, 18, 1, ’21’, ’FACING3’ 23, 8, 1, 17, 1, ’’, ’TAG4’

24, 8, 3, 17, 1, ’F20’, ’SIZE4’ 25, 8, 4, 17, 1, ’F21’, ’RATING4’ 26, 8, 5, 17, 1, ’21’, ’FACING4’

  • In the tutorial above, the default value for field 1 on the tutorial is 30 inches.

  • Since the default value for field 3 is F2, your first input to field 2 is displayed in field 3 by the system.

  • Since the second column is equal to 1 for fields 1 through 7, they are all linear dimension inputs. Your input into these fields is placed in variables DIMENSION_1 through DIMENSION_7.

  • Field 8 collects your equipment ID (equipment entity, attribute number 1). In general, it is easier to place the symbol if the equipment ID field is put directly on each tutorial.

  • There is a set of four fields on the tutorial for each nozzle defined in the parametric (tag, size, rating, end prep). This is the minimum number of fields that can be present to allow complete definition of a nozzle. If you do not define the nozzle tag for a particular nozzle, then that nozzle will not be placed.

The Eden Basics EXCHNG 1, 1, 1, , 1, ’30’, ’DIA’ 2, 1, 2, ,

Nozzle tag numbers cannot be defaulted.

  • Since there is no field on the tutorial that explicitly collects individual nozzle lengths, the symbol logic must calculate them.

  • Each nozzle has a default end prep of 21 (nozzle entity, attribute number 5). This is a code-listed attribute in the database. The value 21 is the codelist value for a raised face. The default expression can also be entered as ’"RFFE"’, which is the codelist text for raised face end prep.

The Eden Basics

Forms Interface

Forms in equipment modeling serve to collect input via key-in fields or command buttons. They also provide feedback information to the user through message fields.

Input fields and application commands have unique identification numbers. These numbers are used with the tutorial definition table (TDF) to communicate to the software the use for each field or command. The data entered through the forms serves as the input that defines the values of the global variables used by the symbol processor. When a new equipment item is defined through Eden, a form has to be created to define the component's parameters. DBAccess is used to build forms.

S E C T I O N

2

Eden Language Structure

Eden is similar to the FORTRAN programming language. Therefore, the general rules for evaluating expressions in Eden are identical to those in FORTRAN.

S E C T I O N 2 Eden Language Structure Eden is similar to the

You do not need to know FORTRAN to use the Eden language.

Eden definitions are usually simpler than FORTRAN programs. To use Eden, you must be able to visualize the symbol (in 3D) that you want to develop.

The Eden language structure incorporates:

  • Statements

Beginning

Ending

  • Variables

Local

Global

  • Keywords

  • Operators

Arithmetic

Relational

Logical

  • Expressions

  • Functions

  • Primitives (or Subroutines)

Beginning Statements

Beginning statements define the types of modules being entered. Names within the single quotes must be all upper case.

SP - Symbol_Processor '6CHAR' UF - User_Function_Definition '28CHAR'

Examples

Symbol_Processor 'A001' User_Function_Definition 'A001_CHECK'

Eden Language Structure

Ending Statements

Ending statements mark the end of the module in which the system has been processing. Ending statements in the symbol and subsymbol processor include:

Stop

End

Ending statements in the user functions include:

Return

End

Begin

The Begin primitive allows you to generate graphics for 2D shadow, envelopes, various light steel categories, and holes.

Syntax

Call Begin <category>

Options

category

Keyword specifying the graphics category you want to place. Allowable category keywords for each class of graphics include:

Regular equipment graphics

EQUIPMENT

This is executed at the beginning of symbol execution. It is needed if you have placed some other category and want to resume equipment graphics.

Interference envelope graphics

ENVELOPE_MAINTENANCE_HARD

ENVELOPE_MAINTENANCE_SOFT

ENVELOPE_ACCESS_HARD

ENVELOPE_ACCESS_SOFT

ENVELOPE_SAFETY_HARD

ENVELOPE_SAFETY_SOFT

ENVELOPE_CONSTRUCTION_HARD

ENVELOPE_CONSTRUCTION_SOFT

2D footprint graphics

SHADOW

Light steel graphics

LADDER

PLATFORM

HANDRAIL

MISCELLANEOUS

Holes

Eden Language Structure

HOLE

The keywords HOLE and NOHOLE are different from

NOHOLE

other keywords in that they do not represent a

Surface Type

separate category of graphics. You can include Begin(HOLE) within another Begin category. A Begin(HOLE) remains in effect across other Begin calls until a Begin(NOHOLE) is reached. Hole graphics are given the level and symbology of holes.

SOLID

The keywords SOLID and SURFACE set the active

SURFACE

surface type of subsequent graphics. The default is SOLID. This results in capped surfaces. With the SURFACE keyword, you can place uncapped shapes such as open-ended cylinders.

Except for nozzles and placepoints, all graphics assume the level and symbology of the last executed Begin statement. Placepoints always belong to the equipment/parametric cell. If your symbol executes no EQUIPMENT category graphics, an otherwise empty parametric equipment cell is created for housing the placepoints.

A Begin statement can repeat itself any number of times. After execution, it becomes the active category for subsequent element placement calls. A (non-EQUIPMENT) Begin statement must be followed by at least one call to generate graphic elements; otherwise, that Begin statement will have no effect on symbol graphics.

Begin EQP Category

The Begin EQP Category primitive allows you to create graphics for various EQUIPMENT subcategories each having its own level and symbol.

Syntax

Begin_EQP_Category (subcategory)

Options

subcategory is a character string indicating the subcategory. There are presently 20 subcategories available. A valid subcategory must be one that has been defined via the Project Administrator Module. Alternatively, you can use one of the following:

’EQP_CATEGORY_1’,

’EQP_CATEGORY_2’,

..

..

..

’EQP_CATEGORY_20’

The argument is checked only when you place the symbol and not during compilation.

Restrictions

You can use this call only within the Begin (EQUIPMENT) call. Also, you cannot make this call when Draw Complex Surface or Start Complex Shape is in progress. By default, the Begin

Eden Language Structure

(EQUIPMENT) and Begin EQP Category ('EQP_CATEGORY_1') calls are active when a symbol executes.

Example

  • The following example is a valid code fragment:

Call Begin (ENVELOPE_MAINTENANCE_HARD) ! place envelope graphics

.. .. Call Begin (EQUIPMENT) ! to set category next Call Begin_EQP_Category ('PUMPS') ! 'PUMPS' must be a valid ! category for project

Call Draw_Complex_Surface (4, 0) ! pump graphics

.. .. Call Begin (HOLE) ! HOLE is allowed anywhere .. .. Call Draw_Complex_Surface (-99, 0) ! end pump

  • The following example is not a valid code fragment:

Call Begin (LADDER) Call Begin_EQP_Category ('PUMPS') ! Begin (EQUIPMENT) not active .. ..

  • This example is not a valid code fragment:

Call Draw_Complex_Surface (4, 0) Call Begin_EQP_Category ('PUMPS') ! cannot change within surface

Variables

Variables in Eden can be either local or global. They can contain either numeric or alphanumeric data. Internally, numeric data is stored as REAL*8 (double precision). If a different data type is required in the context of an expression, then the conversion is performed at the time the expression is evaluated.

  • Variable names can be either upper or lower case. Symbols tend to be easier to read when you use all lower case for local symbols and all upper case for global symbols or vice versa.

Examples

  • When converting a floating point number to an integer, the fractional part of the floating point number is truncated.

  • A variable used in a logical expression evaluates to TRUE when the value of the variable is 1 and 0 when the logical value is FALSE.

  • Variables that hold values representing distances are assumed to be in subunits. A variable containing the value 25 represents 25 inches in an English unit design file and 25 millimeters in a metric unit design file.

    • Be careful when using hard coded numbers or when using the system_of_units variable.

Eden Language Structure

Local Variables

Local variables are user defined and declared in the symbol definition. You can refer to a local variable only when you are in the same module as the local variable.

Local variable names are formed using alphanumeric (a-z), numeric (1-9), and special (_ and $) characters. They must begin with an alphanumeric character and must be less than or equal to 31 characters in length.

Eden Language Structure Local Variables Local variables are user defined and declared in the symbol

The Eden compiler does not verify the spelling of local variables within call statements. It assumes a null value for the misspelled variable at component placement time.

The Eden language refers to constants as local variables. Both character strings and numeric constants are valid; however, character string constants must be surrounded by single quotes. In most cases, character strings and constants are case sensitive. Thus, a and A are interpreted differently.

Examples

diameter 13.25

shell_thickness

'A TEXT STRING'

projection_1

radius [2]

25

Only in Pipe Support and Equipment Modeling can you declare local variable types. The variable types default to either CHARACTER or REAL depending on the context. To override this default, you can use a local variable type declaration statement anywhere before the variable(s) is (are) actually referenced. Variable types INT2, R8, and LOCATION are recognized by the compiler.

Example

In the following example, variables a, B, and C are declared as type short integers. They hold values ranging from -32767 to 32767.

Int2 a Int2 B, C

Example

In the example below, variable d is declared as a type REAL, capable of holding decimal fractional values. This is the usual default type for numeric variables. However, explicit typing to this category may be necessary to declare local arrays.

R8 d

As a recommendation, all declaration statements should be placed at the very beginning of the symbol code and not interspersed among statements to be executed during symbol placement. This improves program readability.

Also in Pipe Support and Equipment Modeling, referencing a variable using subscripts is extremely useful when coding repetitive statements such as the body of a loop. Prior to use, variables must appear in a type declaration in which its subscript or index range is also specified.

Example

In the example below, D is an array of 5 short integer variables stored contiguously. The individual elements are referenced as D[1], D[2], D[3], D[4], and D[5]. You can also use a variable or an arithmetic expression for indexing, such as D[i] where i is a value between 1 and 5, or D [i+1]

Eden Language Structure

where i is a value between 0 and 4. INT2-typed variables are particularly useful in DO loops and array indexing where integral numbers are necessary and roundoffs must be avoided. They are also stored much more efficiently than REAL variables.

Int2 D[5], EF[6]

Example

Below, LENGTHS is an array of 10 REAL variables. They are referenced as LENGTHS [1] ... LENGTHS [10].

R8 LENGTHS [10]

Example

In the following example, PT is declared as a buffer with four locations. Location PT [12]

where PT [1], PT [4], PT [7] PT [10] are x-coordinates PT [2], PT [5], PT [8] PT [11] are y-coordinates PT [3], PT [6], PT [9] PT [12] are z-coordinates

These variables provide alternate locations for the point values that you do not want to store in

POINT_1

POINT_24 ...

POINT [125]. You will also find them useful in accessing individual

... components of a location. (Refer to the REPLACEMENT STATEMENT section.)

Location PT [12]

An array-formatted variable may also be referenced without the index. In this case, the first element of the array is accessed. For example, PT and PT [1] are functionally the same in the above example.

Currently, only single expression subscripts (that is, single dimensioned arrays) are possible.

Global Variables Common to Piping, Equipment, and Pipe Support Modeling

Global variables are system-defined names allowing you to refer to them at any subroutine level. More specifically, you can use them for passing values between subroutine levels or for communicating input values to the symbol. The following list shows the global variables common to all Eden applications. Refer to the application-specific section for detailed information concerning specific global variables.

Eden Language Structure where i is a value between 0 and 4. INT2-typed variables are particularly

Global variables are system-defined. You cannot declare global or subscripted global variables.

Input_n

(Input_1 through Input_20) An array with up to 20 variables used to define the input parameters for table lookups. (Input_11 through Input_20 are specifically designed for user function arguments in equipment and pipe support modeling.)

Output_n

(Output_1 through Output_20) An array with up to 20 variables where the results of the table lookup are stored. (Output_11 through Output_20 are specifically designed for user function return arguments in equipment and pipe support modeling.)

Eden Language Structure

Dimension_n

(Dimension_1 through Dimension_100 for equipment and pipe supports, Dimension_1 through Dimension_20 for piping) General purpose variables used for communicating input to the symbol logic. You can also use these variables for passing values between subroutines or simply for local storage. (Dimension_20 is for angle; Dimension_1 through Dimension_19 is for linear piping.)

Pr_Rating_n

Variable containing the current item pressure rating value.

Nom_Pipe_D_n

Variable containing the current item nominal pipe diameter. This variable contains the nominal diameter in coded units. A special primitive is provided to help you convert from coded units to subunits.

Gen_Type_n

Variable containing the current item end preparation generic type (BLT, MAL, FEM). This is a read-only variable.

Term_Type_n

Variable containing the current item end preparation termination type (21, 22, and 23 will fall into Term_Type_1=20). This is a read-only variable.

Standard_Type

Variable containing the current item standard type value. This is a read-only variable and is a function of TABLE_SUFFIX.

Global Variables Common to Equipment and Pipe Support Modeling

The following list contains global variables common to Equipment and Pipe Support Modeling. For more information on global variables, refer to the System-defined Subroutines section and the Eden User Interface section.

Point_n

(Point_1 - Point_24) Names representing points that have been

Point [n]

defined or saved for later use in a symbol definition. The n in [n] can be between 0 and 125.

Act_Lib

Variable that contains an identifier for the active library of dimension tables. This is a read-only variable.

Cstring_n

(Cstring_1 through Cstring_40) Names representing global character variables. Each name can contain a maximum of 50 characters.

Last_Inp_Type

Refer to the Display_Tutorial primitive in the Eden Primitives

Last_Inp_Num

section.

NPD_Unit_Type

Contains the nominal piping diameter system of units defined for the model file. You can test this variable against the keywords ENGLISH and METRIC. This is a read-only variable.

Eden Language Structure

Global Variables (EQP Specific)

The following list contains global variables specific to Equipment Modeling. For more information on global variables, refer to the System-defined Subroutines section and the Eden User Interface section.

PP_Location_n

(PP_Location_1 - PP_Location_10) Names representing the point locations that have been defined as place points in the course of a symbol definition.

End_Prep

Variable containing the current nozzle end preparation value.

Noz_Length1

Variable containing the current nozzle length value. This variable applies to type 2 and 3 nozzles only. For type 3, the length is from the end of the nozzle connected to the vessel to the centerline of the bend.

Noz_Length2

Variable containing the current second nozzle length value. This variable applies to type 3 nozzles only and measures the length from the face of the nozzle to the centerline of the bend.

Noz_Radius

Variable containing the current nozzle bend radius. Applies to type 3 nozzles only.

Table_Suffix

Variable containing the current nozzle table suffix value.

PP_Primary_n

(PP_Primary_1 through PP_Primary_10) Names representing orientation of primary axes for place points defined during symbol placement.

PP_Secondary_n

(PP_Secondary_1 through PP_Secondary_10) Names representing orientation of secondary axes for place points defined during symbol placement.

PP_Normal_n

(PP_Normal_1 through PP_Normal_10) Names representing orientation of normal axes for place points defined during symbol placement.

Subscripted Global Variables

In Equipment and Pipe Support Modeling, a global variable can contain an index value as part of the variable name even though the index value is not a variable. This is known as subscripted global variables. For example, Dimension_10 and Point_3 are global variables whose index values are 10 and 3, respectively.

You can reference the same location using subscripted global variables, which contain an index either as a variable or as an expression. For example, Dimension [10] and Point [3] are subscripted global variables whose index values are 10 and 3, respectively. They are equivalent to Dimension_10 and Point_3. Subscripted global variables are useful when using loops. Below is a list comparing the two methods of accessing global variables with indexes:

Subscripted Global Variable (variable index)

Global Variable with non-variable index

cstring [1]

cstring [40]

cstring_1

cstring_40

dimension [1]

dimension [100]

dimension_1

dimension_100

Eden Language Structure

dp [1]

dp [30]

dp1

dp30

inputs [1]

inputs [20]

input_1

input_20

outputs [1]

outputs [20]

output_1

output_20

pp [1]

pp [10]

pp1

pp10

point [0]

point [125]

(point [0]

point [24]

point_0

point_24)

pp_primary [1]

pp_primary [10] pp_secondary [10] pp_normal [10] pp_location [10]

pp_secondary [1] pp_normal [1] ... pp_location [1]

pp_primary_1

pp_secondary_1

pp_normal_1

pp_location_1

pp_primary_10

pp_secondary_10

pp_normal_10

pp_location_10

A global variable referenced without a subscript causes the first element to be accessed. Thus, Point and Point [0], Dimension and Dimension_1 are functionally equivalent.

Common Keywords

Eden uses keywords for labeling specific values or groups of values. All keywords except TRUE and FALSE can appear as arguments in system-defined primitives (or subroutines). Keywords can be upper or lower case. For consistency, this reference guide displays keywords in upper case.

TRUE

Logical true. Used in logical expressions.

FALSE

Logical false. Used in logical expressions.

MALE

Keywords for generic end preparation.

FEMALE

BOLTED

PRIMARY

Keywords used to identify or refer to individual refresh tee axes.

SECONDARY

NORMAL

ENGLISH

Names used to define the units of a constant used in the symbol

METRIC

definition.

ACTIVE_POINT

Name representing the location of the active point in the local

Keywords used to define directions in the local coordinate

POINT_0

coordinate system defined by the symbol. These names can be

EAST WEST

used interchangeably.

system defined by the symbol definition.

NORTH SOUTH UP DOWN PP1 - PP10

Names representing symbol place point locations and orientations. A maximum of 10 place points can be defined for 1 symbol.

Eden Language Structure

DP1 - DP30

Names representing equipment datum point locations and orientations.

SYMBOL_PROCESSO

Module type of all equipment modeling Eden definitions. It is

R

used in the first statement of a symbol definition.

ENG_COMM_LIB

Names representing the different libraries that can be made

EQP_TABLES

active in a symbol definition.

RETURN

Terminates module execution normally. If it encounters either a

STOP

RETURN or STOP in a user function, the system returns control to the calling module.

END

Must be the last line in the symbol source code. If execution reaches the END statement, an implicit STOP is executed.

There are other keywords primarily used in specific subroutine calls. These keywords can be found in the subsections that describe their associated primitives. Keywords APPLICATION_CMD and USER_KEYIN are described under the DISPLAY_TUTORIAL primitive. Keywords such as PT_BORE and COG_TYPE are explained under the GET_POINT and PLACE_COG primitives, respectively.

TYPE Statement

TYPE statements allow you to assign up to 150 labels or types to a symbol. The syntax for the TYPE statement is:

#TYPE = Type 1, Type 2, Type 3,

where

...

, Type n

Type 1

...

Type n

Labels representing types under which the symbol will be classified.

Using each type, you can later inquire on the symbol. (Refer to the PDS Equipment Modeling (PD_EQP) Reference Guide for information on Parametric Help.)

A type label can be up to 28 characters long. The compiler automatically left justifies each type and converts it to upper case. You can enter any number of complete type labels that fit in a line. Multiple TYPE statements are allowed. A TYPE statement can appear anywhere in the source code; however, the # character must appear in column 1.

Example

The following TYPE statement appears in the code for a multi-diameter vertical vessel supported on skirt.

#TYPE = tower, vertical vessel, drum, reactor

DESCRIPTION Statement

The DESCRIPTION statement assigns a descriptive phrase of up to 40 characters to the symbol. This description appears next to the symbol name when you inquire on the symbol library from the PDS Equipment Task. (See the PDS Equipment Modeling (PD_EQP) Reference Guide for information on Parametric Help.)

The syntax for the DESCRIPTION statement is:

#DESC = This is a description

Eden Language Structure

A DESCRIPTION statement can appear anywhere in the symbol code. The description string is placed left justified by the compiler. When more than one DESCRIPTION statement appears, only the last statement is used. The # character must appear in column one.

Comments

When you place an exclamation point (!) anywhere in an Equipment Modeling source line, the remainder of that line is treated as a comment.

Example

Call define_placepoint (PP1, POINT_1)

Operators

! POINT_1 is used to ! define place point 1

Operators are used in conjunction with variables to form expressions. As in FORTRAN, operators can be any one of three types:

  • 1. Arithmetic

  • 2. Relational

  • 3. Logical

Arithmetic Operators

Arithmetic operators are used to form arithmetic expressions. These operators follow the mathematical conventions. Valid arithmetic operators include:

+ addition - subtraction * multiplication / division ** exponentiation

//

concatenation using '_'

||

concatenation without using '_'

The first five operators (+, -, *, /, **) can only be used with numeric local and global variables. The concatenation operators (// , || ) can be used with both numeric and string variables.

The concatenation operator // is used primarily to form table names. It joins two variables together with an underbar (_) character. The result is a text string.

Example

'ABC' // 'DEF'

produces

'ABC_DEF'

When using the concatenation operation, real numbers are converted to integers (that is, truncated), then converted to character strings and finally joined together with the underbar character. The concatenation operation is generally used to form messages and character field outputs.

Eden Language Structure

Relational Operators

Relational operators are used to form relational expressions that test the value of an Eden expression or establish conditions under which a group of Eden statements can be executed. Valid relational operators include:

.EQ.

equal to

.NE.

not equal to

.GE.

greater than or equal to

.GT.

greater than

.LE.

less than or equal to

.LT.

less than

  • Periods must appear before and after the expression.

Relational operators can be used on both numeric and character string variables. However, mixing the two types of operands for a given operation produces computing errors.

In character relational expressions, less than means precedes in the ASCII collating sequence, and greater than means follows in the ASCII collating sequence.

'ABCD' .LT. 'ACCD'

If two strings in a relational expression are not the same length, the shorter one is padded on the right with spaces until the lengths are equal.

'PQRSTU' .EQ. 'PQR ' 'PQRSTU' .EQ. 'PQR '

Logical Operators

Logical operators are used to combine relational expressions into more complex logical expressions. Valid logical operators include:

.OR.

logical or

.AND.

logical and

Periods must appear before and after the expression.

Periods must appear before and after the expression.

Expressions

 

Expressions are variables, constants, and operators combined to make statements. The format of most Eden expressions is the same as in FORTRAN. Valid expressions include:

Replacement Call Do while Indexed Do If - then - else

simple arithmetic replacement executes primitives or subroutines execute loop execute loop conditional execution

Eden Language Structure

Eden Language Structure For every IF statement, there must be an ENDIF statement to end

For every IF statement, there must be an ENDIF statement to end the expression. You can nest up to five If-then-else expressions within an Eden module.

For the Replacement, Do while, and If-then-else expressions, you can use parentheses to alter the precedence of calculation.

Replacement Statements

Replacement statements are used to set variables or perform calculations. The following list illustrates the various Replacement statements:

thickness = 25. vessel_od = DIMENSION_1 test = test + 1 tutor_name = 'EXCH1' table_name = 'BLT' // GEN_TYPE // PR_RATING // '5' dim_a = (dim_b + dim_c) * 2. + dim_d

In Equipment and Pipe Support Modeling, all three components of a point (or location variable) can be replaced by another point value with one assignment statement.

Example

In the following example, PT is declared as a buffer of three points. The second statement saves pt [4], pt [5], pt [6] into global location Point_5. In the third statement, the location value stored in point [2] is saved in a PT buffer, the x-coordinate being assigned to pt [7], y to pt [8], and so forth. Likewise, in the last statement, the POINT_3 components are replaced by those of Point_4 in one aggregate operation.

Location pt [9] . . point [5] = pt [4] . . pt [7] = point_2 . . point_3 = point [4]

Call Statement

Call statements are used to execute system primitives. The syntax for the Call statement is:

call "primitive" or "subroutine" (argument 1, argument 2,

...

)

Example

Call Place_Cylinder_With_Capped_Ends (diameter, length) Call Define_Placepoint (PP1)

Eden Language Structure

Do While Statement

The Do While statement is used to form indefinite loops. The condition of a Do While statement must equal a logical value (either true or false). The body of the Do While statement will be repeatedly executed as long as the logical expression remains true.

Example

The following Do While loop places four cylinders end to end. The pretested loop condition fails on the fifth try (if i equals 4), and control transfers to the message display routine.

i

= 0

do while (i .LT. 4)

i

=

i

+ 1

Call Draw_Cylinder_With_Capped_Ends (diam, leng) enddo Call Display_Message ('Out of loop now')

Indexed Do Statement

The Indexed Do statement allows you to form loops that execute a specified number of times. This number is determined by an initial, a terminal, and an incremental parameter of a control variable. The syntax for the Indexed Do statement is:

do V = v1, v2, v3 . . . enddo

where

V

is a control variable (non-string type)

v1

are constants or variables that evaluate to the initial, terminal, and incremental

v2

parameters respectively. v3 is optional. If v3 is omitted, the system assumes

v3

that the incremental parameter is one.

Eden Language Structure Do While Statement The Do While statement is used to form indefinite loops.

V3 cannot be negative.

Example

In this example, I is set to 1. The body of the loop is then executed. I increments by 2 each time the cycle is complete, and the value 3 is checked against the terminator 20. The iteration continues as long as I is less than or equal to 20. When the iteration is greater than 20, the loop ends.

do I = 1, 20, 2 . . . enddo

Eden Language Structure

If - then - else Statement

If - then - else statements are used when a group of statements is to be conditionally executed. The Eden syntax is the same as FORTRAN syntax.

if (condition) then . . . else . . . endif

Example

if (DIMENSION_1 .gt. 24.) then thk = thk + .125 else thk = thk + .250 endif

  • An If statement of the form if (condition) is not valid. In Eden, all If statements must be of the form If (condition) then. The else statement is optional.

Functions

Eden provides several functions for performing common mathematical operations. These functions can be used within replacement statements.

  • The following functions must contain the parentheses. DSQRT () square root DABS () absolute value DSINR () sine of an angle in radians DCOSR () cosine of an angle in radians DTANR () tangent of angle in radians DSIND () sine of an angle in degrees DCOSD () cosine of an angle in degrees DTAND () tangent of an angle in degrees DASINR () arcsine returned in radians DACOSR () arccosine returned in radians DATANR () arctangent returned in radians DASIND () arcsine returned in degrees DACOSD () arccosine returned in degrees DATAND () arctangent returned in degrees

Example

The following list illustrates a few possible Eden functions:

length = hypot * DSIND (30.)

Eden Language Structure

side = DTANR (pi/2) + 32. hypot = DSQRT (a**2 + b**2) angle = DATAND (side1/side2)

Primitives

Primitives are system-defined routines that perform specific functions for symbol definition. Convert NPD to Subunits (on page 40) Define Active Orientation (on page 40) Draw Cone (on page 41) Draw Cylinder (on page 42) Draw Eccentric Cone (on page 43) Draw Projected Rectangle (on page 44) Draw Projected Triangle (on page 45) Draw Semi-Ellipsoid (on page 46) Draw Sphere (on page 47) Draw Torus (on page 47) Abort (on page 48) Convert Unit (on page 48) Define Active Point (on page 49) Define Datum Point (on page 49) Define Library (on page 50) Define Nozzle (on page 51) Define Orientation By Points (on page 52) Define Placepoint (on page 53) Define Point (on page 54) Display Message (on page 55) Display Tutorial (on page 55) Draw Arc (on page 57) Draw Complex Surface (on page 58) Draw Con Prism (on page 60) Draw Curve (on page 61) Draw Ecc Prism (on page 61) Draw Ecc Transitional Element (on page 62) Draw Ellipse (on page 63) Draw Line (on page 64) Draw Line String (on page 64) Draw Projected Hexagon (see "Draw Proj Hexagon" on page 65) Draw Projected Octagon (see "Draw Proj Octagon" on page 66) Draw Projected Shape (see "Draw Proj Shape" on page 67) Draw Rectangular Torus (on page 68) Draw Revolved Shape (on page 69) Draw Shape (on page 70)

Eden Language Structure

Draw Transitional Element (on page 71) Get Arc Points (on page 71) Get Arc Size (on page 72) Get Date (on page 73) Get Equipment Category (see "Get EQP Category" on page 73) Get Line Size (on page 74) Get Point (on page 74) Move Along Arc (on page 76) Move Along Axis (on page 77) Move Along Line (on page 77) Move By Distance (on page 78) Move Data (on page 79) Move To Placepoint (on page 79) Place COG (on page 80) Position Cursor (on page 81) Put Field (on page 81) Read Table (on page 82) Retrieve Nozzle Parameters (on page 83) Rotate Orientation (on page 84) Start Complex Shape (on page 84) Stop Complex Shape (on page 85) Store Orientation (on page 86) Store Nozzle Parameters (on page 86) User Function (on page 87) User Function FLAT_OVAL_PRISM (on page 88) User Function FLAT_OVAL_TOR (on page 89) User Function FLAT_OVAL_SEG_TOR1 (on page 90) User Function FLAT_OVAL_SEG_TOR2 (on page 91) User Function ROUND_SEG_TOR1 (on page 92) User Function ROUND_SEG_TOR2 (on page 93) User Function RECT_SEG_TOR (on page 94) User Function RECT_FLAT_OVAL (on page 95) User Function ROUND_RECT (on page 96)

Eden Language Structure

Convert NPD to Subunits

The Convert NPD to Subunits primitive converts the coded input value and returns its Real*8 equivalent. This primitive is often used for converting the nominal piping diameter that is stored in the database.

  • Metric files base the diameter in millimeters. Imperial files store the nominal piping diameter as NPD 1/32 + 5000. Thus,

1 inch NPD is 5000 + 32 * 1 = 5032 20 inch NPD is 5000 + 32 * 20 = 5640

For Eden symbols in Piping that use imperial and metric files, hard-coding the dimensions is not recommended. A dimension entered as 5 inches and placed in an Imperial file is interpreted as 5 inches. However, the same value placed in a Metric file is interpreted as 5 millimeters. Instead of hard coding, load the dimensions in a table to allow the piping software to convert the dimensions to the correct values.

This primitive does not perform unit conversions. If American standard pipe sizes are being used in a Metric file, this primitive will return the NPD in inches.

Syntax

Call Convert_NPD_To_Subunits (coded_input, npd)

Options

coded_input

The nominal pipe diameter in internal or coded units. This variable must be the keyword Nom_Pipe_D_n.

npd

The nominal piping diameter in subunits.

Examples

In this example, the Real*8 equivalence of the coded NPD in Nom_Pipe_D_1 is returned in

Pipe_Dia_1.

Call Convert_NPD_To_Subunits (Nom_Pipe_D_1, pipe_dia_1)

  • All NPDs used internally in the software are in encoded form. Most table lookups based on NPDs require the input to be in encoded form. However, if a nozzle size is needed in a calculation, it must be converted from internal units to subunits.

Define Active Orientation

The Define Active Orientation primitive allows you to define the active orientation by specifying the directions of the primary and secondary axes. The orientation is defined in the local coordinate system by the symbol. This definition has no bearing on the design file coordinate system.

In Piping, this primitive defines the current flow centerline and a direction that is normal to the flow centerline in terms of the connect point orientation (defined by the symbol's connect point geometry) in order to place graphic shapes.

Eden Language Structure Convert NPD to Subunits The Convert NPD to Subunits primitive converts the coded

Eden Language Structure

Specific keywords are available for specifying either the primary axis or the secondary axis of the connect point's orientation.

Syntax

Call Define_Active_Orientation (primary, secondary)

Options

primary

Variable that defines the flow centerline or primary direction.

secondary

Variable that defines the line perpendicular to the flow centerline or secondary direction.

Valid keywords for the primary and secondary variables include:

EAST PP_PRIMARY_n WEST PP_SECONDARY_n NORTH PP_NORMAL_n SOUTH PRIMARY

UP SECONDARY

DOWN

NORMAL

For the Equipment Modeling keywords, you must define n using the Define Placepoint primitive before using any of the PP keywords.

Eden Language Structure Specific keywords are available for specifying either the primary axis or the

If the initial active orientation for a symbol definition has the primary pointing east and the secondary pointing north, the normal axis of the active orientation would be up. (Normal axis can be found using the right-hand rule.)

Example

In the following example, the primary orientation is set to point west, and the secondary orientation is set to point down:

Call Define_Active_Orientation (WEST,DOWN)

Draw Cone

The Draw Cone primitive places a cone where the first end is at the current active point and the second end is at a location computed by the system given the input length along the primary axis. You must define the diameters of each end of the cone with separate variables.

Eden Language Structure Specific keywords are available for specifying either the primary axis or the

Syntax

Call Draw_Cone (length, diameter_1, diameter_2)

Eden Language Structure

Options

length

The length of the cone (A), which can be positive or negative.

diameter_1

The diameter of the cone (B) at the active point.

diameter_2

The diameter of the cone (C) at the end opposite the active point.

Examples

SYMBOL_PROCESSOR 'CCONE' tutnam = 'CCONE' Call Display_Tutorial (tutnam) A = DIMENSION_1 ! length of cone B = DIMENSION_2 ! diameter at active pt C = DIMENSION_3 ! diameter at opposite end Call Define_Placepoint (PP1, Point_0) Call Draw_Cone (A, B, C) Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0) stop end

Draw Cylinder

The Draw Cylinder primitive places a cylinder where the first end is at the current active point and the second end is at a location computed by the system along the primary axis. You must specify the diameter and the length of the cylinder. The active point will be moved to the opposite end.

Eden Language Structure Options length The length of the cone (A), which can be positive or

Syntax

Call Draw_Cylinder (length, diameter)

Options

length

The length (A) of the cylinder.

diameter

The diameter (B) of the cylinder.

Examples

SYMBOL_PROCESSOR 'CYLIND' tutnam = 'CYLIND' Call Display_Tutorial (tutnam) A = DIMENSION_1 ! length B = DIMENSION_2 ! diameter Call Define_Placepoint (PP1, Point_0) Call Draw_Cylinder (A, B) Call Define_Active_Orientation (WEST, NORTH)

Eden Language Structure

Call Define_Placepoint (PP2, POINT_0) stop end

Eden Language Structure Call Define_Placepoint (PP2, POINT_0) stop end If cyl_len is positive, a cylinder

If cyl_len is positive, a cylinder of the specified length is drawn. If cyl_len is zero, nothing happens. If cyl_len is negative, the active point is moved the specified negative distance, but the cylinder is not drawn.

Draw Eccentric Cone

The Draw Eccentric Cone primitive allows you to place an eccentric truncated cone. The first end is at the current active point. The second end is at a location the system computes by moving from the current active point along the current flow centerline by the length of the cone and along the secondary axis by the negative of the eccentric offset. You must specify the eccentric offset and the diameters of both ends of the eccentric cone.

Eden Language Structure Call Define_Placepoint (PP2, POINT_0) stop end If cyl_len is positive, a cylinder

Syntax

Call Draw_Eccentric_Cone (length, eccentric_offset, diameter_1,

diameter_2)

Options

length

Cone length (A).

eccentric_offset

Eccentric cone offset. This is the center-to-center distance between cone endpoints as measured positive going against the secondary.

diameter_1

Diameter (B) at active point.

diameter_2

Diameter (C) at the opposite end.

Examples

SYMBOL_PROCESSOR 'ECONE' tutnam = 'ECONE' Call Display_Tutorial (tutnam) A = DIMENSION_1 ! length B = DIMENSION_2 ! diameter at active pt C = DIMENSION_3 ! diameter at opposite end offset = (C - B) * 0.5 ! offset Call Define_Placepoint (PP1, Point_0) Call Draw_Eccentric_Cone (A, offset, B, C) Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0)

Eden Language Structure

stop

end

Draw Projected Rectangle

The Draw Projected Rectangle primitive allows you to place a component with a rectangular cross section. The current active point must be moved to the center of the rectangle, and the primary axis must point in the direction of the projection. The secondary axis orients the side of

length1.

Eden Language Structure stop end Draw Projected Rectangle The Draw Projected Rectangle primitive allows you to

You must specify the projected height, projected width, and projected length dimensions.

Syntax

Call Draw_Proj_Rectangle (length1, length2, projection)

Options

length1

Length of the rectangle side (C) parallel to the secondary axis of the active orientation.

length2

Length of the rectangle side (B) parallel to the normal axis of the active orientation.

projection

Length of the projection (A).

Restrictions

  • The active point must be located at the center of geometric shape of the rectangle.

  • The refresh tee must point inward (the direction of projection).

Examples

SYMBOL_PROCESSOR 'RECTNG' tutnam = 'RECTNG' Call Display_Tutorial (tutnam) A = DIMENSION_1 ! length of projection B = DIMENSION_2 ! length of side parallel to normal C = DIMENSION_3 ! length of side parallel to secondary Call Define_Placepoint (PP1, POINT_0) Call Draw_Proj_Rectangle (C, B, A) Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0) stop end

Eden Language Structure

Draw Projected Triangle

The Draw Projected Triangle primitive allows you to place a component that has an isosceles triangular cross-section. The current active point must be moved to the center of the cross-section. The primary axis points in the direction of the projection, and the secondary axis points to the base of the triangle. You must specify the side length, base length, and projected length dimensions.

Eden Language Structure Draw Projected Triangle The Draw Projected Triangle primitive allows you to place

Syntax

Call Draw_Proj_Triangle (project_side_length, project_base_length, project_length)

Options

project_side_length

project_base_length

project_length

Restrictions

Length of the side (A) of the triangle. Length of the base (B) of the triangle. Length of the projection (C).

  • The active point must be located at the center of geometric shape of the triangle.

  • The refresh tee must point inward.

Eden Language Structure Draw Projected Triangle The Draw Projected Triangle primitive allows you to place

Make sure that dimension A is greater than 1/2 of dimension B, otherwise, errors will result.

Examples

SYMBOL_PROCESSOR 'TRIANG' tutnam = 'TRIANG' Call Display_Tutorial (tutnam) A = DIMENSION_1 ! length a side B = DIMENSION_2 ! length of base C = DIMENSION_3 ! length of projection angle = DIMENSION_4 if (B .GT. 0) then DIMENSION_4 = 0 endif if (angle .GT. 0 .AND. B .EQ. 0) then angle = angle * 0.5 B = 2.0 * (A * DSIND(angle)) endif Call Define_Placepoint (PP1, Point_0)

Eden Language Structure

Call Draw_Proj_Triangle (A, B, C) Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0) stop end

Draw Semi-Ellipsoid

The Draw Semi-Ellipsoid primitive allows you to place a semi-ellipsoid, where the center is at the current active point. You must specify the diameter of the major axis and the radius of the minor axis.

Eden Language Structure Call Draw_Proj_Triangle (A, B, C) Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0)

The system does not update to a new active orientation after placement of the semi-ellipsoid.

Eden Language Structure Call Draw_Proj_Triangle (A, B, C) Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0)

Syntax

Call Draw_Semi_Ellipsoid (major_axis_diameter, minor_axis_radius)

Options

major_axis_diameter

minor_axis_radius

Examples

Variable defining the major axis diameter (A). Variable defining the minor axis radius (B).

SYMBOL_PROCESSOR 'SELLIP' tutnam = 'SELLIP' Call Display_Tutorial (tutnam) A = DIMENSION_1 ! major axis diameter B = DIMENSION_2 ! minor axis radius Call Define_Placepoint (PP1, Point_0) Call Draw_Semi_Ellipsoid (A, B) stop end

Eden Language Structure

Draw Sphere

The Draw Sphere primitive allows you to place a sphere where the center of the sphere is at the current active point. You must specify the radius, and the radius must be greater than or equal to () 1/64 inches.

Eden Language Structure Draw Sphere The Draw Sphere primitive allows you to place a sphere

The refresh tee and orientation will not change after placement.

Eden Language Structure Draw Sphere The Draw Sphere primitive allows you to place a sphere

Syntax

Call Draw_Sphere (radius)

Options

radius

Variable (A) defining the sphere radius.

Examples

A = F_to_C_Dim_1*0.5 ! defining sphere radius Call Draw_Sphere (A)

Draw Torus

The Draw Torus primitive allows you to place a torus from the current flow centerline to the current direction of the secondary axis using the bend radius, bend angle, and diameter you specify. This call changes the active orientation.

Eden Language Structure Draw Sphere The Draw Sphere primitive allows you to place a sphere

The torus diameter must be greater than or equal to () 1/32 inches, and the bend radius diameter must be greater than or equal to () 1/32 inches and greater than (>) 1/2 the torus diameter.

Eden Language Structure

Syntax

Call Draw_Torus (radius, angle, diameter)

Options

radius

The bend radius of the torus (B) as measured from the origin of the torus to its centerline.

angle

The bend angle of the torus (C).

diameter

The diameter of the torus (A).

Examples

SYMBOL_PROCESSOR 'CTORUS' tutnam = 'CTORUS' Call Display_Tutorial (tutnam) A = DIMENSION_1 ! torus diameter B = DIMENSION_2 ! torus bend radius if (DIMENSION_3 .eq. 0) then DIMENSION_3 = 90 endif C = DIMENSION_3 ! bend angle Call Define_Placepoint (PP1, Point_0) Call Draw_Torus (B, C, A) Call Rotate_Orientation (-180., SECONDARY) Call Define_Placepoint (PP2, POINT_0) stop end

Abort

The Abort primitive allows you to terminate symbol execution without having to place graphics. It is similar to the QUIT option available on symbol tutorials. When the system encounters an Abort call, it displays a message indicating that the symbol execution has aborted.

Syntax

Call Abort (0)

Convert Unit

The Convert Unit primitive is used to convert distance in a given system of units to the design file system of units. Both lengths are expressed in subunits.

Syntax

Call Convert_Unit (length1, unit type, outlength)

Options

length1

Is the input length in subunits.

unit type

Is the input as ENGLISH (for inches) or METRIC (for mm) to indicate the units in which length1 is expressed.

Eden Language Structure

outlength

Example

Is the output after converting length1 to design file system of units.

In the following example, a length of 10 inches is input. length2 receives the value 10 if the unit type is set to English or 254 if the unit type is set to Metric.

Call Convert_Unit (10, ENGLISH, length2)

Define Active Point

The Define Active Point primitive functions similarly to the Define Active Orientation primitive, but also defines the active point in the symbol's local coordinate system.

Syntax

Call Define_Active_Point (point)

Options

point

Is a keyword specifying a previously defined point. Valid values for point include:

local point variables global point variables PP_LOCATION_q (q = 1 - 10)

Restrictions

  • The initial position of the active point must be located at the symbol's local coordinate system origin.

  • Before using POINT_n, you must define it by calling Define Point.

  • Before using PP_LOCATION_q, you must define it by calling Define Placepoint.

Example

Call Define_Active_Point (POINT_3) Call Define_Active_Point (PP_LOCATION_1)

Define Datum Point

The Define Datum Point primitive allows you to define and place up to 30 datum points per symbol. The orientation of the datum point is controlled by the active orientation at the time of the call.

Syntax

Call Define_Datum_Point (dp, point)

Options

dp

Is a keyword specifying the datum point number. Valid values include:

1

...

30

Eden Language Structure

point

Is a keyword specifying the datum point location. Valid values include:

ACTIVE_POINT local point variable global point variable

PP_LOCATION [1]

...

PP_LOCATION [10]

Example

In the following example, the call defines dp [1]. Its location is given by point_2. Call Define_Datum_Point (dp [1], point_2 )

Eden Language Structure point Is a keyword specifying the datum point location. Valid values include: ACTIVE_POINT

In the Add and Modify & Copy commands, this call will not replace or add to existing datum points for the equipment. In the Modify mode, it will replace existing datum points only if they are still associated with the symbol being modified. (Refer to the PDS Equipment Modeling (PD_EQP) Reference Guide for more information.) In either case, if nonparametric datum points already exist for the piece of equipment, Define Datum Point calls will have no effect.

Define Library

The Define Library primitive allows you to activate an alternate physical data library.

Syntax

Call Define_Library (library_no)

 

Options

library_no

Is a keyword, variable, or expression whose numeric value specifies which library is to be opened next. Valid values and their symbolic keywords include:

1 - ENG_COMM_LIB

3 - EQP_TABLES ACT_LIB

The piping physical data library. The equipment physical data library.

Keyword that allows you to see which commodity library is currently open. ACT_LIB is a read-only variable and can only be set by the system following a successful Define_Library call. When a symbol is first called up, the system automatically opens the correct commodity library depending on the nozzle diameter system of units for the file and then sets ACT_LIB to 1 (ENG_COMM_LIB). Therefore, at the beginning of symbol execution, you can always expect the default piping physical data library to be open. Subsequently, with the Define_Library primitive, you can change the active library.

Example

In the following example, the active library number (1 or 3) is saved, and the English commodity library is temporarily opened. When the library is no longer needed, the previously active library is restored.

save_library = ACT_LIB Call Define_Library (ENG_COMM_LIB) .

Eden Language Structure

. . Call Define_Library (save_library)

-OR-

save_library = ACT_LIB Call Define_Library (1) . . . Call Define_Library (save_library)

Define Nozzle

The Define Nozzle primitive places a nozzle at the current active point using the current active orientation. Before calling this primitive, you must call Retrieve Nozzle Parameters and set the necessary global variable assignments, such as Noz_Length1, Noz_Length2, or Noz_Radius.

Syntax

Call Define_Nozzle (noz_type, noz_num, noz_end)

Options

Noz_type

A character variable or constant defining the nozzle type. Valid values include:

’NOZ1’

  • 1 for type 1 nozzles. Consists of a basic flange.

’NOZ1’ 1 for type 1 nozzles. Consists of a basic flange. No user input is required.

No user input is required. The nozzle length is set by the flange thickness table.

’NOZ2’

  • 2 for type 2 nozzles. Consists of a flange as well as a neck.

The length is user-defined.

The length is user-defined.

A = Noz_Length1

  • 3 for type 3 nozzles. Commonly referred to as a goose neck nozzle.

NOZ3

Eden Language Structure

Eden Language Structure Two lengths and the bend radius are user-defined. A = Noz_Length1 B =

Two lengths and the bend radius are user-defined. A = Noz_Length1 B = Noz_Length2 C = Noz_Radius

Noz_num

A nozzle number that uniquely identifies the nozzle within the parametric symbol. The nozzle number must NOT be used for more than one nozzle within a parametric symbol definition. Currently, this number can take on a value of 1 to 20, inclusively. Therefore, a single parametric can not have more than 20 nozzles.

Noz_end

A variable or constant with a value of 1 or 2 that defines the end of the nozzle placed at the active point. A value of 1 specifies the end connected to the equipment item. A value of 2 specifies the end connected to piping.The primary axis of the active orientation is used to orient both type 1 and type 2 nozzles. The primary and secondary axes are used to orient type 3 nozzles.

Example

SYMBOL_PROCESSOR 'NOZ1' tutnam = 'NOZ1' Call Display_Tutorial (tutnam) nozend = DIMENSION_100 nozsum = 20 Call Retreive_Nozzle_Parameters (nozsum) Call Define_Nozzle ('NOZ1', noznum, nozend) stop end

Eden Language Structure Two lengths and the bend radius are user-defined. A = Noz_Length1 B =

You must call Retrieve Nozzle Parameters before Define Nozzle.

Define Orientation By Points

The Define Orientation By Points primitive allows you to redefine the active orientation using three known points.

Syntax

Call Define_Orientation_By_Points (PT1, PT2, PT3)

Options

pt1

The active primary direction is computed using pt1 as the start point. Global or local point.

Eden Language Structure

pt2

The active primary direction is computed using pt2 as the end point. Global or local point.

pt3

The active secondary direction is computed using pt3 as the end point. The

start point is the intersection between the primary vector from pt1 and its perpendicular from pt3. Global or local point. In case one or more of these points are coincident, the active orientation is unchanged.

Example

In the following example, the call orients the active primary along the line from POINT_1 to POINT_2, and the active secondary towards POINT_3 along a perpendicular of the primary:

Call Define_Orientation_By_Points (point [1], point [2], point [3])

Define Placepoint

The Define Placepoint primitive allows you to define the symbol placepoint. Every symbol must have at least one place point.

Syntax

Call Define_Placepoint (pp, point)

Options

pp

A keyword defining the placepoint number. Valid values for pp include:

PP1 - PP10

Up to 10 placepoints can be defined for a symbol.

point

Keyword defining the place point location. Valid values for point include:

ACTIVE_POINT local point variables global point variables pp_location_1 - pp_location_10

Example

In this example, place point number 1 is defined.

Call Define_Placepoint (PP1, POINT_0)

At symbol placement time, the symbol place point is aligned with the current design file active point. The place point's primary axis is aligned with the design file active orientation primary axis. Therefore, the symbol's local coordinate system is transformed to that defined by the refresh tee.

Eden Language Structure

Define Point

The Define Point primitive allows you to save a point or to calculate a new point based on a reference point and a delta x, y, and z.

Syntax

Call Define_Point (point, ref_point, delta_x, delta_y, delta_z, flag)

Options

point

ref_point

delta_x

delta_y

delta_z

flag

Examples

A keyword specifying the saved or calculated point storage location. Local or global point variables are valid values.

A keyword specifying the point to be saved or the point from which the new point is to be calculated. Valid values for ref_point include:

local point variable global point variable pp_location_1 - pp_location_10

The delta in the x or east direction of the symbol coordinate system from the reference point.

The delta in the y or north direction of the symbol coordinate system from the reference point.

The delta in the z or up direction of the symbol coordinate system from the reference point.

[optional] If supplied, the deltas are interpreted as offsets along the active primary, secondary, and normal respectively.

  • In this example, the current active point is saved in POINT_1. You can make POINT_1 the active point again simply by calling Define Active Point.

Call Define_Point (POINT_1, ACTIVE_POINT, 0, 0, 0)

  • In this example, a new point is calculated from POINT_1. The result is saved in POINT_2.

delx = 24. dely = 24. delz = 24. Call define_point (POINT_2, POINT_1, delx, dely, delz)

Eden Language Structure

Display Message

The Display Message primitive allows you to display a message in a tutorial field or MicroStation 'ER' field.

Syntax

Call Display_Message (message, fldno)

Options

message

A variable or expression. If necessary, the message can be converted to displayable characters for output. You can specify a message up to 50 characters in length; however, only the first 40 characters will be displayed.

fldno

A field number on the active tutorial. Possible values are 0 - 255. If 0, the message is displayed in the MicroStation ’ER’ field.

[optional] This argument defaults to 0 if omitted.

Eden Language Structure Display Message The Display Message primitive allows you to display a message

Tutorial fields defined (via TDF) to contain data for symbol generation should not receive input through this call.

Example

dia = -10.0 . . . Call Display_Message ('Cone dia is negative: ' || dia, 0 )

The actual message displayed in the 'ER' field will read: Cone dia is negative: -10.0

Display Tutorial

The Display Tutorial primitive allows you to activate a tutorial and specify an optional tutorial definition file name.

Syntax

Call Display_Tutorial (tutnam, tdfnam)

Options

tutnam

Name of the form (1 - 6 characters) to be activated.

tdfnam

[optional] The tutorial file name (1 - 6 characters). If omitted, the TDF name defaults to the tutorial name itself. This argument allows you to activate the same tutorial with different TDF names and hence different global variables for each activation. The same TDF name can be used with different tutorials.

Example

This call activates a tutorial named TEST. Call Display_Tutorial ('TEST')

Eden Language Structure

Eden Language Structure There is a limit of 10 forms that can be activated. It is

There is a limit of 10 forms that can be activated. It is also possible to activate the same form several times per symbol execution. However, if a TDF name is used with several forms in the modify mode, only the first such form will display existing data.

Interacting with Tutorials

Terminated fields allow the symbol code some control over operator interaction when a tutorial is active. Refer to the Creating the Tutorial Definition Table section for creating these fields. When you select a terminated application command or key-in field, the control returns to the symbol code, which can test specific global variables identifying the field number and its type. The global variable LAST_INP_TYPE has the type of the most recent terminated field selected. It can be tested against the following keywords for field types:

APPLICATION_CMD

USER_KEYIN

application command field user key-in field

The global variable LAST_INP_NUM contains the number of the last terminated field selected.

Example

Three possible operator actions can result in control returning to the symbol code for the example below. The first test is against a terminated application field selection. If positive, the data in DIMENSION [LAST_INP_NUM] is accessed and output to field 90.

The second test is for the selection of a terminated key-in field. The contents of CSTRING [LAST_INP_NUM] is output to field 100. The receiving variable for the keyed-in text is stored as per TDF.

The symbol waits for further operator input by calling Display Tutorial. The tutorial does not redisplay since it is already active.

If both tests fail, you must select ACCEPT (the control variable will be set to TRUE), forcing exit from the loop.

ACCEPTED = FALSE do while (.not. ACCEPTED) Call Display_Tutorial ('TEST') if (LAST_INP_TYPE .eq. APPLICATION_CMD) then ! application cmd

!

field

... Call Put_Field (dimension [LAST_INP_NUM], 90) else if (LAST_INP_TYPE .eq. USER_KEYIN) then Call Put_Field (cstring [LAST_INP_NUM],100) else ACCEPTED = TRUE ! get out of loop endif endif enddo

Eden Language Structure

Draw Arc

The Draw Arc primitive allows you to place an arc. An arc may be considered a continuous segment of an ellipse whose axes are known.

Syntax

Call Draw_Arc (semimajor, semiminor, start_angle, sweep_angle)

Options

semimajor

Supplies the length of the semimajor axis and is oriented by the local primary.

semiminor

Supplies the length of the semiminor axis and is oriented by the local secondary.

start_angle

Specifies the start point of the arc segment. The value range is -360.0 to 360.0. Larger or smaller values are reduced to this range, remaindering by 360.0. Positive angles are measured by rotating the primary into the secondary counterclockwise in a right-handed system.

sweep_angle

Specifies the span of the arc segment. The value range is -360.0 to 360.0. Larger or smaller values are reduced to this range, remaindering by 360.0. Rotational sense is counterclockwise, right-handed, from start_angle.

The parent ellipse is completely known given the active primary,

secondary and the axis lengths. The two angles merely fix the arc’s

angular position and not the distance of any of its points from the foci.

Example

This call places an elliptical arc with major and minor axes of 40 and 20 units respectively. The primary axis is rotated from a 90 degree position through a right angle to produce the arc.

Call Draw_Arc (20, 10, 90, 90)

Eden Language Structure Draw Arc The Draw Arc primitive allows you to place an arc.

If you are placing a non-circular arc with start or sweep angles that are NOT a multiple of 90 degrees, MicroStation computes these angles differently. To convert your angle to the input argument, use the following formula:

tan(microstation_angle) = (semimajor/semiminor) tan(your_angle)

Eden Language Structure

Draw Complex Surface

The Draw Complex Surface primitive allows you to build projected and revolved shapes one element at a time. Familiarity with the structure of 3D MicroStation shapes is required to use this primitive effectively.

Eden Language Structure Draw Complex Surface The Draw Complex Surface primitive allows you to build projected

There is a limitation on using multiple Draw Line commands for getting a complex shape inside Draw Complex Surface to create new support symbols. You must use the line strings or projected shape to create complex shapes.

Syntax

Call Draw_Complex_Surface (argument_1, argument_2)

The call can be made in three modes:

  • 1. Start surface

  • 2. Change class or symbology of elements being placed

  • 3. End surface

Each argument has a different interpretation for each mode.

Start Surface

Used to start the surface.

Syntax

Call Draw_Complex_Surface (no_of_ele, surface_type)

Options

no_of_ele

The number of elements per face.

surface_type

The MicroStation surface type to build. Typical surface types include:

  • 0 - surface of projection

  • 8 - surface of revolution

Change Class/Symbology

Used to change the class/symbology of elements being placed within the surface. A negative symbol must be placed in front of the first argument.

Syntax

Call Draw_Complex_Surface (_element_class, symbology)

Options

element_class

The class of elements to be placed. Typical classes include:

primary elements (class = 0, the default) rule elements (class = 4)

symbology

The symbology of elements to be placed.

This is an INTEGER (I*4 or 4 bytes) word. The upper word (2 bytes) is set to:

Eden Language Structure

  • 0 - allows defaults to apply

  • 1 - apply line code only

  • 2 - apply line weight only

  • 4 - apply color only

Sum the above values to send in combinations. For example, (3) code and weight to apply is the result of adding (1) apply line code only and (2) apply line weight only. Using this process, you can enter numbers 0-7 (default to all of the above).

The lower word supplies the symbology (line code, line weight, color) as per MicroStation format.

Complete Surface

Used to complete the surface.

Syntax

Call Draw_Complex_Surface (-99, 0)

Example

This example shows the creation of a flat-oval projected shape. The opening Draw Complex Surface specifies that each face is composed of 4 elements and that this is a surface of projection.

Eden Language Structure 0 - allows defaults to apply 1 - apply line code only

The code for placing a flat-oval face is shown (2 arcs and 2 lines). The second call to Draw Complex Surface specifies that rule lines (class=4) will be placed. The minus sign before the class argument is needed by the system to identify ongoing calls. The final call terminates surface construction.

Call Draw_Complex_Surface (4, 0) ! start projected; Call Draw_Arc (radius, radius, -90, 180) Call Draw_Line (point_1, point_2) Call Draw_Arc (radius, radius, 90, 180) Call Draw_Line (point_3, point_4) Call Draw_Complex_Surface (4, 0) ! surface 2 Call Draw_Arc (radius, radius, -90, 180) Call Draw_Line (point_5, point_6) Call Draw_Arc (radius, radius, 90, 180)

Eden Language Structure

Call Draw_Line (point_7, point_8) Call Draw_Complex_Surface (-4, 0) ! start rule lines Call Draw_Line (point_1, point_5) ! place a rule line Call Draw_Line (point_2, point_6) ! place a rule line Call Draw_Line (point_3, point_7) ! place a rule line Call Draw_Line (point_4, point_8) ! place a rule line Call Draw_Complex_Surface (-99, 0) ! wrap it up

Draw Con Prism

The Draw Con Prism primitive places a concentric prism by a point in the center of either rectangular end. The active orientation primary axis is used to orient the direction of projection. The secondary axis orients a side of each end.

Syntax

Call Draw_Con_Prism (length_sec, length_norm, length_proj, length2_sec,

length2_norm)

Options

length_sec

The length of rectangular base along secondary.

length_norm

The length of rectangular base along normal.

length_proj

The length of projection.

length2_sec

The length of rectangular top along secondary.

length2_nor

The length of rectangular top along normal.

Example

SYMBOL_PROCESSOR 'RPRISM' tutnam = 'RPRISM' Call Display_Tutorial (tutnam)

A = DIMENSION_1 ! length of A B = DIMENSION_2 ! length of B

  • C = DIMENSION_3 ! length of C

  • D = DIMENSION_4 ! length of D

proj = DIMENSION_5 ! length of E Call Define_Placepoint (PP1,POINT_0) Call Draw_Con_Prism (A, B, proj, C, D) Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0) stop end

Eden Language Structure

Draw Curve

The Draw Curve primitive allows you to place a curve string.

Syntax

Call Draw_Curve (no_vertex, point_buffer)

 

Options

no_vertex

The number of vertices from 1 - 90.

point_buffer

The location of the 1st vertex. The other vertices are sequentially stored in the buffer. Use global or local point buffers.

Example

In this example, the call places a stream curve of 20 points in POINT [24]

POINT [43].

Call Draw_Curve (20, point_24)

Eden Language Structure Draw Curve The Draw Curve primitive allows you to place a curve

This primitive is not supported by the equipment task but is available in the HVAC task.

Draw Ecc Prism

The Draw Ecc Prism primitive places an eccentric prism by a point in the center of either rectangular end. The active orientation primary axis orients the direction of projection. The secondary axis orients a side of each end as well as the offset direction.

Eden Language Structure Draw Curve The Draw Curve primitive allows you to place a curve

Syntax

Call Draw_Ecc_Prism (length_sec, length_norm, length_proj, length2_sec, length2_norm, offset)

Options

length_sec

The length of rectangular base along secondary.

length_norm

The length of rectangular base along normal.

length_proj

The length of projection.

length2_sec

The length of rectangular top along secondary.

Eden Language Structure

length2_norm

The length of rectangular top along normal.

offset

The center-to-center distance between base end and top end measured (positive) against the secondary.

Example

SYMBOL_PROCESSOR 'EPRISM' tutnam = 'EPRISM' Call Display_tutorial (tutnam) A = DIMENSION_1 ! length of A

B = DIMENSION_2 ! length of B

  • C = DIMENSION_4 ! length of C

  • D = DIMENSION_5 ! length of D

E = DIMENSION_3 ! length of E offset = (A - C) / 2.0 ! offset

Call Define_Placepoint (PP1, POINT_0) Call Draw_Ecc_Prism (A, B, E, C, D, offset) Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0) stop end

Draw Ecc Transitional Element

The Draw Ecc Transitional Element primitive allows you to place an eccentric transitional element by a point in the center of either the rectangular or circular face. The active orientation primary axis orients the direction of projection. The secondary axis orients a side of the rectangular base and the direction of offset.

Eden Language Structure length2_norm The length of rectangular top along normal. offset The center-to-center distance between

Syntax

Call Draw_Ecc_Transitional_Element (length_sec, length_norm, length_proj, length_radius, offset)

Options

length_sec

The length of rectangular base along secondary.

length_norm

The length of rectangular base along normal.

length_proj

The length of projection.

length_radius

The radius of circular face.

Eden Language Structure

offset

The center-to-center distance between the rectangular end and the circular end as measured positive going against the active secondary.

Example

SYMBOL_PROCESSOR 'ETRANS' tutnam = 'ETRANS' Call Display_tutorial (tutnam) A = DIMENSION_1 ! length of A

B = DIMENSION_2 ! length of B

  • C = DIMENSION_3 ! length of C

  • D = DIMENSION_4 / 2.0 ! length of D

offset = (A - D) / 2.0 ! offset

Call Define_Placepoint (PP1, POINT_0) Call Draw_Ecc_Transitional_Element (A, B, C, D, offset) Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0) stop end

Draw Ellipse

The Draw Ellipse primitive allows you to place an ellipse. The major and minor axes are oriented by the local primary and secondary axes respectively.

Eden Language Structure offset The center-to-center distance between the rectangular end and the circular end

Syntax

Call Draw_Ellipse (semimajor_len, semiminor_len)

Options

semimajor_len

Half the length of the major axis.

semiminor_len

Half the length of the minor axis.

Example

This call places an ellipse whose major and minor axes are 40 and 20 units long. The major axis points DOWN.

Call Define_Active_Orientation ( DOWN, WEST ) Call Draw_Ellipse (20.0, 10.0)

Eden Language Structure

Draw Line

The Draw Line primitive allows you to place a line.

Eden Language Structure Draw Line The Draw Line primitive allows you to place a line. Syntax

Syntax

Call Draw_Line (start_pt, end_pt)

Options

start_pt

The location of first vertex. Use global or local point.

end_pt

The location of second vertex. Use global or local point.

Example

In this example, the call places a line from POINT_10 to POINT_20.

Call Draw_Line (point_10, point 20)

Draw Line String

The Draw Line String primitive allows you to place a line string.

Eden Language Structure Draw Line The Draw Line primitive allows you to place a line. Syntax

Syntax

Call Draw_Line_String (no_vertex, point_buffer)

Options

no_vertex

Supplies the number of vertices from 1 - 90.

point_buffer

The location of the first vertex. The other vertices are sequentially stored in the buffer. Use global or local point buffers.

Example

In this example, the call places a line string of 20 vertices, which are found in POINT[24]

[43].

...

POINT

Call Draw_Line_String (20, point [24] )

Eden Language Structure

Draw Proj Hexagon

The Draw Proj Hexagon primitive allows you to place a projected hexagon by a point in the center of a face. The active orientation primary axis orients the direction of projection. The secondary axis orients a flat of the hexagonal solid.

Eden Language Structure Draw Proj Hexagon The Draw Proj Hexagon primitive allows you to place

Syntax

Call Draw_Proj_Hexagon (side_length, proj)

Options

side_length

Side B is the side length.

proj

Side A is the length of the projection.

Example

SYMBOL_PROCESSOR 'HEXAGON' tutnam = 'HEXAGON' Call Display_Tutorial (tutnam) A = DIMENSION_1 ! length of A D_in = DIMENSION_2 ! D_out = DIMENSION_3 ! D_side = DIMENSION_4 ! if (D_side .GT. 0) then DIMENSION_2 = 0 DIMENSION_3 = 0 endif if (D_side .LE. 0) then if (D_in .GT. 0) then DIMENSION_3 = 0 D_side = D_in * DTAND(30.0) endif endif if (D_side .LE. 0) then if (D_out .GT. 0) then D_side = D_out / 2 DIMENSION_2 = 0 endif endif Call Define_Placepoint (PP1, POINT_0) Call Draw_Proj_Hexagon (D_side, A)

Eden Language Structure

Call Define_Active_Orientation (WEST, NORTH) Call Define_Placepoint (PP2, POINT_0) stop end

Draw Proj Octagon

The