I'm creating a custom load object through Mechanical ACT that encapsulates some APDL macro. This writes the APDL code to the ds.dat. How can I define at which step of a multistep analysis this macro gets written?
The callback that inserts the APDL commands into the input deck should have an argument called SolverData. This argument contains the step number. You can do: if SolverData.CurrentStep==MyStep: stream.Writeline(allLines) # where allLines is your APDL macro.