HyperWorks Solvers

GETNUMID

GETNUMID

Previous topic Next topic No expanding text in this topic  

GETNUMID

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Subroutine Type

Utility/Data Access

Definition

The GETNUMID utility subroutine returns the total number of model entities of a particular type.

Calling Syntax

Fortran

CALL GETNUMID (TYPE, NUMID)

 

C

c_getnumid(type, numid)

 

Python

[numid] = py_getnumid(type)

 

Matlab

[numid] = m_getnumid(type)

Input Arguments

TYPE

A string that 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 Values

NUMID

An integer that specifies the number of model entities specified by TYPE in the MotionSolve model.

Complete 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.

Example

Please see TUNSUB for a GETNUMID usage example.

See Also:

Data Access Subroutines