Subroutine Type |
General model data access utility subroutine. |
|||||||||||
Definition |
The MODSET subroutine accesses and modifies the model data as specified in the MotionSolve XML input file. |
|||||||||||
Use |
It may be called from all user-written subroutines. |
|||||||||||
Calling Syntax |
FortranMODSET (element, id, attribute, input, info)
Cc_modset (element, id, attribute, input, info)
Pythoninfo = py_modset (element, id, attribute, input) MATLABinfo = m_modset (element, id, attribute, input) |
|||||||||||
Input Arguments |
[string] ELEMENT |
The name of the XML element. |
||||||||||
[integer] ID |
The identifier of the element. |
|||||||||||
[string] ATTRIBUTE |
The name of the attribute associated with the XML element. |
|||||||||||
[string] INPUT |
The value of the attribute, casted as character string. |
|||||||||||
Output Values |
[integer] INFO |
The information about the call status or return value type. A negative value indicates failure in modifying the model data.
|
||||||||||
Comments |
|
|||||||||||
Examples |
To modify the attribute expr of the joint motion with id=303002 in the XML file to 2D+10D*sin(72D*TIME-11.537D): <Motion_Joint id = "303002" type = "EXPRESSION" val_type = "D" expr = "0." joint_id = "303003" joint_type = "R" ic_disp = "0." ic_vel = "0." /> From a Fortran user subroutine, you may call: CALL MODSET('Motion_Joint ', 303002,'expr', '2D+10D*sin(72D*TIME-11.537D)',INFO)
If you want to modify the same attribute again to 20D+sin(72D*TIME-11.537D), you may call: CALL MODSET('Motion_Joint ', 303002,'expr', '20D+sin(72D*TIME-11.537D)',INFO)
Or, you may optionally use:CALL SET_ATTRIBUTE('20D+sin(72D*TIME-11.537D)',INFO)from a FORTRAN user subroutine. |