Subroutine Type |
Utility/Data Access |
||||||||||
Definition |
MODIFY is a utility subroutine that can execute an ADAMS/Solver command from a CONSUB. This function is provided to maintain compatibility between user subroutines already written for ADAMS and MotionSolve. If you are writing CONSUBs for MotionSolve, it may be easier to use MODSET instead. MODSET is more general. Any attribute in the XML file may be changed. |
||||||||||
Calling Syntax |
Fortran CALL MODIFY (command, status)
C/C++: c_modify (char* command, int* status);
Python: status = py_modify(command)
MATLAB status = m_modify(command) |
||||||||||
Input |
command |
character array |
Any valid ADAMS/Solver command stored in a character array. |
||||||||
Output |
status |
integer |
A flag that return the status of the call to MODIFY. ISTAT can have the following values: 0 = Success Any other value indicates failure. |
||||||||
Comments |
|
||||||||||
Example |
def consub (par, npar):
#Purpose of the CONSUB #This CONSUB performs 2 simulations: # 1. gravity = 1g (surface of Earth) # 2. gravity = 0.38g (surface of Mars)
# Behavior on Earth istat = py_datout() status = py_analys (“TRANSIENT”, "Simulation on Earth", 0.0, 1.0, 1)
# Behavior on Mars command = "ACCGRAV/IGRAV=0, JGRAV=0, KGRAV=-3.72742" istat = py_modify (command) istat = py_datout() status = py_analys (“TRANSIENT”, "Simulation on Mars", 1.0, 2.0, 1)
return status |
See Also: