Web hosting

Custom Email

SiteBuilder

Relations
Relations (also known as parametric relations) are user-defined equations written between symbolic dimensions and parameters. Relations capture design relationships within features or parts, or among assembly components, thereby allowing users to control the effects of modifications on models. Topic Relations Basics Adding Relations Modifying Relations Viewing Relations Sorting Relations Selecting the Model or Feature Specifying a Feature and Model in a Relation Creating Relations in Parts Creating Relations in Features Creating Relations in Patterns Creating Relations in Assemblies Creating Relations in Sections System Parameters User Parameters

Relations Basics
Relations are a way of capturing design knowledge and intent. Like parameters, they are used to drive models--change the relation and you change the model. Relations can be used to control the effects of modifications on models, to define values for dimensions in parts and assemblies, and to act as constraints for design conditions (for example, specifying the location of a hole in relation to the edge of a part). They are used in the design process to describe conditional

relationships between different parts of a model or assembly. Relations can be simple values (for example, d1=4) or complex conditional branching statements.

Relation Types
There are two types of relations:

Equality--Equates a parameter on the left side of the equation with an expression on the right side. This type of relation is used for assigning values to dimensions and parameters. For example: Simple assignment: d1 = 4.75 More complex assignment: d5 = d2*(SQRT(d7/3.0+d4))

Comparison--Compares an expression on the left side of the equation with an expression on the right side. This type of relation is commonly used as a constraint or in conditional statements for logical branching. For example: As a constraint: (d1 + d2) > (d3 + 2.5) In a conditional statement: IF (d1 + 2.5) >= d7

Parameter Symbols
There are four types of parameter symbols used in relations:

Dimension symbols--The following dimension symbol types are supported: o d#--Dimensions in Part or Assembly mode. o d#:#--Dimensions in Assembly mode. The assembly or component's session ID number is added as a suffix. For more information, see Creating Relations in Features . o rd#--Reference dimensions in part or top-level assembly. o rd#:#--Reference dimensions in Assembly mode. (The assembly or component's session ID number is added as a suffix.) o rsd#--Reference dimensions in sketcher (section). o kd#--Known dimensions (in parent part or assembly) in sketch (section). Tolerances--These are parameters associated with tolerance formats. These symbols appear when dimensions are switched from numeric to symbolic. o tpm#--Tolerance in plus-minus symmetrical format; # is the dimension number. o tp#--Positive tolerance in plus-minus format; # is the dimension number. o tm#--Negative tolerance in plus-minus format; # is the dimension number. Number of Instances--These are integer parameters for the number of instances in a direction of a pattern. o p#--Where # is the number of instances.

Note:

respectively. and 4. rd#. #.0.14159 (You cannot change this value.0. because they are reserved for use with dimensions: User parameter names cannot contain nonalphanumeric characters such as !. C2. kd#. and \$.) You can change the values of these system parameters using the Add command from the RELATIONS menu. C3.If you change the instance number to a non-integer value. tp#. The changed values are then used in all models for the current session. You cannot use d#.'' Notes: • • • User parameter names must begin with a letter if they are to be used in relations.0. tm#. Operators and Functions The following operators and functions can be used in relations--both in equations and in conditional statements. 2.) G (gravitational constant) Default value = 9. @. 2. The following parameters are reserved for use by the system: PI (geometric constant) Value = 3. For example. Arithmetic Operators + Addition . and C4 are default values and equal 1. or tpm# as user parameter names.0. • User Parameters--These can be parameters defined by adding a parameter or a relation: For example: Volume = d0*d1*d2 Vendor = ``Stockton Corp.90 becomes 2. 3.8 meters/sec2 (C1. Pro/ENGINEER truncates it.

the following relation returns TRUE whenever d1 is greater than or equal to 3. When it is used.5. d0 = (d1-d2)*d3 Assignment Operator = Equal to The = sign is an assignment operator that equates the two sides of an equation or relation. For example. the equation can have only a single parameter on the left side. see Comparison Operators. Comparison Operators Comparison operators are used whenever a TRUE/FALSE value can be returned. It returns FALSE whenever d1 is less than 3.5: d1 >= 3.5 The following comparison operators are supported: .- Subtraction / Division * Multiplication ^ Exponentiation () Parentheses for grouping for example. For more information. Note: The ``equal to'' assignment operator is different from the ``equal to'' comparison operator.

For example.5 Mathematical Functions Relations may also include the following mathematical functions: cos () cosine .~= Not equal to < Less than <= Less than or equal to | Or & And ~. ! Not The operators|. !. but not equal to 2. and ~ extend the use of comparison relations by enabling several conditions to be set in a single statement. <>. &.5: d1 > 2 & d1 < 3 & d1 ~= 2.== Equal to > Greater than >= Greater than or equal to !=. the following relation returns TRUE whenever d1 is between 2 and 3.

tan () tangent sin () sine sqrt () square root asin () arc sine acos () arc cosine atan () arc tangent sinh () hyperbolic sine cosh () hyperbolic cosine tanh () hyperbolic tangent Note: All trigonometric functions use degrees. log() base 10 logarithm ln() natural logarithm exp() e to an exponential degree abs() absolute value ceil() the smallest integer not less than the real value .

The following examples show ceil and floor used without specifying number of decimal places: ceil (10. See the following figure. 2) evaluates to -10.floor() the largest integer not greater than the real value You can add an optional argument to both the ceil and the floor functions that allows you to specify a number of decimal places for rounding. x) where graph_name is the name of a graph and x is the value along the graph's x-axis for which the y value is returned. the number being rounded (the first argument) will not be rounded and the initial value will be used.255. .255. or assembly dimensions. 0) evaluates to 11 [This is the same as ceil (10. will function as in previous releases. The syntax for these functions. 2) evaluates to 10.26 ceil (10.2 floor (-10. The dimensions can be sketcher.255. see the Part Modeling User's Guide. number_of_dec_places) where number_of_dec_places is an optional value that: • • • can be represented as a number or as a user-defined parameter. If this value is exceeded. it will be truncated to an integer value. is: ceil (parameter_name or number.2) evaluates to -11 The following examples show ceil and floor used with specifying number of decimal places: ceil (10. part. number_of_dec_places) floor (parameter_name or number. The format is: evalgraph(``graph_name''.26 Graph Evaluation Graph evaluation enables you to use graph features to drive dimensions through relations.255. 1) evaluates to 10. For more information. has a maximum value of 8. If the parameter value is a real number. if not specified.2) evaluates to 11 floor (-10. with the rounding parameter.255)] floor (10.

Note: A graph feature is usually evaluated for its defined x-axis values. Likewise. For more information. the datum point does not have to be located on the curve. For more information. and Advanced Features in the Part Modeling User's Guide.0 . or else with 1. Blends. Composite Curve Trajectory Function The trajectory parameter of a composite curve. If the composite curve is used as the spine of a multi-trajectory sweep. ``pointname'') where trajname is the name of a composite curve and pointname is the name of a datum point. the system calculates the extrapolated value for values of x greater than the final value by extending a tangent line out from the final point. When it is evaluated beyond the defined range.trajpar (depending on your choice of starting point for the sweep feature). the parameter is calculated at the point on the curve that is closest to the datum point. and Advanced Features in the Part Modeling User's Guide. Blends. see Using Relations in Sweeps in Sweeps. Therefore. passes through the datum point.For sweep features. you can specify the trajectory parameter trajpar as the second argument of this function. then trajpar_of_pnt either agrees with the parameter trajpar at this plane. trajpar_of_pnt. can be used in relations. The trajectory is a parameter along the composite curve at which the plane.0 and 1. see Using Relations in Sweeps in Sweeps. the y-axis values are extrapolated. normal to the tangent of the curve. The system calculates the extrapolated value for values of x less than the initial value by extending a tangent line back from the initial point. The following function returns a value between 0. Other Functions The following functions allow you to pass strings as arguments: .0: trajpar_of_pnt(``trajname''.

rel_model_type() is equal to assembly. exists. suppose that there are several systems in a large assembly (such as hydraulic. pneumatic. or submodel structure. if the value for the string parameter material is defined as steel. For instance. rel_model_name() is equal to A. such as a parameter or dimension.• string_length()--Returns the number of characters in a parameter. the relation would look like the following: name = rel_model_name:2() Note that the ( ) are empty. you only need to assign the appropriate parameter to those models that belong in a system in order to make evaluations that are based on the parameter. exists()--Evaluates whether an item. For example. For example. the comment moves with it--and stays above it. see Sorting Relations . rel_model_name()--Returns the current model name. or electrical systems). . when the relation is sorted. An example of a comment in a relation is: /* Width is equal to 2*height d1 = 2*d2 The comment should come before the relation to which it applies. For more information. instead of the model name. if you are currently working in a part called A. This can apply to the model for which the relation is being evaluated. you would create a report parameter bom_name and write the following relation: if exists(``asm_mbr_cabling'') bom_name = part_no else bom_name = asm_mbr_name endif Comments Relations can be annotated using comments. For example: • • if exists(d5:20)-. or to any model. but the majority of objects belong to no system. string_length(material) • equals 5. To use this in a relation in an assembly. if items in the electrical system need to use a part number in the BOM report table. In this case. Then. • • rel_model_type()--Returns the current model type. component. If you are working in assembly mode. For example.Checks if model with runtime ID 20 has dimension d5 if exists (``par:fid_25:cid_12'')--checks if feature ID 25 in component ID 12 has parameter par This allows decisions to be based on a parameter that exists in only one part of a large assembly. because the word ``steel'' has five letters. Every comment line must begin with a slash and an asterisk.

\$d20 or \$depth). FOR d1.. For example. However. relations defined at different levels may conflict. suppose that you have a box of width d1 and height d2. Therefore. The FOR line lists the variables to be solved. d0). Note: Symbolic tolerances appear only for dimensions with plus-minus or symmetrical formats. Displaying Dimension Symbols Choosing the Relations command automatically switches the dimension display to symbolic format (for example. You can switch between symbolic and numeric dimension formats using the Switch Dim command. You can use the Show Dim command to display given dimensions in a given model. Negative Dimensions If you are using negative dimensions. see Viewing Relations Note: Relations are not evaluated until the model is regenerated.Within a given model.. If a model's dimensions are not already displayed when you choose Relations. the later relation overrides the earlier one. Use the tools available for viewing your relations to make sure that they fulfill your design intent. precede the symbol with a dollar sign (for example. relations are evaluated starting with the first relation you entered and ending with the most recent relation you entered.. For more information. Other format types display only the dimension symbol. in some cases. This must be done regardless of the setting for the configuration option show_dim_sign. pick the feature or part whose dimensions you want to display. Any variables that appear in the simultaneous . and that you want to specify the following conditions: • • The area equals 100 The perimeter length equals 50 You can enter the following simultaneous equations: SOLVE d1*d2 = 100 2*(d1+d2) = 50 FOR d1 d2 . and you want to capture the true signed value in your relation. if a parameter is driven by two relations..or.d2 All lines between the SOLVE and FOR statements become part of the simultaneous equations. Simultaneous Equations Simultaneous equations are relations in which several variables or dimensions must be solved simultaneously.

only one set is returned. You can add extra code downstream from simultaneous equations to specify a solution when there is more than one. the two possible sets of solutions are d1=5. in the preceding examples.equations but not in the FOR list are interpreted as constants. These values may be used interchangeably in the conditional statement. Conditional Statements IF Statement IF statements may be added to relations to form conditional statements. d2=5. omitting area = 100 in the preceding relation would cause an error.0 ENDIF A condition is an expression that is either TRUE (or YES) or FALSE (or NO).5 ENDIF IF d1 <= d2 length = 7. Relations defined by simultaneous equations can be freely intermixed with single variable relations. see Conditional Statements. you could have entered the following instead: area = 100 perimeter = 50 SOLVE d1*d2 = area 2*(d1 + d2) = perimeter FOR d1 d2 Variables used in simultaneous equations must be initialized beforehand. and they can be edited using Edit Rel. Note: Even if there is more than one solution for the system of equations. Both are displayed when you select Show Rel. Thus. For example. For example the following statements can all be evaluated the same way: . For example. For example: IF d1 > d2 length = 14. d2=20 and d1=20. You might want to add the constraint d1 <= d2 by adding the following conditional code: IF d1 >d2 temp = d1 d1 = d2 d2 = temp ENDIF For more information.

With these statements. and the ENDIF statements. the previous relation may be modified to look like the following: IF d1 > d2 length = 14.5 ELSE length = 7. String Values for Parameters String values can be entered for parameters. ELSE. Equal in conditional statements must be entered as two equal signs (==). ELSE must be on a line by itself. The drawing note would use the parameter name within the note. The syntax of the IF clause is as follows: IF <condition> Sequence of 0 or more relations or IF clauses ELSE <optional> Sequence of 0 or more relations or IF clauses <optional> ENDIF Notes: • • • ENDIF must always be spelled as one word. String values are entered between double quotation marks.IF ANSWER == YES IF ANSWER == TRUE IF ANSWER ELSE Statement Even more complex conditional constructions may be achieved by using ELSE statements in the branches. In addition. Assignment must be entered as a single equal sign (=).0 ENDIF There can be several features listed between the IF. and the model relation would look like this: IF d1 > d2 MIL_REF = ``MIL-STD XXXXA'' ELSE MIL_REF = ``MIL-STD XXXXB'' ENDIF Operators and Functions The following operators and functions are supported for strings: . the IF--ELSE--ENDIF constructions can also be nested within feature sequences that are a model of some other IF--ELSE--ENDIF construction. An example of the use of strings is a reference on a drawing that depends on the size of a feature parameter.

For example: If param = abcdef. where = search(param.2. bcd)--where is 2. !=. <>.3)--new is bcd. Non-integers are rounded off. flag = abcdef != ghi--Returns TRUE. substring) Searches for substrings. position. bcd)--where is 0. Here. length) Extracts pieces of strings. Modifying Relations Editing Relations . new = param + ghi--new is abcdefghi.== Compares strings as equal. ~= Compares strings as unequal. + Concatenates strings. int can be a number or an expression. new = itos(10 + 7)--new is 17.5)--new is abcdef2. where = search(param. itos(int) Converts integers to strings. then: • • • • • • • • flag = param == abcdef--Returns TRUE. search(string. The resulting value is the position of the substring in the string (0 if not found). new = param + itos(1. extract(string. new = extract(param.

added. If you are using the system editor. depending on the editor specified in the configuration file option pro_editor_command. or commented on at any other time by choosing Edit Rel from the RELATIONS menu. 2. delete the error messages after you have corrected the erroneous relations. Pro/ENGINEER does not remove these messages by itself. it is ignored. Three kinds of error messages can appear in a relations file: • • • Long line--The relations line has more than 80 characters. If you are using Pro/TABLE. and. You can also check the validity of relations using Show Rel. The relations are updated automatically. If an unclosed simultaneous relation is encountered. the relations appears in a tabular format. 4. 3. If you are editing the relations to correct errors detected by Pro/ENGINEER. Edit the line. Note: Constraint violations are not trapped by this error check. Exit the editor to return to Pro/ENGINEER. You can then correct the flagged relations. Relations added using Edit Rel are not checked for errors. Note: Although you can add relations using the Edit Rel command. for example. immediately places you back into edit mode and flags the erroneous relations. . or break the relation into two lines by entering a backslash (\) to indicate that the relation continues on the next line. Relations can be modified. deleted. Regenerate the model to cause the updated relations to change the model. a warning appears in the message area. Error--A parse error occurred. Edit the relations using the appropriate editor commands. If a simultaneous relation fails to converge. If a relation added using Edit Rel is incorrect. Choosing Add checks relational input and flags the user with an error message if a relation is incorrect. How to Edit a Relation 1.Relations are stored with the model and may be edited at any time during model creation. Errors in Relations Pro/ENGINEER checks the validity of relations in a file that has just been edited. Edit the symbol name to be less than 31 characters. You can use either the system text editor or Pro/TABLE. a parameter was not defined. Choose RELATIONS > Edit Rel. Long sym--A symbol name has more than 31 characters. an error message appears on an empty line after the last relation line. a text file appears. Evaluate the relations for the error and edit accordingly. this method is not recommended. if it finds errors in the relations file.

select the name of the parameter you want to delete. the invalid relation does not appear in the Information Window. Obsolete Relations Whenever a symbol in a relation does not exist anymore because it was deleted or redimensioned. The Show Rel Information Window is organized as follows: • • In a part or assembly--Displays the relations and user parameters created in that model and in its feature sections. If you try to do so. From the PARAMETER menu. if the relation d0=d1+d2 is entered. Viewing Relations You can view relations without displaying the system editor by choosing Show Rel from the RELATIONS menu. If a dimension symbol is modified. You can then select Edit Rel and correct the error. After you choose Show Rel. You must modify d1 or d2. You must manually delete obsolete relations. the relation becomes obsolete. It does not list relations or parameters created in its features. Choose RELATIONS > Del Param. and you then choose Show Rel. 2. Show Rel can also be used to check for the validity of a relation. Choose Done. Pro/ENGINEER displays an error message.Modifying Dimensions Driven by Relations If a dimension is driven by a relation. the change is automatically reflected in the relation file. To delete an obsolete relation. . you cannot modify d0 directly. as well as user parameters created in that feature. choose Edit Rel from the RELATIONS menu and edit the relations file appropriately. or edit the relation in order to change the value of d0. For example. Obsolete User Parameters How to Delete an Obsolete User Parameter 1. If you add a relation incorrectly using Edit Rel. it cannot be modified directly. The PARAMETER menu appears. as they are not automatically deleted by Pro/ENGINEER. 3. the relations for the selected item are displayed together with the current values of the driven parameters. In a feature--Displays relations created in that feature and in its sections (if applicable). The driven symbol retains the last correct value of the dimension.

and user parameters created in that pattern for the selected direction.• • In a pattern--Displays pattern parameters. Relations are displayed at the bottom of the list under three headings: • • • Relations in the feature's section(s) Part relations driven by this feature (actually relations in the parent model. Note: . Using the Sort Rel Option If you enter: d0 = d1 + 3*d2 d2 = d3 + d4 and then choose Sort Rel. relations. as well as user parameters and section relations in the parent model. the relations are ordered so that a relation that depends on the value of another relation is evaluated after that relation. In a section--Displays the relations created in that section only. Whenever you choose Sort Rel from the RELATIONS menu. the relations look like this: d2 = d3 + d4 d0 = d1 + 3*d2 because this is the order in which the relations should be evaluated. Circular relations are also detected. which could be a part or assembly) Feature relations Sorting Relations The sort function sorts relations in order of precedence. User parameters are displayed (under the heading ``Symbolic constant'') with the following information: • • • • Parameter name Cross-reference status--either Local (associated only with a part or assembly) or Global (associated with a project) Number of cross-references if the parameter is global Parameter's current value Viewing Feature Relations You can also use Feature from the Info menu to view feature relations.

Sorting Relations with Comment Lines Relations with comment lines can also be sorted. Circular Relations Occasionally you may mistakenly create a circular relation. but the resulting order is valid. producing: SOLVE d1 + d2 = 500 d1-d2 = 0 d56 = d54 d55 = d56 + 50 FOR d1 d2 Lines are never inserted into or removed from simultaneous equations. The comment line is attached to the relation below it. The relation sorter detects such a problem and warns you. and moves with that relation during a sort. It is possible to redefine a symbol in the course of entering relations. This unit is considered to be dependent upon the union of all the quantities its individual lines depend upon. If the simultaneous equation contains additional relations not being solved for. as in the following: . as in the following: SOLVE d1 + d2 = 500 d55 = d56 + 50 d56 = d54 d1--d2 = 0 FOR d1 d2 the extra lines are sorted within the body of the simultaneous equation. If multiple comment lines precede a relation.If the relations are already in order. The set of simultaneous equations is treated as if it were a single relation and is moved around as a unit. such as the following: d0 = d1 d1 = d0 Such a set of relations clearly cannot be sorted by order of evaluation. They may look scrambled. However. they may still be rearranged by the sort utility. they are all attached to that relation. Sorting Simultaneous Equations Simultaneous equations can be sorted just like normal relations. the preceding lines would be valid parts of a simultaneous equation.

you must use one of the following formats to identify it: XYZ = parameter_name:fid_N or XYZ = parameter_name:fid_feature_name where parameter_name is the user parameter for the feature. In Assembly mode. For example. and feature_name is the optional user-defined feature name. Specifying a Feature and Model in a Relation You can write relations that use a feature's user parameters and manufacturing parameters. N is the internal feature ID (as displayed when you use Info. and you are writing the relation in the same feature. If an assembly tries to assign a value to a dimension variable that is already driven by a part or subassembly relation. If a parameter is attached to a feature. CUT_A's internal feature ID is 20. suppose that dia is a number-type user parameter in a part feature called CUT_A. use the following format to access a user parameter in a feature of another model: XYZ = parameter_name:fid_N:session_id or XYZ = parameter_name:fid_feature_name:session_id where session_id is the model's session ID. If. Feat Info). You could establish a relationship between d5 and dia in the part as follows: . Remove one of the relations and regenerate. you can identify it simply by name. For example: XYZ = parameter_name where parameter_name is the user parameter. and d5 is a dimension in another feature. two error messages appear. however. you are writing the relation in the feature's parent model (part or assembly) or in another feature. Remove one of the relations and regenerate.• parameter that is already driven by a relation outside the section.

if the driving parameter was in another model with session ID 12.234000e+00 .d5 = dia:fid_20 or d5 = dia:fid_CUT_A In an assembly.234 param_part_1 1. you can use: o Reference dimensions from the part (rd#) o Evaluation feature measurements in the following format: measurement_name:fid_N or measurement_name:fid_feature_name Typical Part Relations Displayed by Show Rel Command RELATION PARAMETER NEW VALUE /*** Relations for BRICK: param_part_1 = 1. In addition. you could write the relation as follows: d5 = dia:fid_20:12 or d5 = dia:fid_CUT_A:12 Creating Relations in Parts The following rules apply to creating or modifying relations in parts: • • Driven variables can be as follows: o Dimensions in the part (d#) o User parameters in the part (parameter_name) o User parameters in features (parameter_name:fid_N or parameter_name:fid_feature_name) Driving variables can be the same as the driven variables described in the preceding list.

03*param_part_angle1 sd3 (D34) 2.234000e+00 /*** Relations for feature id 282. param_part_angle1 = angle:FID_ANGLE1 param_part_angle1 9.100000e+01 /* sd3 = 0. so that the eval function parameter /* ``angle:fid_angle1'' can be accessed from a section.000000e+01 /* param_part_1 = 1. section 1: param_sect_1 = sd0 param_sect_1 5./* /* Part parameter 'part_param_part_angle1' is used as /* a bridge.234 param_part_1 1.700000e+00 Symbolic constant X-refs Current value -------------------- ------- --------------- .500000e+00 sd1 = 2*sd0 sd1 (D32) 1.

PARAM_PART_1 Local 1.000000e+01 PARAM_SECT_1 Local 5.234000e+00 PARAM_PART_ANGLE1 Local 9.500000e+00   .