MDL Variables, Implicit Entities, and Templex
MDL variables, implicit entities, and Templex statements that can be used while creating an entity or expressions in MDL models.
MDL Variables
- ContainsWizardSelections
- Provides the ability to define topology based on whether the current
model was constructed through the assembly wizard or by another means.
- Syntax
- ContainsWizardSelections
- Example
-
if(ContainsWizardSelections == "No") *Form(FRM_ADAMS_equil, "Equlibrium parameters", frmdef_ADAMS_equil, DS_ADAMS_equil) *endif()
- Comments
- Solver parameters are often set directly within the MDL library through tasks. However, models constructed interactively require solver parameters as well. This statement can be used to enable topology such as solver parameter datasets to be created based on the method of model construction.
- pi or PI
- Converts to the string "3.14159".
- SolverCR
- Creates a carriage return in the solver input deck at the point where SolverCR is located in an expression.
Implicit Entities
- B_Ground
- Implicit body.
- DS_Gravity
- Contains the values for the gravity acceleration vector.
- Syntax
-
- DS_Gravity.igrav.value,
- DS_Gravity.jgrav.value,
- DS_Gravity.kgrav.value
- Example
-
SetPoint( pt_0, 1.0, 2.0, DS_Gravity.kgrav.value )
- Comments
- Gravity is stored in this implicit dataset and can be accessed via the function builder. It is automatically written to the solver input file. The default value for kgrav is 9810 mm.
- DS_Units
- Global_Frame
- Implicit marker
- Solver_File_basename
- Provides access to the string that MotionView will use for the solver input file.
- Syntax
-
- Solver_File_basename.path,
- Solver_File_basename.value
- Example
-
*DefineTemplate( def_tmplt_0 ) { AbsToRelative( Solver_File_basename.path, Solver_File_basename.value + ".adm" ) } *EndDefine()
- Comment
- MDL CommandSets allows you to write Templex templates to the solver command file. When using the *Write CommandSet statement, the name of the solver input file must be passed directly into the command file. This can be accomplished using the syntax in the example above.
- V_GlobalX
- Implicit vector.
- V_GlobalY
- Implicit vector.
Templex
Templex is a general purpose text and numerical processor available in HyperWorks that is used across different products such as MotionView, HyperGraph, and HyperMesh.
Templex contains several standard mathematical functions and operators that can be used in MotionView as part of an expression.
*SetPoint (p_0, 25*sin(20d), 25*cos(20d),0) // The X and Y data of the point entity uses the
sin & cos function respectively.
Refer to the Templex Reference for list of available functions and operators.