Templates

Published on March 2017 | Categories: Documents | Downloads: 64 | Comments: 0 | Views: 892
of 140
Download PDF   Embed   Report

Comments

Content

 

Altair

Engineering

Templates Altair HyperMesh 3.1

 

For technical support, contact us by phone or e-mail:

Country

Phone

E-mail

United States

24 8. 614. 2400

[email protected]

Germany

49.7031.6208.22

[email protected]

India

91. 80. 665. 8871

[email protected]

Israel

972.3.5473651

[email protected]

Italy

39.11.900.77.11

[email protected]

Japan

81. 3. 5396. 1341

[email protected]

K ore a

82 2. 573. 4152

s u p p o r t @y e w o n . c o . k r  

Scandi navi a

46. 46. 286. 2052

[email protected]

United Ki Kingdom

44.1327.810700

[email protected]

Copyright (c) 2000 Altair Engineering, Inc. All rights reserved.

Trademark Acknowledgments: HyperMesh is a registered trademark of Altair Engineering, Inc.  ACIS is a registe registered red trademark tradem ark of SPATIAL TECHNOLOGY, T ECHNOLOGY, INC.  ACIS Geometric Geo metric Modeler Mo deler is a registered regist ered trademark tra demark of SPATIAL TECHNOLOGY, INC.  ACIS Kernel Ke rnel is the regi registered stered trademark t rademark of SPATIAL SPATI AL TECHNOLOGY, TECHNO LOGY, IN INC. C.  ACIS Parametric Pa rametric Surfaces is the registered trademark of SPATIAL SPATI AL TECHNOLOGY, TECHN OLOGY, IN INC. C. MS-DOS is a registered trademark trademark of Microsoft Corporatio Corporation. n. UNIX is a registered trademark of AT&T. MSC/NASTRAN is a registered trademark of MSC.  ABAQUS is i s a registered r egistered trademark of Hibbitt, Hibbit t, Karlsson, Karls son, & Sorensen, Inc.  ANSYS is a registered regist ered trademark tra demark o off Ansys, Inc. PATRAN is a registered trademark of MSC. LS-DYNA is a registered trademark of LSTC. MARC is a registered trademark of MARC Analysis Research Corporation. PAMCRASH is a registered trademark of Engineering Systems International. FLUENT is a registered trademark of Fluent, Incorporated. I-DEAS is a registered trademark of Structural Dynamics Corporation. Spaceball is a registered trademark of Spacetec IMC Corporation.

 

Template Design Templates define the form of an output file using a series of commands. This section describes HyperMesh templates and how to use them to generate a data deck. HyperMesh templates templates format the data in a HyperMesh database for finit finite e element codes. A template is an ASCII data file containing HyperMesh HyperMesh template com commands mands that are organize organized d in blocks. When outputting a database, HyperMesh HyperMesh processes the template template per block. Blocks are output in the order  that they are defined in the template file. Templates search the HyperMesh HyperMesh database. As you request an entity for output, HyperMe HyperMesh sh searches the database. You can request output on five levels (listed below in ascending order). before()  

At this level, you can define a series of commands that HyperMesh processes processes before moving to the next level. The before()  level is executed once for each data type requested. Use thisfollowing level to levels. add comments upin the parameters on the Some ofand theset data database is available at this level.

beforecollector()  

At this level, HyperMesh scans the database for the requested data type. Each time HyperMesh finds the requested data type collector, it executes the beforecollector()  level. Use this level to add comments about about the data and and create groups. groups. Collector  data is available at this level.

format()  

At this level, HyperMesh processes the commands defined for each entity contained in a collector. The data associated with the printed entity is available, and the format required for each entity is defined at this level.

aftercollector()  

After the data entities within a collector have been processed, HyperMesh goes to the aftercollector() level. The aftercollector() level is processed after  each collector is scanned. Only the collector data is available at this level.

after() 

The after()  level is similar to the before()  level. HyperMesh executes the after()  level once after  HyperMesh scans the database.

The before()  and after()  blocks are executed even if none of the entities specified exists in the database.

Altair Engineering, Inc.

1

Tem plate s

 

Nodes - Output Steps HyperMesh performs the following steps to output nodes: 1. Hype HyperM rMes esh h exec execut utes es tthe he before()  level. 2.HyperMesh executes the beforecollector()  level using the only node collector in the database. 3. The format()  level is executed once for each node in the database. 4. After proce processing ssing the nodes, nodes, Hyper HyperMesh Mesh execut executes es the aftercollector()  level and the after()  level. When outputting nodes, the before() and beforecollector() levels perform the same operation. The after()  and aftercollector()  levels also perform perform the same operation. operation. This is because there is no data associated with the collector.

Collectors HyperMesh performs the following steps to output collectors: 1. Hype HyperM rMes esh h exec execut utes es tthe he before()  level following by the beforecollector()  level. 2. Since Since a HyperM HyperMesh esh d data atabase base does not have have a collector  collector,   collector, the beforecollector() level is a duplicate of the before() level and is immediately executed once. 3. Hype HyperM rMes esh h exec execut utes es tthe he format()  level for each of the collectors in the database. All of the collector data is available. 4. The aftercollector()  and after() levels are processed similarly to the before()  and beforecollector()  levels in step 1. The collector types in HyperMesh include:  Assemblies  Assembl ies

Bloc Blocks ks

Components

Curves

Load Collectors

Materials

Plots

Properties

System Collectors Vector Collectors

Templ ates

2

Altair Engineering, Inc.

 

Lines - Output Steps HyperMesh performs the following steps to output lines: 1. Hype HyperM rMes esh h exec execut utes es the the before()  level before scanning the database. 2. HyperMesh examines each component for a line that matches matches the requested type. When HyperMesh finds a component, the beforecollector()  level is is processed. Component data data is available at this level. 3. Hype HyperM rMes esh h exec execut utes es the the format()  level once for each line in the component that matches the requested type. 4. The aftercollector()  and after() levels are processed similarly to the before()  and beforecollector()  levels in step 1. NOTE

In the HyperMesh window, any time that you can select a line, you can also select the edge of a surface. Although those edge edges s function as lines, they are not me members mbers of  collectors and are not output by the template system.

Elements When HyperMesh outputs elements, it follows the lines output procedure.

Surfaces - Output Steps When HyperMesh outputs surfaces, it follows the lines output procedure.

Points - Output Steps When HyperMesh outpus points, it follows the lines output procedure. NOTE

In the HyperMesh window, when you select a point, you can also select a vertex of a surface. Although these vertices can function as parts, they are not members of  collectors, and are not output by the template system.

Altair Engineering, Inc.

3

Tem plate s

 

Groups - Output Steps When HyperMesh outputs a group, it restricts the type and number of elements and lines that a group collects.

Systems and Loads When HyperMesh outputs systems and loads, it follows the lines output procedure.

Vectors - Output Steps HyperMesh performs the following steps to output vectors: 1. Hype HyperM rMes esh h exec execut utes es tthe he before () level before scanning the database. 2. HyperMesh HyperMesh examines examines each each vector vector collector collector for a list of of vectors. vectors. For each each vector collector collector found, found, beforecollector() the  level is processed. Collector data is available at this level. 3. Hype HyperM rMes esh h exec execut utes es tthe he format()  level once for each vector found. 4. The aftercollector()  and after()  levels are processed similarly to the before()  and beforecollector()  levels in step 1.

Templated Node Output Example The following example demonstrates how to use template files to generate output files for nodes.  Assume that t hat a particular particula r analys analysis is code, E-Z-SOL1 , requires the nodes in the data deck to appear in the following format: BEGIN CODE 1 8 NODE DATA NODE . . . END NODES END CODE

16

24

32

40

<id>

<x>

<y>

<z>*

The following template generates the necessary output: BEGIN CODE *nodes()   *before()  

*string("NODE DATA")

Templ ates

4

Altair Engineering, Inc.

 

 

*end()

  *format()  

*string("NODE

")

 

*field(integer,id,8)

 

*field(real,x,8)

 

*field(real,y,8)

 

*field(real,z,8)

 

*string("*")

 

*end()

  *after()  

*string("END NODES")

 

*end()

*output()

The *nodes() command indicates the beginning of a node block. The commands following *nodes() format all node entities in the HyperMesh database. The next command, *before()  , instructs HyperMesh to execute the following commands on the before()  level. *string()  and *end()  instruct HyperMesh to output the string contained in double quotes and perform a carriage return, respectively. respectively. The next command informs informs HyperMesh to execute the following following commands on format() *string() the  level, or with each of the entities (nodes in this case).  instructs HyperMesh to place the item in double quotes in the output file. The extra spaces after the word NODE allow you to define a width, since the * string() command does not allow width definition. The next command is the first data request from the database.

The *field()  command is how template files communicate with the HyperMesh database. The *field()  command instructs HyperMesh to scan the database and retrieve the next piece of  information for the output file. *field() takes three parameters: parameters: the output type, the name of the data accessed, and the width of the generated field. The output type can be integer, real, exponential, string, or hexadecimal. In this case, the data type is an integer. The next parameter is the data name. ID indicates that HyperMesh places the value of the node ID into this field. The last parameter is the width of the field. In this example, all fields are formatted to eight characters. The next three *field()  commands place x, y, and z into the output file formatted as reals. *string() places the trailing asterisk on the end of the line. The *end() command (carriage return) is the last command placed into the *format() level. The *after()  command indicates the the last process level. This command instructs instructs HyperMesh to execute the following commands on the *after() level. The *string()  command places the string contained in double quotes in the output file and the *end() command ends the current line. The *output()  command processes the node entity output requests requests made in the preceeding block. If the *output()  command is missing, HyperMesh does not print anything to the file.

Altair Engineering, Inc.

5

Tem plate s

 

Templated Element Output Example The following example demonstrates how to use template files to generate output files for elements. To demonstrate an element template, assume the same analysis code requires the following for the quad elements: 1

10

20

30

40

50

<node2>

<node3>

<node4>

BEGIN ELEMENT DATA   ELEMENTS GROUP = <name>  

<id>

<node1>

  .   .   .   END . . . END ELEMENTS

The above example assumes that E-Z-SOL1  requires grouped element input, where elements of  similar thickness and property are placed in a group. The following template generates the required format: *elements(104,1,"quads","property")   *before()  

*string("BEGIN ELEMENT DATA") *end()

 *beforecollector()  

*string("

ELEMENTS GROUP = ") *field(string,collector.na *field(string,collector.name,10)*end() me,10)*end()

 *format()  

*field(integer,id,10) *field(integer,node1.id,10) *field(integer,node1.id,10 )

 

*field(integer,node2.id,1 *field(integer,node2.id,10) 0) *field(integer,node3.id,1 *field(integer,node3.id,10) 0)

 

*field(integer,node4.id,1 *field(integer,node4.id,10) 0) *end()

  *aftercollector()  

*string("

Templ ates

END") *end()

6

Altair Engineering, Inc.

 

  *after()  

*string("END ELEMENTS") *end()

*output()

Note the placement of the *()  commands. HyperMesh does not not place restriction restrictions s on where the commands appear in the file, so you can format the template as necessary. Comments can also be added for documentation documentation purposes. HyperMesh ignores fil file e content until it finds an asterisk, *. A command is defined as the characters between the asterisk, * and the closing parenthesis, ). The *elements() command instructs HyperMesh that the following commands define an element output block or process. The parameters to the *elements()  command are the configuration and type of element the output block applies to: a user-defined name for the elements, and a user-defined name for the property the elements require. Element configurations are listed in the following sections for each of the HyperMesh elements. elements. Element types are a user-defined user-defined number associated with each HyperMesh element (defaults to 1). Changing the type allows multiple definitions for a HyperMesh element configuration. A quad is configuration 104 and type 1. When these parameters are supplied, HyperMesh limits the output of this process to quad elements. The next series of  commands, *before()  , *string()  , and *end() behave as described in Templated Node Output, Example . The *beforecollector()  command instructs HyperMesh to process the following commands on the *beforecollector()  level. When the beforecollector()  level is selected, HyperMesh processes the commands each time it finds a collector holding the required type of information in the database. In this case, *string() , *field() , and *end() are the commands HyperMesh processes when a component is found. On the *field()  command, the data name is collector.name . *format()  describes the process for each element of configuration 104 and type 1. The format commands use the data name node1.id , node2.id, etc. The period, period, ., is displayed because because node1 is a pointer to the node. node1.id  is the ID of the node.

The commands available in the template files are listed in the Using Template Commands section. In addition, the HyperMesh templates serve as examples.

Altair Engineering, Inc.

7

Tem plate s

 

Using Mathematical Expressions The commands in a template files files can contain mathematical mathematical expressions. For example, to translate translate a model during output, apply a formula to the x coordinate of a node: *nodes()  *format()  

*string("node,")

 

*field(integer,id,10)

 

*string(",")

 

*field(real,[x+100.0],10)

 

*string(",")

 

*field(real,y,10)

 

*string(",")

 

*field(real,z,10)

 

*end()

*output()

100.0 is added to the x coordinate of the nodes and is sent to the formatter, where it is written to file. The square brackets, [], around the formula tell the parser that the enclosed text is a formula and not to interpret the asterisk, *, as a new command. The following operators are available in a mathematical expression:

%

Modulus

* / +

Performs multiplication Performs division Performs addition

-

Performs subtraction

Equalities, Inequalities, and Logical Expressions Templates contain functions to test values, perform conditional statement execution, or control the template flow. These statements include *if  and *loopif. The tests in these commands commands use the following syntax to determine if the statement is true or false. These statements can be linked to logical expressions. Equalities and Inequalities

Equal to:

==

Not equal to:

!=

Templ ates

8

Altair Engineering, Inc.

 

Less than:

<

Greater than;

>

Less than or equal to:

<=

Greater than or equal to:

>=

Logical Expressions

Logical and

&&

Logical or

||

Altair Engineering, Inc.

9

Tem plate s

 

What are Data Names? Template files use data data names to access data from the Hyper HyperMesh Mesh database. A data name is a string that represents a piece of data. At output, HyperMesh replaces the data name string with the value that the data name represents. represents. For example, a node has id, x, y, z, and system  as possible data names in the template files. If you enter the command *field(integer,id,8) into a template file, HyperMesh outputs the node ID in an integer format using eight spaces.  A data name na me can a also lso represen representt pointers to another entity in the database. databa se. In the preceeding prece eding paragraph, the data name node1 is a pointer. node1 points to a node in the HyperMesh database. If you enter the command *field(integer,node1,8) , HyperMesh issues the error message field statement references a pointer . HyperMesh can t output the correct value because node1 points to a node entity that has many different printable values. To print the node ID, reference the pointer as *field(integer,node1.id,8) . A period, .  , separates the data name node1 and the data name id. ’

In the data name tables, the levels are coded numerically: 1. befo before re() () 2. beforeco beforecollec llector tor() () 3. form format at() () 4. aftercol aftercollect lector( or() ) 5. afte after( r() )

Data (except for global data) is only available on levels two through four. Reference all pointers by placing a period after the name, followed by the data name of the entity type.

Nodes - Data Names D at a Na m e

Level

Va l u e

id

3

ID

x

3

x coordinate in the local system

y

3

y coordinate in the local system

z

3

z coordinate in the local system

globalx

3

x coordinate in the global system

globaly

3

y coordinate in the global system

globalz

3

z coordinate in the global system

superid

3

super element ID of the node

inputsystem

3

the input system (system pointer)

Templ ates

10

Altair Engineering, Inc.

 

inputsystemid

3

the input system ID

outputsystem

3

the output system (system pointer)

outputsystemid

3

the output system ID

surfaceid

3

the ID of the surface where the node is located (may be zero)

attributesmax

3

the number of attributes owned by this entity

surfaceindex

3

index into the geometry database that identifies the part of the surface where the node is located.

Mass Elements Configuration: 1 D at a N a me

Level

Va l ue

id

3

ID

conf ig

3

The number, 1

type

3

element type

node1

3

node (node pointer)

mas s

3

mass

property

3

property of the element (property pointer)

propertyid

3

property ID of the element

s ys te m

3

input system (system pointer)

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity





Slave1 Elements Configuration: 135 D at a N a me

Level

Va l ue

id

3

ID

conf ig

3

The number, 135

type

3

element type

node1

3

node (node pointer)

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

Altair Engineering, Inc.



11



Tem plate s

 

Plot Elements Configuration: 2 D at a Na m e

Level

Va l u e

id

3

ID

co nf ig

3

The number, 2

type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

collector

2 , 3, 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity





Weld Elements and Rigid Elements Configuration: Configuratio n: 3 (weld elements) and 5 (rigid elements) D at a Na m e

Level

Va l u e

id

3

ID

co nf ig

3

Weld elements - 3

3

Rigid elements - 5

type

3

element type

node1

3

first (independent) node (node pointer)

node2

3

second (dependent) node (node pointer)

dofs

3

degrees of freedom

collector

2 , 3, 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

Templ ates

12

Altair Engineering, Inc.

 

Rigidlink Elements Configuration: 55 D at a N a me

Level

Va l u e

id

3

ID

conf ig

3

The number, "55"

type

3

element type

independentnode

3

independent node (node pointer)

independentdof

3

specified independent degree of freedoms (for   example 123456, 134, 1256)

dependentnodes

3

dependent nodes (use with pointerset-pointerset (pointer1,dependentnodes,0))

dependentnodesmax

3

number of dependent nodes

no de

3

dependent node pointer (use with pointer pointer1.node.id)

collector

2 , 3, 4

component that owns the element (component pointer)

Spring Elements Configuration: 21 D at a N a me

Level

Va l ue

id

3

ID

conf ig

3

The number, 21

type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

dofs

3

degrees of freedom

property

3

property collector (property pointer)

propertyid

3

property collector ID

collector

2, 3 , 4

component that owns the element (component pointer)

Altair Engineering, Inc.



13



Tem plate s

 

attributesmax

3

the number of attributes owned by this entity

vect orid

3

ID of the vector associated with the spring element

vector

3

The vector associated with the spring element

Joint Elements Configuration: 22 D at a Na m e

Level

Va l u e

id

3

ID of the element

co nf ig

3

The number, 22

type

3

The type of the element according to the following table:





Type

Ty pe Na me

# N o de s

Orientation

1

Spherical

2

none/systems/nodes

2

Revol u t e

4

n one/ syst ems

3

Cylindrical

4

n one/ syst ems

4

Pl a nar

4

n one/ syst ems

5

Universal

4

n one/ syst ems

6

Translational

6

n one/ syst ems

7

Locking

6

n one/ syst ems

node1

3

Node 1 (all types)

node2

3

Node 2 (all types)

node3

3

Node 3 (all types but spherical)

node4

3

Node 4 (all types but spherical)

node5

3

Node 5 (only types translational and locking)

node6

3

Node 6 (only types translational and locking)

orientation

3

Orientation type. Use:

0

n one

1

uses systems (all types)

Templ ates

14

Altair Engineering, Inc.

 

2

uses nodes (only spherical type)

orientationnode1

3

orientation node 1 (only spherical type)

orientationnode2

3

orientation node 2 (only spherical type)

sys t em1

3

orientation system 1 (all types)

sys t em2

3

orientation system 2 (all types)

systemid1

3

orientation system ID 1 (all types)

systemid2

3

orientation system ID 2 (all types)

property

3

property collector (property pointer)

propertyid

3

property collector ID

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

RBE3 Elements Configuration: 56 D at a N a me

Level

Va l u e

id

3

ID

conf ig

3

The number, "56"

type

3

element type

dependen t node

3

dependent node (node pointer)

depend ent dof

3

dependent degrees of freedom

dependentcoeff

3

dependent coefficient (weighting factor)

independentnodes

3

independent nodes (use with pointerset pointerset(pointer1,independentnodes,0))

independentnodesmax

3

number of independent nodes

no de

3

independent node pointer (use with pointer pointer1.node.id)

independentdofs

3

independent degrees of freedom (use with pointerset pointerset(pointer2,independentdofs,0)) pointervalue returns the dofs.

independentcoeffs

Altair Engineering, Inc.

3

independent co coefficients

15

Tem plate s

 

(use with pointerset pointerset(pointer3,independentcoeffs,0)) pointervalue returns the coefficient. 2, 3, 4

component that owns the element (component pointer)

D at a Na m e

L e ve l

V al ue

id

3

ID

co nf ig

3

The number, 60

type

3

element type

node1

3

first node (node pointer)

node2 localyx

3 3

second node (node pointer) x component of local y axis vector  

localyy

3

y component of local y axis vector  

localyz

3

z component of local y axis vector  

localzx

3

x component of local z axis vector  

localzy

3

y component of local z axis vector  

localzz

3

z component of local z axis vector  

d of sa

3

active dofs at end a

d of sb

3

active dofs at end b

offsetax

3

x component of offset vector at end a

offsetay

3

y component of offset vector at end a

offsetaz

3

z component of offset vector at end a

offsetbx

3

x component of offset vector at end b

offsetby

3

y component of offset vector at end b

offsetbz

3

z component of offset vector at end b

length

3

length of bar

property

3

property collector (property pointer)

propertyid

3

property collector ID

collector

Bar2 Elements Configuration: 60

Templ ates



16



 

Altair Engineering, Inc.

 

collector

2 , 3, 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

directionnodeused

3

If directionnodeused  is 1, then the orientation of the bar is defined by directionnode  and directionnodeydir .

directionnode

3

direction node for the bar (node pointer). If directionnodeydir  is 1, then the direction node defines the local y axis. Otherwise, direction node defines the local z axis. directionnode is optional, and can only be used if directionnodeused is one.

3

Equals 1 if directionnode defines the local y axis of the bar. Otherwise, directionnode defines the local z axis.

D at a N a me

Level

Va l u e

id

3

ID

conf ig

3

The number, 63

type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

node3

3

third node (node pointer)

localyx

3

x component of local y axis vector  

localyy

3

y component of local y axis vector  

localyz

3

z component of local y axis vector  

localzx

3

x component of local z axis vector  

localzy

3

y component of local z axis vector  

localzz

3

z component of local z axis vector  

do f sa

3

active dofs at end a

do f sb

3

active dofs at end b

offsetax

3

x component of offset vector at end a

directionnodeydir

Bar3 Elements Configuration: 63

Altair Engineering, Inc.



17



Tem plate s

 

offsetay

3

y component of offset vector at end a

offsetaz

3

z component of offset vector at end a

offsetbx

3

x component of offset vector at end b

offsetby

3

y component of offset vector at end b

offsetbz length

3 3

z component of offset vector at end b length of bar  

property

3

property collector (property pointer)

propertyid

3

property collector ID

collector

2, 3, 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

directionnodeused

3

if directionnodeused  is 1, then the orientation of the bar is defined by directionnode  and directionnodeydir .

directionnode

3

direction node for the bar (node pointer). If If   directionnodeydir  is 1, then the direction node defines the local y axis. Otherwise, direction node defines the local z axis. directionnode  is optional, and can only be used if directionnodeused  is 1.

directionnodeydir

3

equals 1 if directionnode  defines the local y axis of the bar. Otherwise, directionnode defines the local z axis.

Templ ates

18

Altair Engineering, Inc.

 

Rod Elements Configuration: 61 D at a N a me

Level

Va l ue

id

3

ID

conf ig

3

The number, 61

type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

length

3

length of rod

property

3

property collector (property pointer)

propertyid

3

property collector ID

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity





Gap Elements Configuration: 70 D at a N a me

Level

Va l ue

id

3

ID

conf ig

3

The number, 70

type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

property

3

property collector (property pointer)

propertyid

3

property collector ID

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

vect orid

3

ID of the vector associated with the spring element

vector

3

The vector associated with the spring element

Altair Engineering, Inc.



19



Tem plate s

 

Tria3, Master3, and Slave3 Elements Configuration: 103 (tria3), 123 (master3), and 133 (slave3) D at a Na m e

Level

Va l u e

id

3

ID

co nf ig

3

The number, 103  - tria3 “



The number, 123  - master3 “



The number, 133  - slave3 “



type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

node3

3

third node (node pointer)

normalx

3

normal in the x direction

normaly

3

normal in the y direction

normalz

3

normal in the z direction

a rea

3

ar ea

longestaltitude

3

longest distance from node to non-adjoining face

shortestaltitude

3

shortest distance from node to non-adjoining face

shortestside

3

length of the shortest side of the element

longestside

3

length of the longest side of the element

collector

2 , 3, 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

warpage

3

element warpage (see check elems panel for details)

aspect

3

element aspect ratio (see check elems panel for  details)

skew

3

element skew angle (see check elems panel for  details)

 jacobian  jacob ian

3

element jacobian (see check elems panel for details)

minangle

3

minimum interior angle

maxa ngl e

3

maximum interior angle

Templ ates

20

Altair Engineering, Inc.

 

For Configuration 123 and 133 only: D at a N a me

Level

Va l u e

baseelementid

3

ID of the element that is attached

baseel ement f ace

3

face of the element that is attached

baseelementdirection

3

direction of the element normal wrt base element: 0, when interface elements elements have normals pointing in the same direction as the base element 1, when interface elements elements have normals pointing in the opposite direction of the base element

baseelementtype

3

type of the element that is attached: 1 shell 2 tetra 3 penta 4 hexa

group

3

group that owns the element (group pointer)

attributesmax

3

the number of attributes owned by this entity

Altair Engineering, Inc.

21

Tem plate s

 

Tria6 Elements Configuration: 106 D at a Na m e

Level

Va l u e

id

3

ID

co nf ig

3

The number, 106

type

3

type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

node3

3

third node (node pointer)

node4

3

fourth node (node pointer)

node5

3

fifth node (node pointer)

node6

3

sixth node (node pointer)

normalx normaly

3 3

normal in the x direction normal in the y direction

normalz

3

normal in the z direction

a rea

3

ar ea

longestaltitude

3

longest distance from node to non-adjoining face

shortestaltitude

3

shortest distance from node to non-adjoining face

shortestside

3

length of the shortest side of the element

longestside

3

length of the longest side of the element

collector

2 , 3, 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

warpage

3

element warpage (see check elems panel for details)

aspect

3

element aspect ratio (see check elems panel for  details)

skew

3

element skew angle (see check elems panel for  details)

 jacobian  jacob ian

3

element jacobian (see check elems panel for details)

minangle

3

minimum interior angle

maxa ngl e

3

maximum interior angle

Templ ates



22



Altair Engineering, Inc.

 

Quad4, Tetra4, Master4 and Slave4 Elements Configuration: Configurati on: 104 (quad4), 124 (master4), 134 (slave4), and 204 (tetra4) D at a N a me

Level

Va l ue

id

3

ID

conf ig

3

The number,



104  - quad4

The number,



124  - master4

The number,



134  - slave4

The number,



204  - tetra4









type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

node3

3

third node (node pointer)

node4

3

fourth node (node pointer)

normalx

3

normal in the x direction (for plate elements)

normaly

3

normal in the y direction (for plate elements)

normalz

3

normal in the z direction (for plate elements)

ar ea

3

area (for plate elements)

longestdiagonal

3

longest element diagonal

shortestdiagonal

3

shortest element diagonal

shortestside

3

length of the shortest side of the element

longestside

3

length of the longest side of the element

volume

3

volume (for tetra elements)

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

warpage

3

element warpage (see check elems panel for details)

aspect

3

element aspect ratio (see check elems panel for  details)

skew

3

element skew angle (see check elems panel for  details)

 jacobian  jacobi an

3

element jacobian (see check elems panel for details)

minangle

3

minimum interior angle

maxangl e

3

maximum interior angle

Altair Engineering, Inc.

23

Tem plate s

 

largestfacearea

3

The number, 204 “



For Configuration 124 and 134 only: D at a Na m e

L e ve l

V al ue

baseelementid

3

ID of the element that is attached

base el ement f ace

3

face of the element that is attached

baseelementdirection

3

direction of the element normal wrt base element:

0

when interface elements elements have normals pointing in the same direction as the base element

1

when interface elements have normals pointing in the opposite direction of the base element

3

type of the element that is attached:

baseelementtype

1 shell 2 tetra 3 penta 4 hexa group

3

group that owns the type (group pointer)

longestdiagonal

3

longest element diagonal

shortestdiagonal

3

shortest element diagonal

attributesmax

3

the number of attributes owned by this entity

Templ ates

24

Altair Engineering, Inc.

 

Quad8 Elements Configuration: 108 D at a N a me

Level

Va l ue

id

3

ID

conf ig

3

The number, 108

type

3

type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

node3

3

third node (node pointer)

node4

3

fourth node (node pointer)

node5

3

fifth node (node pointer)

node6

3

sixth node (node pointer)

node7 node8

3 3

seventh node (node pointer) eighth node (node pointer)

normalx

3

normal in the x direction

normaly

3

normal in the y direction

normalz

3

normal in the z direction

ar ea

3

are a

longestdiagonal

3

longest element diagonal

shortestdiagonal

3

shortest element diagonal

shortestside

3

length of the shortest side of the element

longestside

3

length of the longest side of the element

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

warpage

3

element warpage (see check elems panel for details)

aspect

3

element aspect ratio (see check elems panel for  details)

skew

3

element skew angle (see check elems panel for  details)

 jacobian  jacobi an

3

element jacobian (see check elems panel for details)

minangle

3

minimum interior angle

maxangl e

3

maximum interior angle

Altair Engineering, Inc.



25



Tem plate s

 

Penta6 Elements Configuration: 206 D at a Na m e

Level

Va l u e

id

3

ID

co nf ig

3

The number, 206

type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

node3

3

third node (node pointer)

node4

3

fourth node (node pointer)

node5

3

fifth node (node pointer)

node6

3

sixth node (node pointer)

volume

3

volume

largestfacearea

3

area of the largest face on a solid element

collector

2 , 3, 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity





Hex8 Elements Configuration: 208 D at a Na m e

Level

Va l u e

id

3

ID

co nf ig

3

The number, 208

type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

node3

3

third node (node pointer)

node4

3

fourth node (node pointer)

node5

3

fifth node (node pointer)

node6

3

sixth node (node pointer)

node7

3

seventh node (node pointer)

Templ ates



26



Altair Engineering, Inc.

 

node8

3

eighth node (node pointer)

volume

3

volume

largestfacearea

3

area of the largest face on a solid element

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

Tetra10 Elements Configuration: 210 D at a N a me

Level

Va l ue

id

3

ID

conf ig

3

The number, 210

type

3

element type

node1 node2

3 3

first node (node pointer) second node (node pointer)

node3

3

third node (node pointer)

node4

3

fourth node (node pointer)

node5

3

fifth node (node pointer)

node6

3

sixth node (node pointer)

node7

3

seventh node (node pointer)

node8

3

eighth node (node pointer)

node9

3

ninth node (node pointer)

no de 10

3

tenth node (node pointer)

volume

3

volume

largestfacearea

3

area of the largest face on a solid element

longestaltitude

3

longest distance from node to non-adjoining side

shortestaltitude

3

shortest distance from node to non-adjoining side

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

warpage

3

warpage

aspect

3

aspect ratio

skew

3

skew

Altair Engineering, Inc.



27



Tem plate s

 

 jacobian  jacob ian

3

jacobi jacobian an

minangle

3

minimum angle

maxa ngl e

3

maximum angle

Penta15 Elements Configuration: 215 D at a Na m e

Level

Va l u e

id

3

ID

co nf ig

3

The number, 215

type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

node3

3

third node (node pointer)

node4 node5

3 3

fourth node (node pointer) fifth node (node pointer)

node6

3

sixth node (node pointer)

node7

3

seventh node (node pointer)

node8

3

eighth node (node pointer)

node9

3

ninth node (node pointer)

n od e1 0

3

tenth node (node pointer)

n od e1 1

3

eleventh node (node pointer)

n od e1 2

3

twelfth node (node pointer)

n od e1 3

3

thirteenth node (node pointer)

n od e1 4

3

fourteenth node (node pointer)

n od e1 5

3

fifteenth node (node pointer)

volume

3

volume

largestfacearea

3

area of the largest face on a solid element

collector

2 , 3, 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

Templ ates



28



Altair Engineering, Inc.

 

Hex20 Elements Configuration: 220 D at a N a me

Level

Va l ue

id

3

ID

conf ig

3

The number, 220

type

3

element type

node1

3

first node (node pointer)

node2

3

second node (node pointer)

node3

3

third node (node pointer)

node4

3

fourth node (node pointer)

node5

3

fifth node (node pointer)

node6

3

sixth node (node pointer)

node7

3

seventh node (node pointer)

node8

3

eighth node (node pointer)

node9

3

ninth node (node pointer)

no de 10

3

tenth node (node pointer)

no de 11

3

eleventh node (node pointer)

no de 12

3

twelfth node (node pointer)

no de 13

3

thirteenth node (node pointer)

no de 14

3

fourteenth node (node pointer)

no de 15

3

fifteenth node (node pointer)

no de 16

3

sixteenth node (node pointer)

no de 17

3

seventeenth node (node pointer)

no de 18

3

eighteenth node (node pointer)

no de 19

3

nineteenth node (node pointer)

no de 20

3

twentieth node (node pointer)

volume

3

volume

largestfacearea

3

area of the largest face on a solid element

collector

2, 3 , 4

component that owns the element (component pointer)

attributesmax

3

the number of attributes owned by this entity

Altair Engineering, Inc.



29



Tem plate s

 

Components Data

N ame

Level Val ue

id

3

ID

name

3

name

material

3

material collector (material pointer)

materialid

3

material collector ID

dictionary

3

component dictionary (dictionary pointer)

dictionarymax

3

number of entries in the dictionary

color

3

color

attributesmax

3

the number of attributes owned by this entity

D at a Na m e

Level

Va l u e

id

3

ID of the property

name

3

name of the collector  

material

3

material collector (material pointer)

materialid

3

material collector ID

dictionary

3

collector dictionary (dictionary pointer)

dictionarymax

3

number of items in the dictionary

attributesmax

3

the number of attributes owned by this entity

D at a Na m e

Level

Va l u e

id

3

ID of the material

name

3

name of the collector  

dictionary

3

collector dictionary (dictionary pointer)

dictionarymax

3

number of items in the dictionary

attributesmax

3

the number of attributes owned by this entity

 

Properties

Materials

Templ ates

30

Altair Engineering, Inc.

 

System Collectors D at a N a me

Level

Va l ue

id

3

ID of the system collector  

name

3

name of the system collector  

color

3

color of the system collector  

dictionary

3

collector dictionary (dictionary pointer)

dictionarymax

3

number of items in the dictionary

Load Collectors D at a N a me

Level

Va l ue

id

3

ID of the load collector  

name

3

name of the load collector  

color

3

color of the load collector  

dictionary

3

dictionary of the collector (dictionary pointer)

dictionarymax

3

number of entries in the dictionary

attributesmax

3

the number of attributes owned by this entity

Vector Collectors D at a N a me

Level

Va l ue

id

3

ID of the vector collector  

name

3

name of the vector collector  

color

3

color of the vector collector  

dictionary

3

dictionary of the vector collector (pointer)

dictionarymax

3

number of entries in the dictionary

attributesmax

3

number of attributes owned by this entity

Altair Engineering, Inc.

31

Tem plate s

 

Groups - Data Names  All groups contain the following data: D at a Na m e

L e v el

Val ue

id

3

ID

name

3

name

co nf ig

3

group configuration

type

3

group type

material

3

material collector (material pointer)

materialid

3

material collector ID

dictionary

3

component dictionary (dictionary pointer)

dictionarymax

3

number of entries in the dictionary

color

3

color

masterdefinition

3

0 for entities, 1 for components, 2 for  boxes, 3 for all, 4 for sets

masterboxxmin

3

minimum global x value for master box

masterboxymin

3

minimum global y value for master box

masterboxzmin

3

minimum global z value for master box

masterboxxmax

3

maximum global x value for master box

masterboxymax

3

maximum global y value for master box

masterboxzmax

3

maximum global z value for master box

mastercomponentlist

3

a pointer to the master component IDs contained in the group

mastercomponentlistmax

3

number of master components in the group

mastersetlist

3

a pointer to the master set IDs contained in the group

mastersetlistmax

3

number of master sets in the group

slavedefinition

3

0 for entities, 1 for components, 2 for   boxes, 3 for all, 4 for sets

slaveboxxmin

3

minimum global x value for slave box

slaveboxymin

3

minimum global y value for slave box

slaveboxzmin

3

minimum global z value for slave box

slaveboxxmax

3

maximum global x value for slave box

Templ ates

32

 

Altair Engineering, Inc.

 

slaveboxymax

3

maximum global y value for slave box

slaveboxzmax

3

maximum global z value for slave box

slavecomponentlist

3

a pointer to the slave component IDs contained in the group

slavecomponentlistmax

3

number of slave components in the group

slavesetlist

3

a pointer to the slave set IDs contained in the group

slavesetlistmax

3

number of slave sets in the group

attributesmax

3

the number of attributes owned by this entity

Groups with config 5 (Rigid Walls) contain the following additional data: D at a N a me

Level

Va l u e

bas eno de

3

pointer to the basenode of the rigid wall

geometrytype

3

1 for infinite plane,2 for finite plane, 3 for infinite prism, 4 for finite prism, 5 for  cylinder, 6 for sphere, 7 for MADYMO Plane, 8 for MADYMO Ellipse

ma dym oi d

3

ID of the associated MADYMO entity

midpointx

3

x value of the midpoint of finite plane geometry type (returns 0.0 for other geometry)

midpointy

3

y value of the midpoint of finite plane geometry type (returns 0.0 for other geometry)

midpointz

3

z value of the midpoint of finite plane geometry type (returns 0.0 for other geometry)

pointax

3

x value of Point A on finite plane as defined in PAM-CRASH manual

pointay

3

y value of Point A on finite plane as defined in PAM-CRASH manual

pointaz

3

z value of Point A on finite plane as defined in PAM-CRASH manual

motiontype

3

0 for none, 1 for velocity, 2 for displacement

lengthx

3

length of the rigid wall in the local x direction

lengthy

3

length of the rigid wall in the local y direction

lengthz

3

length of the rigid wall in the local z direction

radius

3

radius of a cylinder or sphere

Altair Engineering, Inc.

33

Tem plate s

 

normalx

3

x component of the normal unit vector  

normaly

3

y component of the normal unit vector  

normalz

3

z component of the normal unit vector  

x a xi s x

3

x component of the local x axis unit vector  

x a xi s y x a xi s z

3 3

y component of the local x axis unit vector   z component of the local x axis unit vector  

motionx

3

x component of motion vector  

motiony

3

y component of motion vector  

motionz

3

z component of motion vector  

normalmotionangle

3

angle between motion and normal vectors

Sets D at a Na m e

Level

Va l u e

id

3

ID of the set

name

3

name of the set

color

3

color of the set

type

3

type of set (1 - node, 2 - element, 3 - component)

t ypen ame

3

name of the type of set (nodes, elems, comps)

ids

3

a pointer to the IDs

idsmax

3

the maximum number of IDs

element

3

element pointer (use with pointer - pointer1.element.id)

component

3

component pointer (use with pointer pointer1.component.id)

attributesmax

3

the number of attributes owned by this entity

D at a Na m e

Level

Va l u e

id

3

ID of the card

attributesmax

3

the number of attributes owned by this entity

Cards

NOTE

Templ ates

Most of the information for a card is contained in the attributes owned by the card.

34

Altair Engineering, Inc.

 

Output Blocks D at a N a me

Level

Va l ue

id

3

ID of the outputblock

name

3

name of the outputblock

color

3

color of the outputblock

type

3

type of outputblock (1 - node, 2 - element)

t yp ena me

3

name of the type of outputblock (nodes or elems)

ids

3

a pointer to the IDs

idsmax

3

the maximum number of IDs

element

3

element pointer (use with pointer - pointer1.element.id)

attributesmax

3

the number of attributes owned by this entity

D at a N a me

Level

Va l ue

id

3

ID of the loadstep

name

3

name of the loadstep

color

3

color of the loadstep

ids

3

a pointer to the IDs

idsmax

3

the maximum number of IDs

loadcollector

3

loadcollector pointer (use with pointer pointer1.loadcollector.id)

attributesmax

3

the number of attributes owned by this entity

D at a N a me

Level

Va l ue

id

3

ID

type

3

type of system (0 Rec, 1 Cyl, 2 Sph)

originx

3

x coordinate of the origin

originy

3

y coordinate of the origin

originz

3

z coordinate of the origin

Load Steps

Systems

Altair Engineering, Inc.

35

Tem plate s

 

globaloriginx

3

global x coordinate of the origin

globaloriginy

3

global y coordinate of the origin

globaloriginz

3

global z coordinate of the origin

x a xi s x

3

x component of x axis (unit vector)

x a xi s y

3

y component of x axis (unit vector)

x a xi s z

3

z component of x axis (unit vector)

globalxaxisx

3

global x component of x axis (unit vector)

globalxaxisy

3

global y component of x axis (unit vector)

globalxaxisz

3

global z component of x axis (unit vector)

y a xi s x

3

x component of y axis (unit vector)

y a xi s y

3

y component of y axis (unit vector)

y a xi s z

3

z component of y axis (unit vector)

globalyaxisx

3

global x component of y axis (unit vector)

globalyaxisy

3

global y component of y axis (unit vector)

globalyaxisz

3

global z component of y axis (unit vector)

globalzaxisx

3

global x component of z axis (unit vector)

globalzaxisy

3

global y component of z axis (unit vector)

globalzaxisz

3

global z component of z axis (unit vector)

position

3

position of system in the database

thetaxy

3

nodal xy orientation angle

thetayz

3

nodal yz orientation angle

thetazx

3

nodal xz orientation angle

localxy

3

local xy orientation angle

localyz

3

local yz orientation angle

localxz

3

local xz orientation angle

setid

3

system set ID

inputsystemid

3

input system ID

collector

2 , 3, 4

system collector (system collector pointer)

attributesmax

3

the number of attributes owned by this entity

Templ ates

36

Altair Engineering, Inc.

 

Loads The load entity allows forces and constraints to be placed in the database. Loads are applied in the global system except when the reference system has been modified. A constraint, applied at a node, is placed in the global system only if a system does not exist at that node. Conversely, if a system does exist, the constraint is applied such that the orientation of the constraint is dictated by the local system. Once a constraint has been appli applied, ed, HyperMesh does not maint maintain ain the proper  orientation for the constraint as local systems are created or deleted at the node where the constraint resides. Constraints, concentr concentrated ated forces, concentrated moments, concentrated concentrated fluxes, temperatures, velocities, accelerations, and pressures are supported.

Constraint Loads Configuration: 3 D at a N a me

Level

Va l ue

location

3

node where constraint is applied (node pointer)

conf ig

3

The number, 3

comp1

3

value in dof1 (-999999.0 for none)

comp2

3

value in dof2 (-999999.0 for none)

comp3

3

value in dof3 (-999999.0 for none)

comp4

3

value in dof4 (-999999.0 for none)

comp5

3

value in dof5 (-999999.0 for none)

comp6

3

value in dof6 (-999999.0 for none)

comp

3

value of the constraint in all components

equalmagnitude

3

set to 1 if all 6 dofs are equal, 0 otherwise

spc

3

set to 1 if active dofs are constraints

collector

2, 3 , 4

collector that owns the load (load collector pointer)

attributesmax

3

the number of attributes owned by this entity

D at a N a me

Level

Va l ue

location

3

node where flux is applied (node pointer)

conf ig

3

the number, 6





Flux Loads Configuration: 6

Altair Engineering, Inc.



37



Tem plate s

 

flux

3

flux

collector

2 , 3, 4

collector that owns the load (load collector pointer)

attributesmax

3

the number of attributes owned by this entity

Pressure Loads Configuration: 4 D at a Na m e

Level

Va l u e

location

3

element where pressure is applied (element pointer)

co nf ig

3

The number, 4

corner1

3

1st node of face (node pointer)

corner2

3

2nd node of face (node pointer)

edgelength

3

length of the loaded edge. Th This is for   edge pressures only. Zero is returned

elementtype

3

for face pressures. 1 for plate, 2 for tetra, 3 for penta, 4 for  hexa

face

3

face number

f acearea

3

area of the loaded face

facetype

3

4 for quad, 3 for tria

magnitude

3

magnitude of the pressure applied

pressuretype

3

on face: 0 for pressure, 1 for traction





 

on edge: 2 for pressure, 3 for traction node1

3

first node on face

node2

3

second node on face

node3

3

third node on face

node4

3

fourth node on face

comp1

3

x component of the pressure

comp2

3

y component of the pressure

comp3

3

z component of the pressure

vectorx

3

x component of unit force vector  

vectory

3

y component of unit force vector  

vectorz centerx

3 3

z component of unit force vector   x component of the center of the

Templ ates

38

Altair Engineering, Inc.

 

element centery

3

y component of the center of the element

centerz

3

z component of the center of the element

facearea

3

area of the loaded face

collector

2, 3 , 4

collector that owns the load (load collector pointer)

attributesmax

3

the number of attributes owned by this entity

Temperature Loads Configuration: 5 D at a N a me

Level

Va l ue

location

3

node where temperature is applied (node pointer)

conf ig

3

the number, 5

temperature

3

temperature

collector

2, 3 , 4

collector that owns the load (load collector pointer)

attributesmax

3

the number of attributes owned by this entity





Forces, Moments, Velocities, and Accelerations Configuration: 1, 2, 8, 9 D at a N a me

Level

Va l ue

location

3

node where load is applied (pointer)

conf ig

3

The number, 1,  for forces “



The number, 2,  for moments “



The number, 8,  for velocities “



The number, 9,  for accelerations “



comp1

3

x component of the vector  

comp2

3

y component of the vector  

comp3

3

z component of the vector  

magnitude

3

magnitude of the load vector  

vectorx

3

x component of the vector (unit)

vectory

3

y component of the vector (unit)

Altair Engineering, Inc.

39

Tem plate s

 

vectorz

3

z component of the vector (unit)

inputsystem

3

reference system (system pointer)

inputsystemid

3

reference system ID

collectorid

2 , 3, 4

collector that owns the load (load collector pointer)

attributesmax

3

the number of attributes owned by this entity

Equations D at a Na m e

L e ve l

V al ue

id

3

ID

type

3

equation type

constant

3

equation constant

dep endent node

3

dependent node (node pointer)

dep endent dof

3

dependent degree of freedom

dependentcoeff

3

dependent coefficient (weighting factor)

independentnodes

3

independent nodes (use with pointerset pointerset(pointer1,independentnodes,0))

independentnodesmax

3

number of independent nodes

independentdofs

3

independent degrees of freedom (use with pointerset pointerset(pointer2,independentdofs,0)) pointervalue returns the dofs.

independentcoeffs

3

independent coefficients (use with pointerset pointerset(pointer3,independentcoeffs,0)) pointervalue returns the coefficient.

collector

Templ ates

2, 3, 4

collector that owns the equation (load collector  pointer)

40

Altair Engineering, Inc.

 

Plots D at a N a me

Level

Va l u e

id

3

ID of the plot

name

3

name of the plot

type

3

plot type

title

3

title of the plot

subtitle

3

subtitle of the plot

label

3

label of the plot

xaxis t it le

3

title on the x axis

xaxislabel

3

label on the x axis

yaxis t it le

3

title on the y axis

yaxislabel

3

label on the y axis

type

3

type of plot

titlecolor

3

title color  

titlefont

3

title font

subtitlecolor

3

subtitle color  

subtitlefont

3

subtitle font

labelcolor

3

label color  

labelfont

3

label font

borderon

3

set to 1 to turn the plot border on

bordercolor

3

color of the plot border  

bor der wi dt h borderxmin

3 3

width of the plot border   x value of upper left plot window

borderymin

3

y value of upper left plot window

borderxmax

3

x value of lower right plot window

borderymax

3

y value of lower right plot window

bordermargin

3

margin between the border and the plot axis

xmin

3

x value of lower left plot axis range

ymin

3

y value of lower left plot axis range

xmax

3

x value of upper right plot axis range

ymax

3

y value of upper right plot axis range

Altair Engineering, Inc.

41

Tem plate s

 

gridlines

3

if the grid lines are on, set to 1

gridxincrement

3

increment of grid lines on x axis

gr i dyi ncr emen

3

increment of grid lines on y axis

mindivisions

3

minimum divisions allowed

maxdivisions gridcolor

3 3

maximum divisions allowed color of the grid lines

gridxlabel

3

x grid label frequency

gridylabel

3

y grid label frequency

gridwidth

3

width of the grid lines

labelsformat

3

format of the labels

labelsplaces

3

width of the label field

labelscolor

3

color of the labels

labelsfont

3

font used on the labels

mar gi n

3

margin between labels and grid lines

axistitlecolor

3

color of the axis titles

axistitlefont

3

font used for the axis titles

legendxloc

3

x location of the legend

legendyloc

3

y location of the legend

legendfont

3

font used on the legend

curves

3

pointer to curves

numberofcurves

3

number of the curves on the plot

xaxi st ype

3

x axis type (0 - linear, 1 - log, 2 - decibel)

xaxisgrids

3

grid lines per decade for the x axis

xaxistics

3

grid labels per decade for the x axis

xaxisdynamicrange

3

dynamic range for (x, y) axis offsetting

xaxisformat

3

x axis format ("f" for fixed, "e" for exponential, "a" for auto)

yaxi st ype

3

y axis type (0 - linear, 1 - log, 2 - decibel)

yaxisgrids

3

grid lines per decade for the y axis

yaxistics

3

grid labels per decade for the y axis

yaxisdynamicrange

3

dynamic range for (x, y) axis offsetting

yaxisformat

3

y axis format ("f" for fixed, "e" for exponential, "a" for auto)

Templ ates

42

Altair Engineering, Inc.

 

legendon

3

set to 1 if the legend is being displayed

legendidson

3

set to 1 if IDs are shown in the legend

attributesmax

3

the number of attributes owned by this entity

ext ended

3

1 indicates plot is an extended (dual) plot.

mode

3

5 indicates phase/magnitude plot 2 indicates real/imaginary plot This field only has meaning if extended=1.

vonmises

3

flags a plot as complex vonmises.

Curves D at a N a me

Level

Va l ue

id

3

ID of the curve

name

3

name of the curve

title

3

curve title

linetype

3

line style used to draw the line

markertype

3

marker type used to indicate points on the curve

color

3

color used to draw the curve

width

3

width of the curve

scalex

3

x scale factor  

scaley

3

y scale factor  

points

3

pointer to points in curve (pointervalue is curve point)

numberofpoints

3

number of points in the curve

xkind

3

type of source for x data (0 - file, 1 - math expression)

xpa t h

3

File path and name, or math expression for x data

xt ype

3

type of the x component

xreq

3

name of the x request

xcomp

3

name of the x request component

ykind

3

type of source for y data (0 - file, 1 - math expression)

ypa t h

3

File path and name, or math expression for y data

yt ype

3

type of the y component

yreq

3

name of the y request

Altair Engineering, Inc.

43

Tem plate s

 

ycomp

3

name of the y request component

attributesmax

3

the number of attributes owned by this entity

D at a Na m e

Level

Va l u e

pointer.name

3

name of the dictionary item

pointer.type

3

type of the dictionary item

pointer.typename

3

type name of the dictionary item

pointer.string

3

string value of the dictionary item

pointer.value

3

value of the dictionary item

pointer.active

3

flag indicating the dictionary's activity

Dictionaries

Assemblies D at a Na m e

L e ve l

V al ue

id

3

ID of the assembly

name

3

name of the assembly

color

3

color of the assembly

components

3

pointer to components in an assembly(pointervalue assembly(po intervalue is component ID)

numberofcomponents

3

number of components in the assembly

attributesmax

3

the number of attributes owned by this entity

Blocks D at a Na m e

Level

Va l u e

id

3

ID of the block

name

3

name of the block

color

3

color of the block

mini

3

minimum i coordinate

maxi

3

maximum i coordinate

minj

3

minimum j coordinate

maxj

3

maximum j coordinate

mink

3

minimum k coordinate

Templ ates

44

Altair Engineering, Inc.

 

max k

3

maximum k coordinate

divi

3

number of divisions in the i direction

divj

3

number of divisions in the j direction

divk

3

number of divisions in the k direction

wallsmax idivisions

3 3

total number of walls pointer to divisions in i direction(pointervalue is division coordinate)

 jdivisions

3

pointer tto o divisi divisions ons in j direction(pointervalue direct ion(pointervalue is i s division divisi on coordinate)

kdivisions

3

pointer to divisions in k direction(pointervalue is division coordinate)

blockcell

3

pointer to block cell (pointervalue is wall ID)

blockwall

3

pointer to block wall

pointer.wallcolor

3

color of the wall from blockwall pointer  

pointer.wallid pointer.wallname

3 3

ID of the wall from blockwall pointer   name of the wall from blockwall pointer  

attributesmax

3

the number of attributes owned by this entity

Lines - Data Names D at a N a me

Level

Va l ue

id

3

ID of the line

collector

3

collector that owns the line (component pointer)

geo mi d

3

internal ID in geometry database

attributesmax

3

the number of attributes owned by this entity

Points - Data Names D at a N a me

Level

Va l ue

id

3

ID of the point

collector

3

collector that owns the point (component pointer)

geo mi d

3

internal ID in geometry database

attributesmax

3

the number of attributes owned by this entity

Altair Engineering, Inc.

45

Tem plate s

 

x

3

The x coordinate of the point

y

3

The y coordinate of the point

z

3

The z coordinate of the point

Surfaces - Data Names D at a Na m e

Level

Va l u e

id

3

ID of the surface

collector

3

collector that owns the surface (component pointer)

attributesmax

3

the number of attributes owned by this entity

g eomi d

3

internal geometric ID

D at a Na m e

Level

Va l u e

id

3

ID of the title

type

3

type of the title

color

3

color of the title

name

3

name of the title

t ext

3

text displayed in the title

font

3

font used to display the title (1-4)

anchorpoint

3

anchor corner of the title

anchorangle

3

angle from vertical for the title pointer  

dist a nce

3

distance from the entity to the border  

entityid

3

ID of the entity

t ypen ame

3

name of the entity to which the title points

borderon

3

1 if the border is on, else 0

bordercolor

3

color of the border  

bor der wi dt h

3

width of the border  

borderxmin

3

minimum x value of the border  

borderxmax

3

maximum x value of the border  

borderymin

3

minimum y value of the border  

Titles

Templ ates

46

Altair Engineering, Inc.

 

borderymax

3

maximum y value of the border  

attributesmax

3

the number of attributes owned by this entity

Global Variables D at a N a me

Level

Va l ue

counter1

all

1st counter variable

counter2

all

2nd counter variable

counter3

all

3rd counter variable

counter4

all

4th counter variable

counter5

all

5th counter variable

counter6

all

6th counter variable

counter7

all

7th counter variable

counter8

all

8th counter variable

counter9

all

9th counter variable

counter10

all

10th counter variable

counter11

all

11th counter variable

counter12

all

12th counter variable

counter13

all

13th counter variable

counter14

all

14th counter variable

counter15

all

15th counter variable

counter16

all

16th counter variable

counter17

all

17th counter variable

counter18

all

18th counter variable

counter19

all

19th counter variable

counter20

all

20th counter variable

pi

all

value = PI(3.1415926535...)

pointer1

all

1st pointer variable

pointer2

all

2nd pointer variable

pointer3

all

3rd pointer variable

pointer4

all

4th pointer variable

pointer5

all

5th pointer variable

Altair Engineering, Inc.

47

Tem plate s

 

pointer6

all

6th pointer variable

pointer7

all

7th pointer variable

pointer8

all

8th pointer variable

pointer9

all

9th pointer variable

poin t er10 variable1

all all

10th pointer variable 1st variable

variable2

all

2nd variable

variable3

all

3rd variable

variable4

all

4th variable

variable5

all

5th variable

variable6

all

6th variable

variable7

all

7th variable

variable8

all

8th variable

variable9

all

9th variable

vari able10

all

10th variable

vari able11

all

11th variable

vari able12

all

12th variable

vari able13

all

13th variable

vari able14

all

14th variable

vari able15

all

15th variable

vari able16

all

16th variable

vari able17

all

17th variable

vari able18

all

18th variable

vari able19

all

19th variable

vari able20

all

20th variable

version

all

the version of HyperMesh

dat e

all

the date at output

time

all

the time at output

machine

all

the platform running HyperMesh

user

all

the user running HyperMesh

Templ ates

48

Altair Engineering, Inc.

 

Vectors - Data Names D at a N a me

Level

Va l ue

id

3

ID of the vector entity

bas eno de

3

node to which the vector is attached (pointer)

farnode

3

node at the vector tip (if two-node method is used for   vector creation; otherwise all values return zero.)

basenodeid

3

ID of the base node

f arnodeid

3

ID of the far node; 0, if not used.

xcomp

3

x component of the vector  

ycomp

3

y component of the vector  

zcomp

3

z component of the vector  

magnitude

3

magnitude of the vector  

s ys te m

3

local coordinate system in which the vector is defined

syst e mi d

3

local coordinate systemid in which the vector is defined

collector

2, 3 , 4

collector that owns the vector   (vector collector pointer)

Altair Engineering, Inc.

49

Tem plate s

 

Using Template Commands Template commands instruct HyperMesh how to format data and user-defined text for output. Template file commands commands begin with an asterisk, *, and end with paren parentheses,.(). theses,.(). Some commands contain parameters in parentheses, depending on the requirements of the command

Template Commands *addblock()  Adds a block to a link. Syntax

*addblock(<name>)

Argument

<name>

*after() Indicates that the commands following are processed on the *after()  level. Syntax

*after()

*aftercollector() Indicates that the commands following are processed on the

 level. *aftercollector()

Syntax

*aftercollector()

*assemblies() Starts an assembly output block. block. All the assemblies in the HyperMesh data database base are output according to the user-defined format in this block. Syntax

*assemblies()

Example

To output the components in an assembly, the *pointerset() command must be used to retrieve the component IDs:

Templ ates

50

Altair Engineering, Inc.

 

*counterset(counter1,0) *loopif([counter1 != numberofcomponents]) *pointerset(pointer1,components,counter1) *field(integer,pointer1.pointervalue,0) *counterinc(counter1) *endloop() Comments

Requires an *output()  command at the end of the block.

*before() Indicates that the commands following are processed on the *before()  level. Syntax

*before()

*beforecollector() Indicates that the commands following are processed on the *before()  collector level. Syntax

*beforecollector()

*begincardmenu() Indicates the beginning of the control cards list. Syntax

*begincardmenu()

Comments

Only *cardmenuitem()  commands are valid between the *begincardmenu() and *endcardmenu()  commands. *begincardmenu()

Altair Engineering, Inc.

51

Tem plate s

 

*beginlink() Starts a link. Syntax

*beginlink(<type>,<name>)

Arguments

<type> <name>

Comments

Links can be used to tie output blocks together.

*beginmenu() Indicates the beginning of the description used for the card previewer. Syntax

*beginmenu()

Comments

Must be accompanied by the *endmenu()  command.

*blocks() Starts a finite difference block output block. All the blocks in the HyperMesh database are output according to the user-defined format in this block. Syntax

*blocks()

Example

To output the locations of the i, j, or k divisions of a block, the *pointerset()  command must be used: *counterset(counter1,0) *loopif([counter1 != divi])   *pointerset(pointer1,idivisions,counter1)   *field(real,pointer1.pointervalue,8)   *counterinc(counter1) *endloop()

To output the wall data for a block, the following commands may be used: *counterset(counter1,0) *loopif([counter1 != wallsmax])

Templ ates

52

Altair Engineering, Inc.

 

  *pointerset(pointer1,blockwall,counter1)   *field(integer,pointer1.wallid,8)   *field(string,pointer1.wallname,0)   *field(integer,pointer1.wallcolor,8)   *counterinc(counter1) *endloop() Comments

Requires an *output()  command at the end of the block.

*cardmenuitem() Specifies the name and tag attribute for a control card. Syntax

*cardmenuitem(<button text>,<attribute name>)

Arguments

<button text>

The that is displayed to you in60 thecharacters control cardstext menu. Should be less than in length.

<attribute name>

The tag attribute for a control card entity. This must have an accompanying *card(<attribute name>) block in the template file.

Comments

The *cardmenuitem() commands specify the list that appears in the control cards menu. If the list is too large to display, previous/next and first/last buttons are added to the menu so you can page through all options. The control card buttons are displayed with different colors, depending on their  status and their existence in the database. Items with gray text do not exist in the database. Items with red text exist in the database, but are inactive and are not written to a file when exporting data. Items with green text exist in the database and are active; and are output when exporting data. Only one instance of each type of control card can exist in the database.

*cards() Starts a control card output block. Syntax

*cards(<card name>)

Argument

<card name>

Example

To output the CTRL_TITLE  card the following commands may be used:

The name of the card to output.

*cards("CTRL_TITLE")

Altair Engineering, Inc.

53

Tem plate s

 

 *format()   *string("TITLE / ")   *string(" ")   *fieldleft(string,$TITLE_VAL,48) *end() *output() Comments

Requires a *output() at the end of the block.

 *codename() Sets a unique solver number to be used for identifying attributes. Syntax

*codename(<solver>,<identifier>)

Arguments

<solver>

The name of the solver.

<identifier>

 A unique number identifying identi fying the solver.

Comments

The *codename()  command must occur before the first *defineattribute()  command. All attributes attributes created with this this template are marked with this solver identifier. Solver identifiers 0-63 are reserved for HyperMesh officially supported templates. Solver identifiers 64-127 are available for user-defined templates. If  two templates are to share a set of attributes, they should have both the same solver identifier and the exact set of *defineattribute()  commands.

*components() Starts a component output block. block. The components in the HyperMesh datab database ase are output according to the user-defined format in this block. Syntax

*components(<property name>,<material name>)

Arguments

<property name>

Used as a key to determine if the property cards defined by this component are needed. If an element has been output that requires the property, the component the element belongs to is marked for that property.

material name> material

Used as a key to determine if the material cards defined by this material are needed. If  a component has been output that requires a material, the material collector to which that component collector points is marked for that



Templ ates

54

Altair Engineering, Inc.

 

material. Example

If the auto properties flag is turned off when a model is translated, then the user  must define a dictionary item that is given the name <property name> and set it active: *elements(104,1,"CQUAD4","NAST_PSHELL")   .   .   . *output() *components("NAST_PSHELL","MATERIAL")   *define("NAST_PSHELL",none,0.0,1)   .   .   . *output()

Comments

*components()  should create the property cards for 2-D and 3-D elements.

Requires an *output()  command at the end of the block.

*compressreal() Changes how trailing zeros for real numbers are written to the output deck. Syntax

*compressreal(<flag>)

Argument

<flag>

If a <flag> is 1, then trailing zeros are written as blanks.

Comments

Using *compressreal(1)  causes HyperMesh to write numbers such as 0.0000 as 0. 0.0 0.

*counterinc() Increments a counter. Syntax

*counterinc(<counter>)

Argument

<counter>

Value from counter1 to counter20 indicating the counters to be incremented.

Altair Engineering, Inc.

55

Tem plate s

 

 *counterse *counterset() t() Sets the initial value of the global counter. *counterset(<counter>,<value>)

Syntax

Arguments

 

<counter>

value> value>



Comments

Value fromtocounter1 to next counter20 indicating the counter(s) set to the parameter. Value of the counter.

Counters can be useful to specify continuation cards on some analysis codes. For an example, see the NASTRAN template file in HyperMesh.

*cubiclines() Starts a line output block in parametric cubic format. All of the lines in the database are output according to the user-defined format in the block following the *cubiclines()  command. Syntax

*cubiclines(<configuration>)

Argument

<configuration>

Comments

Requires an *output()  at the end of the block.

*curves() Starts a curve output block. The curves in the HyperMesh database are output according to the user-defined format in this block. Syntax

*curves()

Example

To output the x and y data values for each curve, the following commands could be used: *counterset(counter1,0) *loopf([counter1 != numberofpoints*2])   *pointerset(pointer1,points,counter1)   *field(real,pointer1.pointervalue,8)   *counterinc(counter1)   *pointerset(pointer1,points,counter1)   *field(real,pointer1.pointervalue,8)

Templ ates

56

Altair Engineering, Inc.

 

  *counterinc(counter1) *endloop() Comments

Requires an *output()  command at the end of the block.

*define() Defines a dictionary item. Syntax

*define(<name>,<type>,<value>,<active>)

Arguments

<name>

The name of the dictionary item.

type> type>

The type of the dictionary item.

value> value>

The initial value assigned to the data item. This should





be a number except if the item type is string. active> active>



Comments

Determines the activity of the dictionary item.

The available types are listed below: no ne

No value is associated with the item.

string

The item has a string assigned to it.

I nt e ger

The item has an integer assigned to it.

real

The item has a real value assigned to it.

-1

Always active.

0

Not active but user can toggle.

1

Active and user can toggle.

Items whose activity is set to -1 appear white on the dictionary edit  menu. If  the activity is set to 0 or 1, the menu item appears in cyan, and you may choose to star the item.

Altair Engineering, Inc.

57

Tem plate s

 

*defineattribute() Defines an attribute for a solver  Syntax

*defineattribute(<name >,<identifier>,<type>, <behavior>)

Arguments

<name>

The attribute name (maximum of 31 characters).



The number associated with the attribute. The z can be in the range of 1 to 8192.

<type>

The attribute type. Legal values are:

int eger

Attribute contains an integer  

arrayofinteger

Attribute contains array of integer numbers

arrayofinteger2d

Attribute contains an 2d array of   integer numbers

real

Attribute contains a floating pointnumber  

arrayofreal

Attribute contains an array of floating point numbers

arrayof real2d

Attribute contains an 2d array of   floating point numbers

string

Attribute contains a string

arrayofstring

Attribute contains an array of strings

entity

Attribute contains a reference to an entity (its ID and type)

<behavior>

Determines how attributes are treated when the entity that owns it is changed. This field has not been implemented. The only value for <behavior>  is none.

identifier> identifier>

Comments

Templ ates

 All entities entit ies in the HyperMesh Hyper Mesh database databa se may point to attributes. Attributes are defined with the *defineattribute  command.

58

Altair Engineering, Inc.

 

*elementareacalculation() Determines how to calculate the area of an element. Syntax

*elementareacalculation(<type>,<num>)

Arguments

<type>

The element type. Only quad4  is supported.

<num>

Can be 1 (one point gaussian quadrature) or 4 (four  point gaussian quadrature).





*elementresultstore() Stores an element value for the current element. Syntax

*elementresultstore(<value>)

Argument

<value>

Example

*function("HM_CALC_TIMESTEP",variable16,variable17, variable18,variable19,variable20)  

The element value to be stored.

*elements(60,0,"BEAM","")

 

... put result into variable1

 

*elementresultstore(variable1)

 

*output()

*return() Comments

This command can be used in the template function, HM_CALC_TIMESTEP , t o store the initial time step for each element. When time steps have been saved,

element mentss  panel. an assigned plot can be created in the check ele This function must be called in the *format()  section of an *elements() block.

Altair Engineering, Inc.

59

Tem plate s

 

*elements() Starts an element output block. The elements in the HyperMesh database whose configuration and type are equal to the parameters are output according to the user-defined format defined in this block. Syntax

*elements(<configuration>,<type>,<user name>,<property name>)

Arguments

<configuration>

Templ ates

Defines the HyperMesh element that should be output using this block definition. See the previous table describing element configurations and values defined for for each element. element. If the <config> supplied supplied is 0, HyperMesh outputs all elements of the specified config. The possible values are listed below:

60

Conf i g

Element Output

0

Any element

1

Ma ss

2

Plot

3

Weld

5

Rigid

20

Sp r i ng

21

Sp r i ng

50

Bar (use 60 instead)

51

Rod (use 61 instead)

52

Beam (use 60 instead)

55

Rigidlink

56

RB E3

60

Bar2

63

Bar3

61

Rod

70

Gap

103

Tria3

Altair Engineering, Inc.

 

104

Quad4

106

Tria6

108

Quad8

123

Master3

124

Master4

133

Sl ave3

134

Sl ave4

135

Sl ave1

204

Tet ra4

206

Penta6

208

Hex8

210

Tetra10

215

Pent a15

220

He x2 0

Defines the element type that should be output using this block definition. The possible values are user-defined so that more element types can be defined by the user. To change the type of an element in HyperMesh, see the elem types panel.

<type>

If <type>  supplied is 0 (zero), HyperMesh outputs all elements of the given configuration. <user name>

 A 32-character 32-ch aracter string enclosed in double doub le quotes holding the name of the element as defined by the user. The name is displayed by the elem types panel to the user for  selection.

<property name>

 A 32-character 32-ch aracter string enclosed in double doub le quotes holding the name of the property that the elements require. The name is used by the collectors panel to load the dictionaries defined in this block, and also to link to the *components()  and *properties() command.

Altair Engineering, Inc.

61

Tem plate s

 

Comments

Requires an *output() command at the end of the block.

*else() Used to define the false block of an if-statement. Syntax

*else()

*enabledatabase() Used to scan for entities in the HyperMesh database. Syntax

*enabledatabase(<flag>)

Argument

<flag>

The flag can be set to all  or  or selected . If you set the flag to all , the entity output commands (such as *nodes()) scan all entities in the database, even if you select displayed  on  on the export   or   s ummary  panels.  panels. If you set the flag to selected , and you select displayed  on the export  or  s ummary panels, the entity output commands scan the database for the displayed commands only.

Comments

When writing export and summary templates, it may be necessary to scan the entire database before processing the displayed entities. To do this, use *enabledatabase(all) . To scan the database for only the entities that you selected (this can be all  or  or displayed ), ), use *enabledatabase(selected) . *enabledatabase()  should be used outside of any other command blocks and can be used more than once.

*end() Places an end-of-line character in the data deck being generated. Syntax

*end()

Comments

This command ends the current line and places the output cursor at the beginning of the next line in the output file.

Templ ates

62

Altair Engineering, Inc.

 

*endcardmenu() Indicates the end of the control cards list. Syntax

*endcardmenu()

*endif() Used to define the end of an if-block. Syntax

*endif()

*endlink() Ends a link. Syntax

*endlink()

*endloop() Indicates the end of a block that was initialized with the *loopif()  command. Syntax

*endloop()

*endmenu() Indicates the ending of the description used for the card previewer. Syntax

*endmenu()

Comments

Must be accompanied by the *beginmenu() command.

*endsegments() Ends a segment block. Syntax

*endsegments()

Altair Engineering, Inc.

63

Tem plate s

 

*entitypointerset() Sets the initial value of a specified entity. Syntax

*entitypointerset(<entity type>, <entity id>, <pointer number>, <pointer>, <value>)

Arguments

<entity type>

The type of entity, such as sets, elems, or nodes , to which <entity id> refers.

<entity id>

The ID of the entity you want to reference.

<pointer number>

Value from pointer1 to pointer10, indicating which of the 10 possible pointers to use as the <value> parameter.

<pointer>

Points to the data object that is accessed. Only certain data types may use pointers. These are described in the template commands in which they are valid.

<value>

The value of the pointer.

Comments

*entitypointerset()  can be used on any entity specified by <entity type> and <entity id>.

*equations() Starts an equation output block. The equations in the HyperMesh database with a type equal to the <type> argument are output according to the user-defined format in this block. Syntax

*equations(<type>, <user name>)

Arguments

<type>

The user-defined type that is output.

<user name>

The user-defined name for <type>.

Example

The following example outputs equations in a format similar to ABAQUS: *equations(0,"EQUATION") *format()   *string("*EQUATION") *end()   *counterset(counter1,[independentnodesmax+1])

Templ ates

64

Altair Engineering, Inc.

 

  *field(integer,counter1,0)   *end()   *field(integer,dependentnode.id,0)   *string(",")   *field(integer,dependentdof,0)   *string(",")   *field(real,dependentcoeff,0)   *string(",")   *counterset(counter1,0)   *loopif([counter1 < independentnodesmax])  

*pointerset(pointer1,independentnodes,counter1)

 

*field(integer,pointer1.pointervalue,0)

 

*string(",")

 

*pointerset(pointer1,independentdofs,counter1)

 

*field(integer,pointer1.pointervalue,0)

 

*string(",")

 

*pointerset(pointer1,independentcoeffs,counter1)

 

*field(real,pointer1.pointervalue,0)

 

*counterinc(counter1)

  *endloop()   *end() *output()

*errormessage() Displays an error message on the menu bar. Syntax

*errormessage (<string>)

Arguments

<string>

Example

The example below displays an error for each quad4 that has a jacobian less than .7:

String to be displayed

*elements(104,0,"","")

Altair Engineering, Inc.

65

Tem plate s

 

  *format()  

*if([jacobian < .7])

   

*errormessage("jacobian less than .7") *endif()

*output() Comments

Each time *errormessage()  is called, it overwrites the last error message. If  the right mouse button is pressed while printing an error message, HyperMesh stops processing the template.

*field() Places a formatted value from the database into the output file. Syntax

*field(<type>,<data name>,<width>)

Arguments

<type>

Either integer, unsigned, real, exponential, string, hexadecimal,, or quoted. For simplicity, the first letter is hexadecimal required; all others are optional but recommended.

<data name>

The name of the data to be accessed.

<width>

The width of the formatted field. In the case of real, HyperMesh uses scientific notation in order to make the value printed fit.

*fieldleft() Places a left-justified, formatted value from the database into the output file. Syntax

*fieldleft(<type>,<data name>,<width>)

Arguments

<type>

Either integer, unsigned, real, exponential, string, hexadecimal,, or quoted. For simplicity, the first letter is hexadecimal required; all others are optional but recommended.

<data name>

The name of the data to be accessed.

<width>

Width of the formatted field. In the case of real, HyperMesh uses scientific notation in order to make the value printed fit.

Templ ates

66

Altair Engineering, Inc.

 

*fieldright() Places a right-justified, formatted value from the database into the output file. Syntax

*fieldright(<type>,<data name>,<width>)

Arguments

<type>

Either integer, unsigned, exponential, hexadecimal, hexadecimal , or quoted. real, For simplicity, thestring, first first letter is required; all others are optional but recommended.

<data name>

The name of the data to be accessed.

<width>

The width of the formatted field. In the case of real, HyperMesh uses scientific notation in order to make the value printed fit.

*format() Indicates that the following commands should be executed on the format level. Syntax

*format()

*function() Starts a function block. Syntax

*function(<name>,<variables>)

Arguments

<name>

<variables>

Example

The name of the function. Names should not begin with HM_ (these are reserved for use by HyperMesh. The variables to be returned to HyperMesh (variable1 variable20). The number of variables depends on the function. Functions can be used by HyperMesh to calculate information needed in some panels.

For example, the mass  panel calls the function HM_ELEMENT_MASS  to calculate the area (first variable) volume (second variable) and mass (third variable) of a set of elements: *function("HM_ELEMENT_MASS,variable1,variable2,variable3)  *elements(1,1,"MASS","")   *before()  

*variableset(variable1,0)

Altair Engineering, Inc.

67

// Area

Tem plate s

 

 

*variableset(variable2,0)

// Volume

 

*variableset(variable3,0)

// Mass

  *format()    

*variableset(variable3,[var *variableset(variable3,[variable3 iable3 + @magnitude($MASS_ADDMX,$MASS_ADDMY,$MASS_ADDMZ)])

 *output() *return()

*geometryoverride() Overrides the lines option on the export data panel and activates lines for output. Syntax

*geometryoveride()

*globaldefaults() Used to specify that each real, integer, and string attribute is modified as per the *menudefaultvalue(). Syntax

*globaldefaults()

Comments

 Any default defau lt value not overridden overr idden by a *menudefaultvalue()  fills the field with the number of  blanks equal to the width parameter in the *menufield() command when the field has the status off. *menudefaultvalue()  can still be used to specify a different default value for individual fields when needed.

*groups() Starts a group output block. The groups in the HyperMesh database whose configuration and type are equal to the parameters are output according to the user-defined format in this block. Syntax

*groups(<configuration>,<type>,<user name>)

Arguments

<configuration>

Defines the HyperMesh group that should be output using this block definition. The possible values are: Conf i gGr oup

Templ ates

68

Output

Altair Engineering, Inc.

 

1

Interface with master and slave elements

2

Interface with master   elements and slave nodes

3

Interface with slave elements

4

Interface with slave nodes

5

Rigid walls

<type>

Defines the group type that should be output using this block definition. The possible values are user-defined so that more types can be defined by the user. When groups are built, the template file is read automatically to determine the type of the group.

<user name>

 A 32-character 32-charac ter string enclosed in double quotes quo tes holding thename nameisofused the group defined by the user. The by theasappropriate panels and displayed to the user for selection.

Comments

Requires an *output()  command at the end of the block.

*if() Used to conditionally execute branches of code. Syntax

*if([<expression>])

Argument

<expression>

Example

This command is useful for testing and acting on a condition. For example, users may wish to output only nodes having a z value of zero. The following is an example of this situation:

Relational expression.

*nodes()   *format()      

Comments

*if([z == 0.0]) <instructions for node format> *endif()

*output() Requires an *endif()  command.

Altair Engineering, Inc.

69

Tem plate s

 

The expression expression is required to be enclosed in square brackets. The following operators are available: == , =

equal

!=

not equal

<=

less than or equal

<

less than

>=

greater than or equal

>

greater than

%

modulus

*include() Includes a file from the include directory. Syntax

*include(<filename>)

Argument

<filename>

Comments

*include()  can be used to insert a series of template commands that are used by multiple templates.

The file identified by must be in the include directory where the template is located.

*include() files can reference other *include()  files in the same directory, but make sure you do not create an infinite *include()  loop.

*lines() Starts a line output block. All of the lines in the database are output according to the user-defined format in the block following the *lines() command. Syntax

*lines(<configuration>)

Argument

<configuration>

Comments

Requires an *output()  at the end of the block.

Templ ates

70

Altair Engineering, Inc.

 

*loadcols() Starts a load collector output block. Syntax

*loadcols(<name>)

Argument

<name>

Comments

Requires an *output() command at the end of the block.

*loads() Starts a load output block. The loads in the HyperMesh database whose configuration is equal to the parameter configuration, and whose type is equal to the parameter type are output according to the user-defined format in this block. Syntax

*loads(<config>,<type>,<user name>)

Arguments

<config>

Defines the configuration of the load that is output using this block definition and has the following possible values: C onf ig Lo ad

Out put

0

Any load

1

Forces

2

Moments

3

Constraints

4

Pressures

5

Temperatures

6

Fluxes

8

Velocities

9

Accelerations

If the config supplied is 0 (zero), all loads of the given type are output. <type>

Defines the type of load being defined. The <type> parameter allows users to define multiple types of  loads per configuration. configurati on. If the type supplied is 0 (zero), all loads of the given config are output.

Altair Engineering, Inc.

71

Tem plate s

 

<user name> Comments

Defines the name of the load being defined.

Requires an *output()  at the end of the block.

*loadsteps() Starts a loadsteps output block. Syntax

*loadsteps()

Comments

Each loadstep contains a list of IDs for the load collectors within that step. Requires a *output() at the end of the block.

*loopif() Conditionally executes a block of code while a condition is true. Syntax

*loopif([<expression>])

Argument

<expression>

Example

If <expression>  evaluates to a nonzero value, then the statements contained within the loop block are executed. executed. The example below shows shows the usage of the loop:

 A relational expression.

*counterset(counter1,1)   *loopif([counter1 <= 5])   *end()   *counterinc(counter1)   *endloop()

*markfailed() Marks an element as failed  when  when used in the check elements panel (user  subpanel)  subpanel) Syntax

*markfailed()

Example

To mark quads that have a side shorter than .1, the following commands may be used:

Templ ates

72

Altair Engineering, Inc.

 

*elements(104,0,"","")  *format()   *if([shortestside < .1])  

*markfailed()

  *endif() *output() Comments

The command must only be used in a template file used with the user  subpanel of the check elements  panel. It is used to mark an element that has failed a user-defined element check (the element will be highlighted). It can only be used within a *elements block. The element is also put in the user mark.

*materials() Starts a material output block. The material in the HyperMesh database is output according to the user-defined format in this block. Syntax

*materials(<material name>)

Argument

<material name>

Used as a key to determine if the material cards defined by this material are needed. If a component or property collector has been output that requires a material, the material collector to which that component or property collector points is marked for that material.

*menuentitypointerset() Sets the initial value of a specified entity. Syntax

*menuentitypointerset(<entity type>, <entity id>, <pointer number>, <pointer>, <value>)

Arguments

<entity type>

The type of entity, such as sets, elems, or  nodes , to which <entity id> refers.

<entity id>

The ID of the entity you want to reference.

<pointer number>

Value from pointer1 to pointer20, indicating which of the 20 possible pointers to use as the <value> parameter.

Altair Engineering, Inc.

73

Tem plate s

 

Comments

<pointer>

Points to the data object object that is accessed. accessed. Only certain data types types may use pointers. pointers. These are described in the template commands in which they are valid.

<value>

The value of the counter.

*menuentitypointerset()  can be used on any entity specified by <entity type> and <entity id>.

*nodes() Starts a node output block. All of the nodes in the database are output according to the userdefined format in the block following the *nodes() command. Syntax

*nodes(<configuration>)

Argument

<configuration>

Defines the type of node to output in this block. Since HyperMesh only allows one type of node, this parameter is ignored but is allowed for  future compatibility.

Comments

The following commands are available to sort nodes within the template system: *sortnodes(byinputsystem) *sortnodes(byoutputsystem) *sortnodes(byid) *sortnodes(none)

The first three commands turn sorting on until it is turned off with *sortnodes(none) . This command requires an *output()  at the end of the block.

*nomenu() Specifies that the card image definition is in a following block. Syntax

*nomenu()

Comments

The *nomenu()  command must be the first command to follow an entity block header.

Templ ates

74

Altair Engineering, Inc.

 

*output() Outputs the data defined in the preceding block. Syntax

*output()

Comments

Requires a preceding block definition.

*outputblocks() Starts an outputblocks block. Syntax

*outputblocks()

Example

*outputblocks  contain a list of element or node IDs. An example is shown below: *outputblocks()  *format()   *if([type == 1])  

*counterset(counter1,1)

 

*loopif([counter1 <= idsmax])

 

*pointerset(pointer1,ids,[counter1-1])

 

*string("NOD: ")

 

*field(integer,pointer1.pointervalue,8)

 

*counterinc(counter1)

 

*endloop()

  *endif()   *if([type == 2])  

*counterset(counter1,1)

 

*loopif([counter1 <= idsmax])

 

*pointerset(pointer1,ids,[counter1-1])

 

*string("ELE: ")

 

*field(integer,pointer1.pointervalue,8)

 

*counterinc(counter1)

 

*endloop()

 

*endif()

Altair Engineering, Inc.

75

Tem plate s

 

*output()

*plots() Starts a plot output block. The plots in the HyperMesh database are output according to the userdefined format in this block. Syntax

*plots()

Example

To output the IDs of the curves in a plot, the following commands should be used: *counterset(counter1,0)   *loop([counter1 != numberofcurves])  

*pointerset(pointer1,curves,counter1)

 

*field(integer,pointer1.pointervalue,0)

 

*counterinc(counter1)

*endloop()

Comments

Requires an *output() at the end of the block.

*pointerset() Sets the initial value of a pointer. Syntax

*pointerset(<pointer number>,<pointer>,<value>)

Arguments

<pointer number>

Value pointer1 to pointer10 indicating which of  the 10 from possible pointers should be set to the <value> parameter.

<pointer>

The pointer to the data object to be accessed. Only certain data types types may use pointers. pointers. These are described in the template commands in which they are valid.

<value>

The value of the pointer.

Example

For example, to output all the dictionary entries for a component, the following commands could be used while in the component block: *counterset(counter1,0) *loopif([counter1 != dictionarymax])

Templ ates

76

Altair Engineering, Inc.

 

 

*pointerset(pointer1,dictionary,counter1)

 

*field(string,pointer1.name,0)

 

*field(integer,pointer1.type,0)

 

*field(string,pointer1.string,0)

 

*field(real,pointer1.value,8)

 

*counterinc(counter1)

*endloop()

*points() Starts a points output block. Syntax

*points()

Comments

Requires an *output() command at the end of the block.

*properties() Starts a property output block. block. The properties in the HyperM HyperMesh esh database are output accord according ing to the user-defined format in this block. Syntax

*properties(<property name>,<material name>)

Arguments

<property name>

Used as a key to determine if the property cards defined by this property are needed. If an element has been output that requires a property, the property collector to which that element points is marked for that property.

<material name>

Comments

Used as a key to determine if the material cards defined by this material are needed. If a property has been output that requires a material, the material collector to which that property collector points is marked for that material.

If the auto properties  flag is turned off when a model is translated, then the user  must define a dictionary item that is given the name <property name> an  and d set it active: *elements(60,1,"CBAR","NAST_PBAR")   .

Altair Engineering, Inc.

77

Tem plate s

 

  .   . *output() *properties("NAST_PBAR","NAST_MAT1")   *define("NAST_PBAR",none,0.0,1)  

.

 

.

 

.

*output() *properties()  should create the property cards for elements of type 21, 60, and 61.

*quote() Writes a quotation (") character. Syntax

*quote()

*rangeadd()  Add a number to a list so that ranges  can be found with @rangecount(), @rangestart() , and @rangeadd() . Syntax

*rangeadd(<number>)

Argument

<number>

Example

*elements(104,0,"","")

The integer number to add to the list.

  *format()  

*rangeadd(id)

  *after()  

*counterset(counter1,1)

 

*loopif([counter1 <= @rangecount()])

 

*string("start of range = ")

 

*field(integer,[@rangestart(counter1)],0)

Templ ates

78

Altair Engineering, Inc.

 

 

*end()

 

*field(integer,[@rangeend(counter1)],0)

 

*end()

 

*counterinc(counter1)

 

*endloop()

 

*rangereset()

*output() Comments

Use *rangeadd()  to add numbers to a list. Once all numbers have been added, @rangecount()  returns the number of ranges (e.g. 1-5, 10-20) that are in the list. Use the functions  @rangestart() and @rangeend()  to get the actual ranges.

*rangereset() Resets the list of numbers stored with *rangeadd() . Syntax

*rangereset()

Example

*elements(104,0,"","")   *format()  

*rangeadd(id)

  *after()  

*counterset(counter1,1)

 

*loopif([counter1 <= @rangecount()])

 

*string("start of range = ")

 

*field(integer,[@rangestart(counter1)],0)

 

*end()

 

*string("end of range = ")

 

*field(integer,[@rangeend(counter1)],0)

 

*end()

 

*counterinc(counter1)

 

*endloop()

 

*rangereset()

Altair Engineering, Inc.

79

Tem plate s

 

*output() Comments

Use *rangeadd()  to add numbers to a list. Once all numbers have been added,  @rangecount returns the number of ranges (e.g. 1-5, 10-20) that are in the list. Use the functions @rangestart() and @rangeend()  to get the actual ranges. *rangereset()  removes all numbers from the list.

*realprecision() Sets the number of significant figures after the decimal point for real numbers. Syntax

*realprecision (<int digits>)

Argument

<digits>

Comments

This command results in values being rounded, according to IEEE specifications, to fit in the specified precision.

The number of significant figures to be used for all real values after the command in the template file. A zero (default) uses all available spaces in the field width.

Enabling the *compressreal()  toggle truncates trailing zeros that are prodcued by this setting.

*return() Ends a function block Syntax

*return()

*scalefieldwidth() Scales the width of a field. Syntax

*scalefieldwidth(<field type>, <scalefactor>)

Arguments

<field type>

Specifies which field type to scale. Valid values are integer  , real , and string . “

<scalefactor>

Example











The scale factor to apply to each field of  <field type>. Typically, this value is 1 or 2.

To print the node IDs and globalx values with a width of 16 instead of 8:

Templ ates

80

Altair Engineering, Inc.

 

*nodes()   *before()  

*variableset(variable1,2)

 

*scalefieldwidth(real,variable1)

 

*scalefieldwidth(integer,variable1)

  *format()  

*string("*")

 

*field(integer,id,8)

 

*string("*")

 

*end()

 

*string("*")

 

*fieldleft(real,globalx,8)

 

*string("*")

 

*end()

*output() Comments

This command is typically used to write a deck that contains double precision numbers which have twice the field width specified by the *field command.

*segments() Starts a segment output block. Syntax

*segments()

Comments

Requires an *endsegments()  command.

*setcollector() Sets the current collector based on the last *pointerset()  command. This is commonly used used with loadsteps. loadsteps. You can also use this command with sets that that contain components. Syntax

*setcollector()

Example

The loadsteps entity contains the ids of loadcollectors loadcolle ctors for that step. To output the loads within each loadcollector: *loadsteps()

Altair Engineering, Inc.

81

Tem plate s

 

  *format()  

*string("SUBCASE")

 

*field(integer,id,3)

 

*end()

 

*counterset(counter1,0)

 

*loopif([counter1 < idsmax ])

 

*pointerset(pointer1,ids,counter1)

 

*setcollector()

 

*loads(3,1,"SPC")

 

*before()

 

*counterset(counter2,0)

 

*format()

 

*if([counter2 == 0])

 

*string("SPC")

 

*field(integer,pointer1.pointervalue,8)

 

*end()

 

*endif()

 

*counterinc(counter2)

 

*output()

 

*counterinc(counter1)

 

*endloop()

*output()

*sets() Starts a set output block. The sets in the HyperMesh database are output in the user-defined format contained within this block. Syntax

*sets()

Example

To output all the sets and their IDs, the following commands could be used while in the set block: *format()

Templ ates

82

Altair Engineering, Inc.

 

  *if([type == 1])  

*string("node set")

  *else()  

*string("elemen set")

  *endif()   *field(string,name,0)   *end()   *counterset(counter1,0)   *loopif([counter1 != idsmax])  

*pointerset(pointer1,ids,counter1)

 

*field(integer,pointer1.pointervalue,5)

 

*end()

 

*counterinc(counter1)

*endloop() Comments

Requires an *output() command at the end of the block.

*sortelements() Changes the order that elements are output in the *elements()  block. Syntax

*sortelements (<sort type>)

Argument

<sort type>

Example

 

bymaterialid 

sort elements elements by material. All elements in one material are output together.

none

sorting is not performed. The elements are output in the order  they are listed in the database.

The following example outputs a list of element IDs sorted by material: *elements(104,0,"","")   *before()  

*variableset(variable1,0)

  *sortelements(bymaterialid)

Altair Engineering, Inc.

83

Tem plate s

 

  *format()  

*if([variable1 != collector.materialid])

 

*string("elements in material")

 

*field(integer,collector.materialid,0)

 

*end()

 

*variableset(variable1,collector.materialid)

 

*endif()

 

*string("id = ")

 

*field(integer,id,0)

 

*end()

*output()

*sortloads() Changes the order that loads are output in the *loads() block. Syntax

*sortloads(<sort type>)

Argument

<sort type>

Example

 

bycomp1

sort loads by comp1

bycomp2 

sort loads by comp2

bycomp3

sort loads by comp3

bycomp4

sort loads by comp4

bycomp5 

sort loads by comp5

bycomp6 

sort loads by comp 6

bycomps

sort loads by all components

none

sorting is not performed

The following example outputs all forces in the same x direction, followed by the same y direction and then the same z direction: *loads(1,0,"")   *sortloads(bycomp1)   *before()   *variableset(variable1,999999)

Templ ates

84

Altair Engineering, Inc.

 

  *format()  

*if([comp1 != variable1])

 

*end() *end()

 

*string("FORCE x = ") *field(real,comp1,0) *end()

 

*variableset(variable1,comp1)

 

*endif()

 

*string(" ") *field(integer,id,0) *string(" ")

  *after()  

*end()

*output()

*loads(1,0,"")   *sortloads(bycomp2)   *before()  

*variableset(variable1,999999)

  *format()  

*if([comp2 != variable1])

 

*end() *end()

 

*string("FORCE y = ") *field(real,comp2,0) *end()

 

*variableset(variable1,comp2)

 

*endif()

 

*string(" ") *field(integer,id,0) *string(" ")

  *after()  

*end()

*output()

*loads(1,0,"")   *sortloads(bycomp3)   *before()  

*variableset(variable1,999999)

  *format()

Altair Engineering, Inc.

85

Tem plate s

 

 

*if([comp3 != variable1])

 

*end() *end()

 

*string("FORCE z = ") *field(real,comp3,0) *end()

 

*variableset(variable1,comp3)

 

*endif()

 

*string(" ") *field(integer,id,0) *string(" ")

  *after()  

*end() *end()

*output()

*sortnodes() Changes the order that nodes are output in the *nodes()  block. Syntax

*sortnodes(<sort type>)

Argument

<sort type>

Example

 

byid 

sort nodes by ID

byinputsystem

sort nodes by inputsystem ID

byoutputsystem

sort nodes by outputsystem ID

none

sorting is not performed. The nodes are output in the order they are listed in the database.

The following example outputs nodes sorted by their ID: *nodes()   *sortnodes(byid)   *format()  

*string("id = ")

 

*field(integer,id,0)

 

*end()

*output()

Templ ates

86

Altair Engineering, Inc.

 

 *string() Outputs a string to the output file. Syntax

*string(<string>)

Argument

<string>

 A string of characters. If the string s tring contains a space, an asterisk, or a comma, the string must be enclosed by double quotes.

*stringtablereset() Resets the string lookup table. Syntax

*stringtablereset()

*stringtablestore() Stores an entry into the string lookup table. Syntax

*stringtablestore(<key>,<value>)

Arguments

<key>

 Assigned to a string lookup table entry and is used by the @stringlookup()  function to find stored entries. <key> can be a data name or a literal string enclosed in double quotes.

<value>

The value assigned to an entry in the string lookup table and is returned by  @stringlookup().

Example

The example below stores the string shells in the string lookup table with a value of 10: *stringtablestore("shells",10)

The example below saves component names with a value of 1 in the string table: *components("","") *format() *stringtablestore(name,1) *output()

Altair Engineering, Inc.

87

Tem plate s

 

*surfaces() Starts a surface output block. Syntax

*surfaces()

Comments

Requires an *output() command at the end of the block.

*systcols() Starts a system collector output block. Syntax

*systcols()

Comments

Requires an *output()  at the end of the block.

*systems() Starts a system output block. All of the systems in the database are output according to the userdefined format in the block following the *systems()  command. Syntax

*systems()

Comments

Requires an *output()  at the end of the output block definition.

*tablereset() Resets the lookup table. Syntax

*tablereset()

*tablestore() Stores an entry in the lookup table. Syntax

*tablestore(<key>,<value>)

Arguments

<key>

 Assigned to a lookup table entry and is used by the @lookup()  function to find stored entries.

<value>

The value assigned to an entry in the lookup table and is returned by  @lookup().

Templ ates

88

Altair Engineering, Inc.

 

*text() Starts a block that contains text. Syntax

*text()

Comments

Requires an *output() command at the end of the block. This block provides an easy method of outputting a series of  strings.

*titles() Starts a title output block. All of the titles in the database are output according to the user-defined format in the block following the *titles()  command. Syntax

*titles()

Comments

Requires an *output() at the end of the output block definition.

*variableset() Sets a variable to a specific value. Syntax

*variableset(<variable>,<value>)

Arguments

<variable>

 A value from var variable1 iable1 to t o variable20 variab le20 indicating ind icating which of  the 20 possible variables should be set to the next parameter.

<value>

The  value of the variable.

Example

Variables can be used to hold real or integer values. For example, to add the value of variable5 to the current value of variable1, the following command could be used: *variableset(variable1,[variable1+variable5])

Altair Engineering, Inc.

89

Tem plate s

 

*vectorcols() Starts a vector collector output block. Syntax

*vectcols(<name>)

Argument

<name>

Comments

Requires an *output()  command at the end of the block.

The name of the output block.

*vectors() Starts a vectors output block. Syntax

*vectors()

Comments

Requires an *output()  command at the end of the block.

*vectortablereset() Resets the vector lookup table. Syntax

*vectortablereset(<type>,<tolerance>)

Arguments

<type>

The type of the vector lookup table. This determines how the vectors in the lookup table are compared against the key values sent by the @vectorlookup() function. Set this to 0, if the vectors represent node locations in space and the distance between the two nodes is the criteria for vectors being equal. Set this to 1, if the vectors represent vectors and the angle between the two vectors is the criteria for vectors being equal.

<tolerance>

The tolerance used to determine if a vector in the lookup table is equal to a key vector.

Templ ates

90

Altair Engineering, Inc.

 

*vectortablestore() Stores an entry into the vector lookup table. Syntax

*vectortablestore(<key>,<x comp>,<y comp>,<z comp>,<value>)

Arguments

<key>

The key assigned to the lookup table entry. This is used by the @vectorlookup()  function to find stored entries.

<x comp>

The x component of the vector assigned to a lookup table entry. This is used by the @vectorlookup() function to find stored entries.

<y comp>

The y component of the vector assigned to a lookup table entry. This is used by the @vectorlookup() function to find stored entries.

<z comp>

The z component of the vector assigned to a lookup table entry. This is used by the @vectorlookup() function to find stored entries.

<value>

The value assigned to an entry in the lookup table. This value is returned by @vectorlookup( ).

*writegeometry() Outputs the Altair geometry database in an internal ASCII format. Syntax

*writegeometry(<string>)

Arguments

<string>

Comments

This format is designed to be read in with the hminlib  function HM_writegeomdata().

 A small string to be inserted inser ted at the beginning begi nning of each line to serve as a comment character.

Altair Engineering, Inc.

91

Tem plate s

 

Using Template Functions The HyperMesh template functions allow you to query information in the database, such as the @count function, perform mathematical functions, and query user-defined tables. A template function begins with the at symbol, @, and is followed by the variable arguments in parentheses. Template functions are placed between square brackets, [ ].

Using a Template Function Command - Example The following example program finds the length of all weld elements and prints them to a file. *elements(3,0,"","")   *format()  

*field(integer,id,10)

 

*string(" ")

 

*field(real,[@magnitude(

 

node1.x - node2.x,

 

node1.y - node2.y,

 

node1.z - node2.z)],10)

 

*end()

*output()

Template Functions @acos() Trigonometric arc cosine of x, the result is expressed in radians between 0 and Syntax

@acos(<x>)

Argument

<x>

Value of type real.

π.

Templ ates

92

Altair Engineering, Inc.

 

@asin() Trigonometric Trigonometri c arc sine of x, the result is expressed in radians between -π /2 and Syntax

@asin(<x>)

Argument

<x>

π /2.

Value of type real.

@atan() Trigonometric Trigonometri c arc tangent of x, the result is expressed in radians between -π /2 and Syntax

@atan(<x>)

Argument

<x>

π /2.

Value of type real.

@atan2() Trigonometric arc tangent of x/y, with the result is expressed in radians between -π  and

π.

Syntax

@atan2(<x>,<y>)

Arguments

<x>

Value of type real, and should be expressed in radians.

<y>

Value of type real, and should be expressed in radians.

@attributearray2dcols() Returns the number of columns in a 2-D array attribute. Syntax

@attributearray2dcols(attribute)

Argument

<attribute>

The name of the attribute (must start with '$').

Altair Engineering, Inc.

93

 

@attributearray2drows() Returns the number of rows in a 2-D array attribute. Syntax

@attributearray2drows(attribute)

Argument

<attribute>

The name of the attribute (must start with '$').

@attributearray2dvalue() Returns the value of a 2-D array attribute. Syntax

@attributearray2dvalue(attribute,row,column)

Arguments

<attribute>

The name of the attribute (must start with '$')

<row>

The row number (starting at 1)

<column>

The column number (starting at 1).

@attributearraylength() Returns the length of a 1-D array attribute. Syntax

@attributearraylength(attribute)

Argument

<attribute>

The name of the attribute (must start with '$').

@attributearrayvalue() Returns the value of 1-D array attribute. Syntax

@attributearrayvalue(attribute,index)

Arguments

<attribute>

The name of the attribute (must start with '$')

<index>

Index into the array (starting at 1)

Tem plate s

Templ ates

94

Altair Engineering, Inc.

 

@attributeindexarray2dcols() Returns the number of rows for a 2-D array attribute on an entity. Syntax

@attributeindexarray2dcols(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

@attributeindexarray2drows() Returns the number of rows for a 2-D array attribute on an entity. Syntax

@attributeindexarray2drows(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

@attributeindexarray2dvalue() Returns the value of a 2-D array attribute on an entity. Syntax

@attributeindexarray2dvalue(<entity index>,<row>,<col>)

Arguments

<entity index>

The index of the attribute owned by the current entity (starting at 1).

<row> and <col>

Indices into the attribute array (both start at 1).

@attributeindexarraylength() Returns the length of a 1-D array attribute on an entity. Syntax

@attributeindexarraylength(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

Altair Engineering, Inc.

95

Tem plate s

 

@attributeindexarrayvalue() Returns the value of a 1-D array attribute on an entity. Syntax

@attributeindexarrayvalue(<entity index>,<array index>)

Arguments

<entity index>

The index of the attribute owned by the current entity (starting at 1).

<array index>

The index into the attribute array (starting at 1)

@attributeindexbehavior() Returns the behavior of an attribute on an entity. Syntax

@attributeindexbehavior(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

@attributeindexentityid() Returns the entity ID of an entity attribute on an entity. Syntax

@attributeindexentityid(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

@attributeindexentitytype() Returns the entity type (number) of an entity attribute on an entity. Syntax

@attributeindexentitytype(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

Templ ates

96

Altair Engineering, Inc.

 

@attributeindexentitytypename() Returns the entity type (string) of an entity attribute on an entity. Syntax

@attributeindexentitytypename(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

@attributeindexidentifier() Returns the identifier of an attribute on an entity. Syntax

@attributeindexidentifier(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

@attributeindexsolver() Returns the solver of an attribute on an entity. Syntax

@attributeindexsolver(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

@attributeindexstatus() Returns the status of an attribute on an entity. Syntax

@attributeindexstatus(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

Altair Engineering, Inc.

97

Tem plate s

 

@attributeindextype() Returns the type of attribute on an entity. Syntax

@attributeindextype(<index>)

Argument

<index>

Example

The index of the attribute owned by the current entity (starting at 1). The return types are: 1

int eger  

2

double

3

string

4

1-D integer array

5

1-D double array

6

entity

7

(not supported)

8

(not supported)

9

2-D integer array

10

2-D double array

11

string array

If you want to print the types of all attributes on nodes: *nodes() *format()  *counterset(counter1,1)  *loopif([counter1 <= attributesmax])  

*field(integer,[@attributeindextype(counter1)],5)

 

*end()

 

*coutnerinc(counter1)

 *endloop() *output()

Templ ates

98

Altair Engineering, Inc.

 

@attributeindexvalue() Returns the value of an attribute on an entity. Syntax

@attributeindexvalue(<entity index>)

Argument

<entity index>

The index of the attribute owned by the current entity (starting at 1).

@attributereferencecount() Returns the number of times an entity is referenced by an attribute. Syntax

@attributereferencecount(<entity type>, <id>)

Arguments

<entity type>

The type of entity referenced.

<id> Example

The entity ID. If you want to output only curves that are referenced, such as by a material or  load, use an *if  sta  statement tement as fo follows: llows: *curves()   *format()  

*if([@attributereferencecoun *if([@attributereferencecount(curves,id) t(curves,id) > 0)])

 

*string( Load Curve # )

 

*field(integer,id,0)

 

*end()

 

*endif()





*output()

The block above writes out only referenced curves, and those generated via post-processing operations are omitted (if they are not pointed to by an attribute).

Altair Engineering, Inc.

99

Tem plate s

 

@checkfile() Checks for a file. Syntax

@checkfile(<file name>)

Argument

<file name>

Example

*text()

File name to be checked.

  *if([@checkfile(\tmp\file)=1])  

*string( file exists ) “



  *else()  

*string( file does not exist ) “



  *endif() *output() Comments

Return 1 if the file exists. exists. On a PC, use backslashes backslashes for the path (\tmp\file ). On UNIX, use forward slashes for the path (/tmp/file ).

@controlcardattributedefined() Returns 1 if an attribute exists, 0 otherwise Syntax

@controlcardattributedefined(<ctrl card name>, <attribute name>)

Arguments

<ctrl card name> <attribute name>

Comments

If a control card or attribute is not defined, a 0 is returned.

@cos() Trigonometric Trigonometr ic cosine of x, where x is expressed in radians. Syntax

@cos(<x>)

Argument

<x>

 A value of type real.

Templ ates

100

Altair Engineering, Inc.

 

@count() Counts the entities in the database. Syntax

@count(<entity type>, <config>, <type>)

Arguments

<entity type>

The type of entity entity to be counted. counted. This paramet parameter  er  may be set to any of the entities in the database.

<config>

The configuration number of the entities to be counted. This parameter is used only if <entity type> is set to elements or loads. If set to zero, the entities are counted regardless of their  configuration.

<type>

The type number of the entities to be counted. This parameter is used only if <entity type> is set to elements. If set to zero, all of the entities are counted regardless of their type.

Comments

t data dat a panel,displayed. If the displayed    option  includes  option is selected (active) the expor the value returned by @count() only thoseon entities that are currently

@defaultstatus() Returns the default status of an attribute. Syntax

@defaultstatus(<attribute name>)

Comments

If the attribute is set to the default value (grayed out in the card previewer), the function returns 1; otherwise, it returns 0.

@defined() Tests to see if a dictionary item is defined. Syntax

@defined(<dictionary item>)

Argument

<dictionary item>

Comments

This function allows dictionary items to be set as a toggle that the user can turn off and on. During translation, @defined()  can be used to see if the item has been toggled on or off.

The name of a dictionary item. This function returns 1 if the dictionary item is active or 0 if the dictionary item is not active. If the dictionary item does not exist, the function returns 0.

Altair Engineering, Inc.

101

Tem plate s

 

 @dofs() Extracts individual degrees of freedom from an integer and returns the status Syntax

@dofs(<dof>,<position>)

Arguments

<dof>

Generally an integer beam end release code that returns 1 or 0 (on or off) if the integer in <position>  is contained within the <dof> field.

<position> Example

@dofs(123,1) = 1, @dofs(456,1) = 0

 @entitygettype() Gets the user-assigned type of an entity. The user-assigned entity type is set in the template. Syntax

@entitygettype(<entity type>, <entity id>)

Arguments

<entity type>

The type of entity to be retrieved, such as elems. This parameter  may be set to any entity type.

<entity id>

The ID of the entity.

@entityincollector() Returns the number of entities in a collector. Syntax

@entityincollector(<entity type>, <config>, <type>)

Arguments

<entity type>

Defines counted.the type of entity to be

<config>

Defines the configuration number of  the entities being counted. counted. If set to 0, entities are counted regardless of  their configuration.

<type>

Defines the type number of the entities being counted. If set to 0, entities are counted regardless of  their type.

Templ ates

102

Altair Engineering, Inc.

 

@entitymaxid() Returns the maximum ID in use from a type of entity. Syntax

@entitymaxid(<entity type>)

Argument

<entity type>

The type of the entity.

@enum() Returns the value of an enumeration. Syntax

@enum(<enum name>,<enum index>)

Arguments

<enum name>

The name of the enumeration.

<enum index>

The index into the enumeration (starting at 1).

@exists() Indicates if a pointer is pointing to an entity or if it is set to NULL. Syntax

@exists(<pointer>)

Argument

<pointer>

 A pointer to an entity. If the pointer  is pointing to an entity, the function returns 1. If not, the function returns 0.

@exp() Exponential of x. Syntax

@exp(<x>)

Argument

<x>

Example

@exp(2) = e2 = (2.718281828...)2 = 7.389056...

 A value of type real.

Altair Engineering, Inc.

103

 

@fabs()  Absolute value of x. Syntax

@fabs(<x>)

Argument

<x>

 A value of type real.

@getcollectorname() Retrieves the name of a collector. Syntax

@getcollectorname(<collector type>,<collector id>)

Arguments

<collector type>

The type of collector (such as properties or components).

<collector id>

The ID of the collector.

@getcontrolcardattribute() Returns the value of an attribute on a control card. Syntax

@getcontrolcardattribute(<control card>,<attribute>)

Arguments

<control card>

The name of the control card.

<attribute>

The attribute name.

Comments

If a control card and/or attribute is not present, an error occurs. Use @acontrolcardattributedefined()  to verify the existence of a control card or attribute.

Tem plate s

Templ ates

104

Altair Engineering, Inc.

 

@getentityvalue() Retrieves the value of an entity. Syntax

@getentityvalue(<entity type>, <entity id>, <data name>)

Arguments

Example

<entity type>

The type of entity, such as sets, elems, or nodes, to which <entity id>  refers.

<entity id>

The ID of the entity you want to reference.

<data name>

The data name of the entity. For  example, ID, name, node1.globalx .

To output the name of a set with the ID, 1: *field (string,[@getentityvalue(sets, 1, name)], 32)

Comments

The @getentityvalue  function allows you to get a value from an entity if you know the entity s type and ID. It allows you to get a value of the collector which contains an entity. This function searches the database and may access the data values slower than other  commands, such as *sets(). ’

@log() Natural logarithm. Syntax

@log(<x>)

Argument

<x>

Example

@log(2) = LN(2) = 0.693147

 A value of type real.

@log10() Logarithm of x to the base 10. Syntax

@log10(<x>)

Argument

<x>

Example

@log(100) = Log10(100) = 2.000

 A value of type real.

Altair Engineering, Inc.

105

Tem plate s

 

@lookup() Retrieves a value stored in a lookup table. Syntax

@lookup(<key>)

Argument

<key>

Used to compare the keys found on the lookup table entries. If <key> matches one of the keys in the lookup table, the function returns the value associated with that entry. If a matching key is not found, the function returns 0.

@magnitude() Returns the magnitude of a vector. Syntax @magnitude(<x comp>, <y comp>, <z comp>) Argument

<x comp>, <y comp>, and <z comp>

@pow Returns the real value of X raised to the power Y. Syntax

@pow(<x>,<y>)

Arguments

<x>

 A value of type real.

<y>

 A value of type real.

Example

@pow(2.0, 3.0) = 2.03 =8.0

The components of the vector to be evaluated.

Templ ates

106

Altair Engineering, Inc.

 

@rangecount() Returns the number of ranges for the numbers used with *rangeadd() . Syntax

@rangecount()

Example

*elements(104,0,"","")   *format()  

*rangeadd(id)

  *after()  

*counterset(counter1,1)

 

*loopif([counter1 <= @rangecount()])

 

*string("start of range = ")

 

*field(integer,[@rangestart(counter1)],0)

 

*end()

 

*string("end of range = ")

 

*field(integer,[@rangeend(counter1)],0)

 

*end()

 

*counterinc(counter1)

 

*endloop()

 

*rangereset()

*output() Comments

Use *rangeadd()  to add numbers to a list. Once all numbers have been added, @rangecount()  returns the number of ranges (e.g. 1-5, 10-20) that are in the list. Use the functions @rangestart()  an  and d @rangeend()  to get the actual ranges.

Altair Engineering, Inc.

107

 

@rangestart() Returns the starting range of a range of numbers. Syntax

@rangestart(<range>)

Argument

<range>

Example

*elements(104,0,"","")

The range number, starting at 1.

  *format()  

*rangeadd(id)

  *after()  

*counterset(counter1,1)

 

*loopif([counter1 <= @rangecount()])

 

*string("start of range = ")

 

*field(integer,[@rangestart(counter1)],0)

 

*end()

 

*string("end of range = ")

 

*field(integer,[@rangeend(counter1)],0)

 

*end()

 

*counterinc(counter1)

 

*endloop()

 

*rangereset()

*output() Comments

Use *rangeadd()  to add numbers to a list. Once all numbers have been added, @rangecount()  will return how many ranges, such as 1-5, 10-20, are in the list. Use the functions @rangestart()  an  and d @rangeend()  to get the actual ranges.

Tem plate s

Templ ates

108

Altair Engineering, Inc.

 

@rangeend() Returns the ending range of a range of numbers. Syntax

@rangeend(<range>)

Argument

<range>

Example

*elements(104,0,"","")

The range number, starting at 1.

  *format()  

*rangeadd(id)

  *after()  

*counterset(counter1,1)

 

*loopif([counter1 <= @rangecount()])

 

*string("start of range = ")

*field(integer,[@rangestart(counter1)],0)  

*end()

 

*string("end of range = ")

 

*field(integer,[@rangeend(counter1)],0)

 

*end()

 

*counterinc(counter1)

 

*endloop()

 

*rangereset()

*output() Comments

Use *rangeadd()  to add numbers to a list. Once all numbers have been added, @rangecount()  returns how many ranges , such as 1-5, 10-20, are in the list. Use the functions  @rangestart() and @rangeend()  to get the actual ranges.

@sin() Trigonometric sine of x, where x is expressed in radians. Syntax

@sin(<x>)

Argument

<x>

Value of type real.

Altair Engineering, Inc.

109

Tem plate s

 

@sqrt() Returns the square root of a number. Syntax

@sqrt(<x>)

Comments

The square root of z is returned. If <x>  is negative, an error  is reported.

@stringequal() Compares two strings, and returns 1 if they are equal; otherwise, 0. Syntax

@stringequal(<string1>,<string2>)

Arguments

<string1> <string2>

@stringlookup() Retrieves a value stored in a string lookup table. Syntax

@stringlookup(<key>)

Argument

<key>

Example

The following example looks for the string shells  in the string lookup table.

Used to compare the keys found in the string lookup table. <key> can be a data name or a literal string enclosed in double quotes. “



*if([@stringlookup("shells")])  *string("$ shells found") *end() *endif()

The following example finds components whose names are in the string lookup table: *components("","")  *format()   *if([@stringlookup(name)])  

*field(string,name,32) *end()

Templ ates

110

Altair Engineering, Inc.

 

  *endif() *output()

@tan() Trigonometric tangent of x, where x is expressed in radians. Syntax

@tan(<x>)

Argument

<x>

 A value of type real.

@vectorlookup() Retrieves a value stored in a vector lookup table. Syntax

@vectorlookup(<key>, <x comp>, <y comp>, <z comp>)

Arguments

<key>

Used to compare the keys found on the lookup table entries.

<x comp>, <y comp>, <z comp>

The components of the vector  that are used to compare the vectors found on the lookup table entries.

Comments

If both the keys match, and the vectors are within tolerance, then this function returns the value associated with the matching entry. If a match is not found, the function returns 0.

@vectorlookupcomponent() Retrieves a component of the vector stored in a lookup table. Syntax

@vectorlookup(<comp>, <key>)

Arguments

<comp>

The component of the vector (1 - x, 2 - y, 3 - z)

<key>

Used to compare the keys found on the lookup table entries.

Altair Engineering, Inc.

111

Tem plate s

 

@vectorlookupnotkey() Retrieves a value stored in a vector lookup table. Syntax

@vectorlookupnotkey(<key>,<x comp>,<y comp>,<z comp>)

Arguments

<key>

Used to compare the keys found in the lookup table entries.

<x comp>, <y comp>, <z comp>

The components of the vector  that is used to compare the vectors found in the lookup table entries.

Comments

If the input vector matches the vector in the lookup table and the keys do not match, this function returns the value stored in the lookup table. When looking for a match between vectors, the tolerance set by *vectortablereset()  is used. If no match is found, this function returns 0.

@xpointlocal() Transforms a coordinate into a local system and returns the x value of the transformed point. Syntax

@xpointlocal(<system id>, <x>, <y>, <z>)

Arguments

<system id>

The ID of the system into which the point should be transformed.

<x>, <y>, and <z>

The coordinates of the point to be transformed in the global system.

@xpointvectorlocal() Transforms a vector into a local system and returns the x value of the transformed vector. Syntax

@xpointvectorlocal(<system id>, <x>, <y>, <z>, <vx>, <vy>, <vz>)

Arguments

<system i>

The ID of the system into which the point should be transformed.

<x>, <y>, and <z>

The coordinates of the point where the vector is located in the global system.

Templ ates

112

Altair Engineering, Inc.

 

<vx>, <vy>, <vz>

The components of the vector to be transformed.

@ypointlocal() Transforms a coordinate into a local system and returns the y value of the transformed point. Syntax

@xpointlocal(<system id>, <x>, <y>, <z>)

Arguments

<system id>

The ID of the system into which the point should be transformed.

<x>, <y>, and <z>

The coordinates of the point to be transformed in the global system.

@ypointvectorlocal() Transforms a vector into a local system and returns the y value of the transformed vector. Syntax

@ypointvectorlocal(<system id>, <x>, <y>, <z>, <vx>, <vy>, <vz>)

Arguments

<system id>

The ID of the system into which the point should be transformed.

<x>, <y>, and <z>

The coordinates of the point where the vector is located in the global system.

<vx>, <vy>, <vz>

The components of the vector  to be transformed.

@zpointlocal() Transforms a coordinate into a local system and returns the z value of the transformed point. Syntax

@zpointlocal(<system id>, <x>, <y>, <z>)

Arguments

<system id>

The ID of the system into which the point should be transformed.

Altair Engineering, Inc.

113

Tem plate s

 

<x>, <y>, and <z>

The coordinates of the point to be transformed in the global system.

@zpointvectorlocal() Transforms a vector into a local system and returns the z value of the transformed vector. Syntax

@zpointvectorlocal(<system id>, <x>, <y>, <z>, <vx>, <vy>, <vz>)

Arguments

<system id>

The ID of the system into which the point should be transformed.

<x>, <y>, and <z>

The coordinates of the point where the vector is located in the global system.

<vx>, <vy>, <vz>

The components of the vector to be transformed.

Templ ates

114

Altair Engineering, Inc.

 

Using the Card Previewer Commands Card images are described by a template file block. To display the card image using the card previewer, specify the appropriate card previewer commands within a *beginmenu() /*endmenu()  block. You can use these commands to display entity data and edit solver-specific solver-spec ific attributes. Since you can use the card previewer to view and edit attributes on multiple entities, some data may not have a common value to display for the selected ent entities ities . When this occurs, a large X is drawn through the data display area. If the data is an editable field (attribute), select the field and enter a value that is common to all of the selected entities. If the entities do not share a common value, HyperMesh ignores any logic commands (*menuif() , *menuoption() , menuoptionenum()  etc.) dependent on entities sharing a common value.  Attributes default values va lues are common throughout th roughout the t he card previewer. A default value field has two states: State

Description

Default = ON

In this state, the field label color is yellow and dat a entry is not allowed.

Default = OVERRIDDEN

To o ov verride a default v va alue ffiield, p piick th the ye yellow fifield lla abel. The label text color changes to cyan and allows you to enter data in the field.

Card Previewer Error Messages The following list list describes the card previewer error messages and the corresponding solutions. Mess Me ssag age e

 <variable>  able>  Inva Invali lid d va vari riab able le <vari  in  in  *setvariable() command.

Meaning

The <variable>  specified in the *menusetvariable()  command was not between variable1 and variable20.

Solution

Change the invalid variable to a valid variable name.

Message

Att ttrribut ibute e id <id>    on entity does not match type in template.  on

Meaning

The attribute's type did not match the type specified for the attribute in the template.

Cause

The *defineattribute()  command in the template may have been modified, a different template with the same  *codename() was used to edit the entity, or an invalid entity was created by an input translator.

Solution

You must clear the attributes for the solver off of the entity to edit the card.

Mess Me ssag age e

Inva Invali lid d enti entity ty ty type pe <type  <type>  >   specified in *menuentitytype() .  specified

Altair Engineering, Inc.

115

Tem plate s

 

Meaning

 A *menuentitytype()  command with invalid type was present in the template file.

Solution

Change the *menentitytype()  command's parameter to be a valid entity name.

Message

 <type>  >  Too many <type   collectors used.  collectors

Meaning

 A maximum of 48 *menuentitytype()  commands for the same entity type can be used in a card image. You have exceeded this limit.

Solution

  *menuentitytype() commands for <type> to be less Reduce the number of  *menuentitytype() than 48.

Mess Me ssag age e

Co Coul uld d no nott fi find nd enti entity ty <id>   associated with attribute <attr  associated  <attribute ibute name>  .

Meaning

 An entity entit y attribute attribu te holds an id without an a n entity.

Cause

Entities may have been deleted or renumbered, or the *menuentitytype() command specifying the entity collected by this attribute was changed in the template file.

Solution

None. The value is set to 0.

Mess Me ssag age e

 <name>  >  No attrib attribute ute att attach ached ed to men menu u ite item m <name .

Meaning

 An internal interna l error has occurred occurr ed while parsing an a n expression. expression .

Solution

Contact HyperMesh support. The data and template file are required to further  investigate the problem.

Mess Me ssag age e

No attrib attribute ute attach attached ed to col collec lector tor ite item m <id>  .

Meaning

 An internal error has occurred when a collector was selected.

Solution

Contact HyperMesh support. The data and template file are required to further  investigate the problem.

Mess Me ssag age e

Co Coul uld d no nott fi find nd at attr trib ibut ute e na name med d <name  <name>  >    in in *menuoption() , skipping.

Meaning

  *menuoptionenum() command referenced <name> that  A *menuoption()  or  *menuoptionenum() does not have an *defineattribute()  command.

Solution

  *menuoptionenum() command to reference a Change the *menuoption()  or  *menuoptionenum() valid attribute name.

Mess Me ssag age e

 <enumerati eration>  on>  Co Coul uld d no nott fi find nd enum enumer erat atio ion n <enum   for *menuoptionenum() .  for

Meaning

*menuoptionenum()  command referenced an <enumeration>  that does not have an existing *enumeration() command.

Templ ates

116

Altair Engineering, Inc.

 

Solution

Mess Me ssag age e

Change the *menuoptionenum() command to reference a valid enumeration.

Enum Enumer erat atio ion n at attr trib ibut ute e <attr  <attribute ibute>  >   contains value <valu  contains  <value>  e>    beyond limit of   beyond  <maximum>.  <maxi mum>.

Meaning

<attribute>  holds a <value> > <maximum> .

Cause

Both *menuoptionenum()  and *menufield()  commands referencing <attribute>  may exist in the template file. If this is the case, the user can type in <value> > <maximum>. An input translator may have also created <attribute>  with the invalid <value>.

Solution

If this occurs in a HyperMesh-developed template, contact HyperMesh support with the error. User generated templates can ensure that the value is within a certain range by using *menuif()  and *menuattributeset()  comman  commands. ds. Here is an example of how to limit an attribute's value to between 1 and 5. *menuif([$ATTRIBUTE_NAME < 1]) *menuattributeset($ATTRIBUTE_NAME,1) *menuendif() *menuif([$ATTRIBUTE_NAME > 5]) *menuattributeset($ATTRIBUTE_NAME,5) *menuendif()

Mess Me ssag age e

 <attribute ibute>  >  Co Coul uld d not not fi find nd at attr trib ibut ute e named named <attr , skipping.

Meaning

 A *menufield() command referenced the attribute named <attribute>  for  which no *defineattribute()  command exists.

Solution

Change the *menufield()  command to reference a valid attribute name.

Mess Me ssag age e

Defaul Defaultt value value specifie specified d for al alway ways s on attrib attribute ute <attr  <attribute ibute>  >  .

Meaning

 A *menudefaultvalue()  command modifies <attribute>  that does not have a valid on/off value. The *menudefaultvalue()  command will be ignored.

Cause

The *menudefaultvalue()  command in the template may have been added after the template was used on the current database, a different template with the   <attribute> was created same *codename() was used to edit the entity, or  <attribute> with an invalid status by an input translator.

Mess Me ssag age e

Fail Failed ed to crea create ted d attr attrib ibut ute e <attr  <attribute ibute>  >  .

Meaning

 An internal error has occurred in the card editor.

Solution

Contact HyperMesh support. The data and template file are required to further  investigate the problem.

Altair Engineering, Inc.

117

Tem plate s

 

Mess Me ssag age e

 <attr ibute>  >  Ini Initia tiall value value ex expre pressi ssion on for <attribute  could not be evaluated.  could

Meaning

The expression specified in *menuinitialvalue()   returned an error code. The <attribute>  is created with the value 0 or a zero length string, depending on string.

Cause

This error should only occur if you using the card editor on multiple entities.

Solution

If you need the *menuinitialvalue()  command to be executed, abort the editing on the current set of entities and edit them one at a time.

Mess Me ssag age e

Init Initia iall va valu lue e for for <attr  <attribute ibute>  >    only valid for integer, real, or string.  only

Meaning

 A *menuinitialvalue()  command references an attribute that was not of type integer, real, or string.

Solution

Remove the *menuinitialvalue() command that references <attribute> .

Message

Attribute <attr  <attribute ibute>  >    has different entity type  <enti  has  <entity>  ( ty>  ) than template.

Meaning

 A *menuentitytype() command conflicts with the entity type stored on <attribute> .

Cause

The *menuentitytype() command modifying <attribute>  in the template may have been changed after the template was used on the current database, two or more *menufield() commands referencing <attribute>  with differing *menuentitytype()  commands exists in the template file, a different template with the same *codename()  was used to edit the entity, or  <attribute>   <attribute> was created with an invalid entity type by an input translator.

Solution

If a user-generated input translator is being used, make sure that that attribute's entity type created by the translator matches that of the template file. Also check for and remove multiple *menufield()/*menuentitytype()  commands referencing the same attribute in the block.

Mess Me ssag age e

 <attribute ibute>  >  Failed Failed to cre create ated d entity entity attrib attribute ute <attr .

Meaning

 An internal error has occurred in the card editor.

Solution

Contact HyperMesh support. The data and template file are required to further  investigate the problem.

Mess Me ssag age e

 <attr ibute>  >  Enumer Enumerate ated d and legal legal input input spe specif cified ied for <attribute , legal ignored.

Meaning

Both *menulegalvalue() and  *menuenum() commands modify the same *menufield()  command. The *menulegalvalue()  commands are ignored.

Solution

Remove either the  command or all of the *menuenum() *menulegalvalue() modifiers from the *menufield() in question.

Templ ates

118

Altair Engineering, Inc.

 

Mess Me ssag age e

 <attr ibute>  >  Enumer Enumerate ated d and res restri tricte cted d input input spe specif cified ied for <attribute , restricted ignored.

Meaning

Both *menurestrictedvalue()  and *menuenum()  commands modify the same *menufield()   command. The *menurestrictedvalue()  commands are ignored.

Solution

Remove either the *menuenum()  command or all *menurestrictedvalue() modifiers from the *menufield()  in question.

Mess Me ssag age e

Restri Restrict cted ed and legal legal inp input ut spe specif cified ied for  <attribute>  , restricted ignored.

Meaning

Both *menurestrictedvalue()  and *menulegalvalue() commands modify the same *menufield()  command. The *menurestrictedvalue() commands are ignored.

Solution

Remove either all *menulegalvalue()  commands or all *menurestrictedvalue()  modifiers from the *menufield()  in question.

Message

 

menulegalvalue unsupported for storage type of <attr  <attribute ibute>  >  .

Meaning

 A *menulegalvalue() command modifies a *menufield()  command that references an attribute that is not of type real, integer, or string.

Solution

Remove the *menulegalvalue()  modifier from the *menufield() command.

Mess Me ssag age e

Ill Illega egall unsign unsigned ed intege integerr val value ue return returned ed for <data>   <data >  .

Meaning

 An expression expre ssion or data member mem ber value could not n ot be displayed as an unsigned integer. The string ERROR  is displayed in red for this field. ”



Solution

Change the display type of this *menufield()  command to real or exponential.

Mess Me ssag age e

 <data >  Ill Illega egall intege integerr val value ue return returned ed for <data>  .

Meaning

 An expression or data member value could not be displayed as an integer. The string ERROR  is displayed in red for this field. “



Solution

Change the display type of this *menufield()  command to real or exponential.

Mess Me ssag age e

Ill Illega egall hexade hexadecim cimal al val value ue ret return urned ed for <data>   <data >  .

Meaning

 An expression expressio n or data member value could not be displayed as a s an hexadecimal number. The string ERROR  is displayed in red for this field. “



Solution

Change the display type of this *menufield()  command to real or exponential.

Mess Me ssag age e

No stri string ng valu value e retu return rned ed for for <data  <data>  >  .

Altair Engineering, Inc.

119

Tem plate s

 

 An expression or data member value could not be displayed as a string. The string ERROR  is displayed in red for this field.

Meaning



Change the display type of this *menufield() command to something other than string.

Solution

Message



 

beginrepeat - Expression <expr essio ession>  n>   could not be evaluated, skipping  could repeat block.

Meaning

<expression>  could not be evaluated for multiple entities.

Solution

Reduce set of entities to use card editor until <expression>  is resolvable.

Mess Me ssag age e

Illegal Illegal re repea peatt va value lue re retur turn n fo forr <expr  <expressio ession>  n>  .

Meaning

  *beginrepeat2d() command containing  A *beginrepeat() or  *beginrepeat2d() <expression>  returned a value too large or too small. The repeat block is skipped.

Solution

It is possible to get this error with valid data. Usually it is caused by a bad *menupointerset()  command.

Mess Me ssag age e

Illegal Illegal re repe peat at 2d va valu lue e retu return rn for  <expression>  .

Meaning

 A *beginrepeat()  or *beginrepeat2d()  command containing <expression>  returned a value too large or too small. The repeat block is skipped.

Solution

It is possible to get this error with valid data. Usually it is caused by a bad *menupointerset()  command.

Mess Me ssag age e

Inva Invali lid d po poin inte terr name name <poin  <pointer>  ter>    in in *menupointerset()  command, ignoring.

Meaning

The <pointer>  specified in the *menupointerset()  command was not between pointer1 and pointer20.

Solution

Change the invalid pointer to a valid pointer name.

Mess Me ssag age e

Inva Invali lid d coun counte terr name name <coun  <counter>  ter>    in in *menucounterset()  command, ignoring.

Meaning

The <counter>  specified in the *menucounterset()  command was not between counter1 and counter20.

Solution

Change the invalid counter to a valid counter name.

Mess Me ssag age e

Er Erro rorr ev eval alua uati ting ng data data for for <coun  <counter>  ter>  , setting to 0.

Meaning

The expression in a *menucounterset() command could not be evaluated for 

Templ ates

120

Altair Engineering, Inc.

 

this set of entities. Solution

Reduce the set of entities you are editing until the expression in *menucounterset()  command can be evaluated.

Mess Me ssag age e

Inva Invali lid d va vari riab able le name name <vari  <variable>  able>    in in *menuvariableset()  command, ignoring.

Meaning

The <variable>  specified in the *menuvariableset()  command was not between variable1 and variable20.

Solution

Change the t he inva invalid lid variable variable to a valid variable name.

Mess Me ssag age e

Erro Errorr eval evalua uati ting ng data data for for <vari  <variable>  able>  , setting to 0.

Meaning

*menuvariableset() command could not be evaluated for  The expression in a *menuvariableset() this set of entities.

Solution

 Abort editing ed iting the current set of entities, reduce the set of entities ent ities you are editing edit ing until the expression in *menuvariableset()  command is evaluated.

Mess Me ssag age e

Un Unab able le to fi find nd at attr trib ibut ute e <attr  <attribute ibute>  >   in  in *menuattributeset()  command.

Meaning

 A *menuattributeset()  command references an illegal attribute name.

Solution

Change the attribute referenced by the  *menuattributeset() command.

Mess Me ssag age e

Co Coul uld d no nott fi find nd se sele lect cted ed it item em <id>  .

Meaning

 An internal error has occurred in the card editor.

Solution

Contact HyperMesh support. The current model and template file are required to further investigate the problem.

Mess Me ssag age e

Could Could not fi find nd tag attrib attribute ute <attr  <attribute ibute>  >  .

Meaning

 A *cardmenuitem()  command references an attribute that has no *defineattribute()  command.

Solution

Change <attribute>  so that it references a valid attribute, or add a *defineattribute()  command for <attribute >.

Message

 

menuenum   references undefined enumeration <name  references  <name>  >  .

Meaning

 An enumeration enumeratio n called <name> was not previously defined in the template file.

Solution

Change <name> to match a valid enumeration name.

Altair Engineering, Inc.

121

Tem plate s

 

Mess Me ssag age e

Ou Outp tput ut comm comman and d reac reache hed d be befo fore re *beginmenu()  for this entity.

Meaning

The *output()  command for this entity block, signifying the end of the block, was reached before a *beginmenu()  command. Either the *beginmenu() does not exist in this entity block, or it was placed after the *output()  command.

Solution

 Add or move the *beginmenu()/*endmenu()  section before the *format() command for this block.

Mess Me ssag age e

 <attribute ibute>  >  2d arra array y attr attrib ibut ute e <attr  found outside of *repeat2d block().  found

Meaning

 Attributes of type arrayofreal2d arrayofreal 2d and arrayofinteger2d arrayofinte ger2d can only on ly be referenced in a *beginrepeat2d()/*endrepeat2d()  section.

Solution

Move the reference to <attribute> into a *beginrepeat2d()/ *endrepeat2d()  section.

Mess Me ssag age e

2d arra array y attr attrib ibut ute e <attr  <attribute ibute>  >   not resized properly (out of bounds).  not

Meaning

 An internal error has occurred in i n the card editor edito r causing the array attribute to have the wrong size.

Solution

Contact HyperMesh support. The data and template file are required to further  investigate the problem.

Mess Me ssag age e

Un Unkn know own n attr attrib ibut ute e type type <type number>  numbe r>   found in attribute table.  found

Meaning

 An internal error has occurred in HyperMesh.

Solution

Contact HyperMesh support. The data and template file are required to further  investigate the problem.

Message

 

*endmenu() command not reached for this entity.

Meaning

The end of the template file was reached before the *endmenu()  command.

Solution

 Add a *endmenu()  command to match the last *beginmenu()  command in template file.

Message

 

*menuif() missing menue  menuelse() lse()/menu /menuendif endif() ()  command, aborting.

Meaning

The end of the template file was reached before a *menuelse()  or  *menuendif()  command for a *menuif()  statement.

Solution

 Add a *menuendif()  command to match the *menuif()  co  command. mmand. Since the *menuif()  commands can be nested, it may not be obvious which *menuif()  is   *menuendif() command. missing a *menuelse()  or  *menuendif()

Message

menuendif() command not found to terminate

 

Templ ates

122

menuelse()  block.

Altair Engineering, Inc.

 

Meaning

The end of the template file was reached before a *menuendif()  command was found to terminate a *menuif()  and *menuelse() statement.

Solution

 Add a *menuendif()  command to match the *menuif()/*menuelse() commands. Since the *menuif() commands can be nested, it may not be obvious which *menuif()/*menuelse()  block is missing a *menuendif() command.

Messag Mes sage e

Menu does not own poin pointer ter returned returned by st strr rrgy gy..

Meaning

 An internal error has occurred in the card editor.

Solution

Contact HyperMesh support. The data and template file are required to further  investigate the problem.

Mess Me ssag age e

Op Opti tion on attr attrib ibut ute e <attr  <attribute ibute>  >   not of type integer.  not

Meaning

<attribute>  referenced in a *menuoption()  or  *menuoptionenum()   *menuoptionenum() command was not an integer attribute.

Solution

Changed the *menuoption()  or *menuoptionenum()  command so that it references an integer attribute.

Message

Negat atiive optioncount  reached in case search block, aborting.

Meaning

Too many  *menuoptionend() commands exist in this block. There should be one *menuoptionend()  command per *menuoption()  o  or  r  *menuoptionenum()  command.

Solution

Locate and remove the extra *menuoptionend()  commands.

Mess Me ssag age e

Inva Invali lid d attr attrib ibut ute e <attr  <attribute ibute>  >   referenced in *beginrepeat()  command.  referenced

Meaning

The name <attribute>  does not match a name in a *defineattribute() command.

Solution

Change <attribute>  to match the name of a valid attribute.

Message

 

*beginrepeat() attribute  <attribute>    is not type integer.  is

Meaning

 Attributes specified specif ied in the *beginrepeat()  command must be of type integer.

Solution

Change the *beginrepeat() command to reference an integer attribute.

Message

No *endrepeat()  for zero length array.

Meaning

The end of the template file was reached before a *endrepeat() command was found to match a *beginrepeat() .

Altair Engineering, Inc.

123

Tem plate s

 

 Add a *endrepeat()  command to match the *beginrepeat()  command.

Solution

Message

 

*endrepeat() found without matching *beginrepeat() .

Meaning

 An extra *endrepeat()  command exists in this block. There should be one *endrepeat()  command per *beginrepeat()  command.

Solution

Locate and remove the extra *endrepeat() command.

Message

 

*beginrepeat2d() found outside of *beingrepeat()  block.

Meaning

 All  *beginrepeat2d() commands must occur within a *beginrepeat()/*endrepeat()  block.

Solution

Move the *beginrepeat2d()/*endrepeat2d()  block so that it occurs in a *beginrepeat()/*endrepeat()  block.

Mess Me ssag age e

Inva Invali lid d at attr trib ibut ute e <attr ibute ibute>  >   referenced in *beginrepeat2d()  command.  referenced

Meaning

The name <attribute>  does not match a name in a *defineattribute() command.

Solution

Change <attribute>  to match the name of a valid attribute.

Message

 

*beginrepeat2d() attribute <attr  <attribute ibute>  >   is not type integer.  is

Meaning

 Attributes specified in the *beginrepeat2d() command must be of type integer.

Solution

Change the *beginrepeat2d()  command to reference an integer attribute.

Message

No *endrepeat()  for zero length array.

Meaning

The end of the template file was reached before a *endrepeat()  command was found to match a *beginrepeat() .

Solution

 Add an*endrepeat()  command to match the *beginrepeat()  command.

Message

 

*endrepeat2d() found without matching *beginrepeat2d() .

Meaning

 An extra *endrepeat2d()  command exists in this block. There should be one *endrepeat2d()  command per  *beginrepeat2d()   *beginrepeat2d() command.

Solution

Locate and remove the extra *endrepeat2d()  command.

Templ ates

124

Altair Engineering, Inc.

 

Card Previewer Commands *begincardmenu() Indicates the beginning of the control cards list. Syntax

*begincardmenu()

Comments

Only *cardmenuitem()  commands are valid between the *begincardmenu() *begincardm enu() and *endcardmenu()  commands.

*beginmenu() Indicates the beginning of the description used for the card previewer. Syntax

*beginmenu()

Comments

Must be accompanied by the *endmenu()  command.

*beginrepeat() Repeats execution of a block of code a specified number of times. Syntax

*beginrepeat(<expression>)

Argument

<expression>

Example

*beginrepeat($ARRAY_LENGTH)

 A relational expression or an attribute. attribute .

 *repeatwrap(80)  *repeatcounter(1)   *menufield(Array,integer,$ARRAY_ATTRIBUTE,10) *endrepeat() Comments

The *repeatwrap()  command can be used to automatically begin new lines. If used, it must be the first command following the *beginrepeat() . The *repeatcounter()  command can be used to store the current repeat value in a counter. If no *repeatcounter()  command is specified, the repeat value is not stored in any counter.  All *menufield()  commands that reference attributes can only reference the following types in a *beginrepeat()  block: arrayofinteger , arrayofreal , arrayofstring .

Altair Engineering, Inc.

125

Tem plate s

 

The *beginrepeat()  command must be accompanied by a *endrepeat() command.

*beginrepeat2d() Repeats execution of a block of code a specified number of times. Syntax

*beginrepeat2d(<expression>)

Argument

<expression>

Example

*beginrepeat($ARRAY_LENGTH)

Either a relational expression or an attribute.

*repeatwrap(80) *repeatcounter(1) *menufield(Array,integer,$ARRAY_ATTRIBUTE,10)   *beginrepeat2d($ARRAY2D_LENGTH)  *repeatcounter(2)   *menufield(Array2d,integer,$ARRAY2D_ATTRIBUTE,10)  *endrepeat2d() *endrepeat() Comments

The *beginrepeat2d()  command must always occur with a *beginrepeat() /*endrepeat() block. The *repeatwrap()  command can be used to automatically begin new lines. If used, it must be the first command following the *beginrepeat2d() . If a *repeatwrap()  command is specified following a *beginrepeat() command, that same value is used for the *beginrepeat2d()  block. The *repeatcounter()  command can be used to store the current repeat value in a counter. If no *repeatcounter()  command is specified, the repeat value is not stored in any counter.  All *menufield()  commands that reference attributes can only reference the following types in a *beginrepeat2d()  block: arrayofinteger2d  or  arrayofreal2d . The *beginrepeat2d()  command must be accompanied by a *endrepeat2d()  command.

Templ ates

126

Altair Engineering, Inc.

 

*endcardmenu() Indicates the end of the control cards list. Syntax

*endcardmenu()

*endmenu() Indicates the ending of the description used for the card previewer. Syntax

*endmenu()

Comments

Must be accompanied by the *beginmenu()  command.

*endrepeat() Terminates the code block to be executed by *beginrepeat(). Syntax

*endrepeat()

*endrepeat2d() Terminates the code block to be executed by *beginrepeat2d() . Syntax

*endrepeat2d()

*enumeration() Creates an enumeration. Syntax

*elementareacalculation(<enum name>,<str1>,<str2>,...)

Arguments

<enum name>

The name of the enumeration.

<str1>,<str2>

The members of the enumeration.

Altair Engineering, Inc.

127

Tem plate s

 

*globaldefaults() Used to specify that each real, integer, and string attribute is modified as per the *menudefaultvalue(). Syntax

*globaldefaults()

Comments

 Any default value not overridden ove rridden by a *menudefaultvalue()  fills the field with the number of blanks equal to the width parameter in the *menufield()  command when the field has the status off. *menudefaultvalue()  can still be used to specify a different default value for individual fields when needed.

*menuattributeset() Sets the value of attribute. Syntax

*menuattributeset(<attribute>,<expression>)

Arguments

<attribute>

The name of the attribute to hold the value.

<expression>

 An expression defining the value.

Comments

*menuattributeset()  can only be used for integer, real, entity, or string attributes.

*menucase() The *menucase()  command specifies a block of card image template commands that are executed when an attribute has the value matching the *menucase()  command. Syntax

*menucase(<value>)

Argument

<value>

Comments

*menucase()  commands must occur in consecutive, incremental order.

Must be an integer value.

ion() ) command. The values 0 and 1 are the only legal values for a *menuopt ion(

The values 1 to N are legal for a *menuoptionenum()  command where N is the number of values in the enumeration referenced by *menuoptionenum() .

Templ ates

128

Altair Engineering, Inc.

 

*menucounterset() Sets the value of the local counter. Syntax

*menucounterset(<counter>,<value>)

Arguments

<counter>

Value from counter1 to counter20 indicating which of the 20 possible counters should be set to the <value> parameter.

<value>

Value of the counter.

Comments

Unlike the *counterset()  command that sets a global value for the entire output section of the template, the *menucounterset()  command is value only for the local scope of an entity as specified by the *beginmenu()  and *endmenu()  commands.

*menudefaultvalue() Modifies an attribute field so that it has an on/off status. Syntax

*menudefaultvalue(<string>)

Argument

<string>

Example

*menufield("MISC",integer,$INT_ATTRIBUTE,10)

The text that is displayed when the status of the attribute is off.

*menudefaultvalue("XXXXXXXXXX") *menufield("MISC 2",real,$REAL_ATTRIBUTE,8) *menudefaultvalue("no value") Comments

<string>  should be equal in length to the <width> in the *menufield() command.

This command must follow a *menufield()  command that references an integer, real, or string attribute. If multiple entities are being displayed in the card previewer and the status of any attribute on different entities conflict, the title is displayed in red and the value for this attribute is displayed as a large X. The title must be selected to make all entities have the same status for this attribute, which is off. The title for the field can be selected to change the on/off  status for the attribute. If the attribute is off, the title is displayed in yellow and the string specified in the *menudefaultvalue()  command is displayed. If the attribute is on, the title is displayed in cyan and an input field is displayed. When the attribute is on, you can select the input field and type in a value for this *menufield() .  An attribute's attribut e's status can be accessed in i n the output section sect ion of the template templat e file

Altair Engineering, Inc.

129

Tem plate s

 

using the @defaultstatus()  command.

*menuelse() Used to define the false block of a *menuif()  statement. Syntax

*menuelse()

*menuendif() Used to define the end of an *menuif()  block. Syntax

*menuendif()

*menuentitytype() Modifies an attribute field so that the selection must be an ID of an existing entity in the HyperMesh database. Syntax

*menuentitytype(<entity>)

Argument

<entity>

Comments

<entity> must be a valid HyperMesh entity type.

The *menuentitytype() command cannot modify a *menufield()  along with a *menuenum(),  a *menurestrictedvalue()  , a *menulegalvalue()  , or a *menudefaultvalue()  command. This command follow a *menufield()  command that references an entity attribute. This changes the appearance of the field in the card previewer to a collector of the specified type.

Templ ates

130

Altair Engineering, Inc.

 

*menuenum() Modifies an attribute field so that its value is displayed as and restricted to an enumeration's values. Syntax

*menuenum(<enumeration>)

Argument

<enumeration>

Comments

The *menuenum()  command can only be used to modify integer attributes.

The name of a previously defined enumeration. Instead of an input field, the field appears as a button. When selected, the enumeration's values is displayed in a pop-up. After selected, the position of the value in the enumeration is stored in the attribute (1 to N).

The *menuenum()  command cannot modify a *menufield()  along with a *menuentitytype()  , a *menurestrictedvalue()  , a *menulegalvalue()  , or a *menudefaultvalue()  command.

*menufield() Places a formatted value from the database into the card image. Syntax

*menufield(<description>,<type>,<data name>,<width>)

Arguments

<description>

 A string that is displayed along with the value. The length of the string should not be longer  than <width>.

<type>

Either integer, unsigned, real, exponential, string, or hexadecimal.

<data name>

The name of the data to be accessed.

<width>

The width of the formatted field. In the case of  real, HyperMesh uses scientific notation in order  to make the value displayed fit in the specified number of characters.

Altair Engineering, Inc.

131

Tem plate s

 

*menuif() Used to conditionally execute branches in the card image. Syntax

*menuif(<expression>)

Argument

<expression>

Comment

Requires an *menuendif()  command.

 A relational expression.

The expression expression is required to be enclosed in square brackets. The following operators are available: == , =

equal

!=

not equal

<=

less than or equal

<

less than

>=

greater than or equal

>

greater than

If multiple entities are being displayed and an *menuif()  returns conflicting results for the <expression>, the entire *menuif() / *menuelse()  / *menuendif()  block is skipped.

*menuinitialvalue() Sets the initial value of an attribute if the attribute does not currently exist on the entity. Syntax

*menuinitialvalue(<value>)

Argument

<value>

Comments

May be combined with *menulegalvalue()  , *menuenum() or  *menurestrictedvalue()  modifiers. If the attribute already exists on the entity, its value is not changed by the command. This command must follow a *menufield()  command that references an integer, real, or string attribute.

Can be an expression for real or integer attributes, or a string for string attributes

Templ ates

132

Altair Engineering, Inc.

 

*menulegalvalue() Modifies an attribute field so that a selection must be made from a list. Syntax

*menulegalvalue(<string>)

Argument

<string>

Example

Below is an example of the *menulegalvalue()  command modifying each of  tthe three attribute types:

The string that is added to the list you can select from for this *menufield(). *menufi eld(). The length of <string> in characters should be less than or equal to the <width> specified in the *menufield() command.

*menufield("INT FIELD",integer,$INT_ATTRIBUTE,10) *menulegalvalue(1) *menulegalvalue(2) *menulegalvalue(4) *menulegalvalue(8) *menufield("REAL FIELD",real,$REAL_ATTRIBUTE,10) *menulegalvalue(1.1) *menulegalvalue(1.2) *menulegalvalue(3.0) *menufield("STRING FIELD",string,$STRING_ATTRIBUTE,10) *menulegalvalue("String 1") *menulegalvalue("String 2") *menulegalvalue("Last String")

Comments

If the *menufield()  attribute is of type integer, the <string>  specified in the *menulegalvalue()  command is converted to an integer and stored in the attribute. If the *menufield()  attribute is of type real, the <string>  specified in the *menulegalvalue()  command is converted to a real number and stored in the attribute. If the *menufield() attribute is of type string, the <string>  specified in the *menulegalvalue()  command is copied to the attribute. The *menulegalvalue()  cannot modify a *menufield()  along with a *menuenum()  command or a *menurestrictedvalue() command. Multiple *menulegalvalue()  commands may be applied to the same *menufield()  command.

Altair Engineering, Inc.

133

Tem plate s

 

*menulineend() Ends the current line in the card image. Syntax

*menulineend()

Comments

Card images always require at least 1 *menulineend() command. The next command that that displays a field d displays isplays it in column 1 on the next line.

*menuoption() Specifies that the value of an attribute can only be 0 or 1. Syntax

*menuoption(<attribute>)

Argument

<attribute>

Example

*menuoptionenum($Option_Attribute)

The name of the integer attribute that holds the value. The value stored in <attribute>  is either  0 (off) or 1 (on).

*menucase(0) *menustring("Option is off") *menucase(1) *menustring("Option is on") *menuoptionend() Comments

You must have a *menucase()  for both values, 0 and 1. All of the commands between the *menucase()  statement that is equal to the value stored in <attribute>  and the next *menucase()  or *menuoptionend()  statement are executed. The attribute's value is displayed in the options (bottom) portion of the menu as a diamond toggle.

*menuoptionend()   *menuoptionenum() command. Terminates a *menuoption()  or  *menuoptionenum() Syntax

*menuoptionend()

Templ ates

134

Altair Engineering, Inc.

 

*menuoptionenum() Specifies that the value of an attribute is defined by a previously defined *enumeration() command. Syntax

*menuoptionenum(<attribute>,<enumeration>) Arguments

Example

<attribute>

The name of the integer attribute that holds the value.

<enumeration>

The name of a previously defined enumeration. The value stored in <attribute>  is converted to an integer  based on the selection's place in the enumeration and have a value from one to N (where N is the number of items in the enumeration).

*enumeration(Numbers,One,Two,Three) *menuoptionenum($Numbers_Attribute,Numbers) *menucase(1) *menustring("One (1)") *menucase(2) *menustring("Two (2)") *menucase(3) *menustring("Three (3)") *menuoptionend()

Comments

For each value specified in the *enumeration()  statement that <enumeration>  references, you must have a *menucase()  statement. All of  the commands between the *menucase()  statement that is equal to the value stored in <attribute>  and the next *menucase()  or *menuoptionend() statement are executed.

The attribute's value is displayed in the options (bottom) portion of the menu as a selector. You can choose from the values in the enumeration.

Altair Engineering, Inc.

135

Tem plate s

 

*menupointerset() Sets the initial value of a pointer. Syntax

*menupointerset(<pointer number>,<pointer>,<value>)

Arguments

<pointer number>

 A value from pointer1 to pointer20 indicating which of the 20 possible pointers should be set to the <value> paramater.

<pointer>

The pointer to the data object to be accessed. Only certain data types may user pointers. These are described in the template commands where they are valid.

<value>

The value of the counter.

Example

For example, to display all the dependent node IDs on a rigid link element, the following commands could be used while in a rigid link card description: *beginrepeat(dependentnodesmax)   *repeatcounter(1)   *menupointerset(pointer1,dep *menupointerset(pointer1,dependentnodes,[counter1 endentnodes,[counter1 - 1])   *menufield(dnod,integer,pointer1.pointervalue,8) *endrepeat()

Comments

Unlike the *pointerset() command that sets a global value for the entire output section of the template, the *menupointerset()  command is value only for the local scope of an entity as specified by the  *beginmenu() an  and d *endmenu()  commands

*menurestrictedvalue() Modifies an attribute field so that it alerts you when a value is outside of a specified range. Syntax

*menurestrictedvalue(<restriction>,<value>)

Arguments

<restriction>

Must be one of the following: >, >=, <=, or <.

<value>

The value that is used for comparison with value entered by you.

Example

The following is an example on how to restrict a real attribute to values > 0.0 and

<= 1.0:

Templ ates

136

Altair Engineering, Inc.

 

*menufield("MISC",real,$REAL_ATTRIBUTE,10) *menurestrictedvalue(>,0.0) *menurestrictedvalue(<=,1.0) Comments

*menurestrictedvalue()  cannot modify a *menufield()  along with a *menuenum()  or a *menulegalvalue()  command.

This command must follow a *menufield()  command that references an integer or real attribute. If you specify a value outside of the range specified by the *menurestrictedvalue()  value, an error message is displayed and the value is displayed in red. Multiple *menurestrictedvalue()  commands may be applied to the same *menufield()  command, but if to restricted the same boundary, only the last one is used.

*menustring() Displays a string in the card image. Syntax

*menustring(<string>)

Argument

<string>

 A string of characters. If the string s tring contains a space, an asterisk, or a comma, the string must be enclosed by double quotes.

*menuvariableset() Sets a variable to a specific value. Syntax

*menuvariableset(<variable>,<value>)

Arguments

<variable>

 A  value from variable1 to variable20 indicating the parameter.

<value>

The value of the variable.

Example

Variables can be used to hold real or integer values. For example, to add the value of variable5 to the current value of variable1, the following command could be used: *menuvariableset(variable1,[variable1+variable5])

Comments

Unlike the *variableset() command that sets a global value for the entire output section of the template, the *menuvariableset()  command is value only for the local scope of an entity as specified by the *beginmenu()  and *endmenu()  commands.

Altair Engineering, Inc.

137

Tem plate s

 

*nomenu() Specifies that the card image definition is in the following block. Syntax

*nomenu()

Comments

The *nomenu()  command must be the first command to follow an entity block header.

*repeatcounter() Specifies a counter to store the current repeat value for a *beginrepeat()  or  *beginrepeat2d()  command. Syntax

*repeatcounter(<counter number>)

Argument

<counter number>

 An integer value between 1 and 20 indicating which of the 20 possible counters should be hold the current repeat value.

*repeatwrap() Sets the right margin that no field goes beyond in a *beginrepeat() /*endrepeat()  block. Syntax

*repeatwrap(<column>)

Argument

<column>

Comments

If used, the *repeatwrap()  command must be the first command to follow a *beginrepeat()  or *beginrepeat2d()  command.

The right hand margin beyond which no field is displayed. If a field's length would place it beyond <column>, it is placed in column 1 of the next line.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close