GETIDLIST

Utility/Data Access SubroutineThe GETIDLIST utility subroutine returns the IDs of model entities of a particular type.

Definition

The GETIDLIST is a function-style subroutine which can be used in a user defined subroutine to query MotionSolve for the IDs of all elements of a particular type defined in the input deck. The valid types of model elements are listed in the table above. GETIDLIST can be called in any user subroutine.

Format

Fortran Calling Syntax
CALL GETIDLIST (TYPE, IDARY, ARYLEN, ERRFLG)
C/C++ Calling Syntax
c_getidlist(type, idary, arylen, errflg)
Python Calling Syntax
[idary, errflg] = py_getidlist(type, arylen)
MATLAB Calling Syntax
[idary, errflg] = m_getidlist(type, arylen)

Attributes

Type
A string that specifies the name of the model entity. Valid expressions include:
TYPE
A string that specifies the name of the model entity. Valid expressions include:
Type (String)
Description
PART
Returns the IDs of rigid bodies. For example, Body_Rigid entities in the model.
POINT_MASS
Returns the IDs of point masses. For example, Body_Point entities in the model.
FLEX_BODY
Returns the IDs of flexible bodies. For example, Body_Flexible entities in the model.
VFORCE
Returns the IDs of vector forces. For example, Force_Vector_OneBody and Force_Vector_TwoBody entities of type "ForceOnly" in the model.
VTORQUE
Returns the IDs of vector torques. For example, Force_Vector_OneBody and Force_Vector_TwoBody entities of type "TorqueOnly" in the model.
GFORCE
Returns the IDs of general forces. For example, Force_Vector_OneBody and Force_Vector_TwoBody entities of type "ForceAndTorque" in the model.
YFORCE
Returns the IDs of control forces. For example, Force_StateEqn entities in the model.
SFORCE
Returns the IDs of scalar forces. For example, Force_Scalar_TwoBody entities in the model.
REQUEST
Returns the IDs of output requests. For example, Post_Request entities in the model.
PLANT_INPUT
Returns the IDs of plant inputs. For example, Control_PlantInput entities in the model.
PLANT_OUTPUT
Returns the IDs of plant outputs. For example, Control_PlantOutput entities in the model.
ARYLEN
An integer that specifies the size of IDARY. This value can be obtained by calling the GETNUMID utility sub-routine prior to calling GETIDLIST. Please see GETNUMID for more information on obtaining a valid value for ARYLEN.

Output

IDARY
An integer array that contains the IDs of the model entities specified by TYPE in the MotionSolve model.
ERRFLG
An integer flag that specifies whether the call to GETIDLIST was successful or not.
0
Success
-3
Failure. To avoid this error, make sure that the size of IDARY is sufficient to hold the IDs of all the elements of the type requested. A valid size for IDARY can be obtained by calling the function GETNUMID prior to calling GETIDLIST. Please see GETNUMID. Also, make sure that the IDs are requested for a model element type that is supported. Supported element types are listed in the table above.

Example

Please see TUNSUB for a GETIDLIST usage example.