GETNUMID

Utility/Data Access SubroutineThe GETNUMID utility subroutine returns the total number of model entities of a particular type.

Definition

The GETNUMID is a function style subroutine which can be used in a user-defined subroutine to query MotionSolve for the number of model entities of a particular type. The valid types are listed in the table above. GETNUMID can be called in any user subroutine.

Format

Fortran Calling Syntax
CALL GETNUMID (TYPE, NUMID)
C/C++ Calling Syntax
c_getnumid(type, numid)
Python Calling Syntax
[numid] = py_getnumid(type)
MATLAB Calling Syntax
[numid] = m_getnumid(type)

Attributes

TYPE
String
Specifies the name of the model entity. Valid expressions include:
Type (String)
Description
PART
Returns the number of rigid bodies. For example, Body_Rigid entities in the model.
POINT_MASS
Returns the number of point masses. For example, Body_Point entities in the model.
FLEX_BODY
Returns the number of flexible bodies. For example, Body_Flexible entities in the model.
VFORCE
Returns the number of vector forces. For example, Force_Vector_OneBody and Force_Vector_TwoBody entities of type "ForceOnly" in the model.
VTORQUE
Returns the number of vector torques. For example, Force_Vector_OneBody and Force_Vector_TwoBody entities of type "TorqueOnly" in the model.
GFORCE
Returns the number of general forces. For example, Force_Vector_OneBody and Force_Vector_TwoBody entities of type "ForceAndTorque" in the model.
YFORCE
Returns the number of control forces. For example, Force_StateEqn entities in the model.
SFORCE
Returns the number of scalar forces. For example, Force_Scalar_TwoBody entities in the model.
REQUEST
Returns the number of output requests. For example, Post_Request entities in the model.
PLANT_INPUT
Returns the number of plant inputs. For example, Control_PlantInput entities in the model.
PLANT_OUTPUT
Returns the number of plant outputs. For example, Control_PlantOutput entities in the model.

Output

NUMID
Integer
Specifies the number of model entities specified by TYPE in the MotionSolve model.

Example

Please see TUNSUB for a GETNUMID usage example.