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