Mechanical ACT Custom Load for Macro Encapsulation: define step

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
100 Answers 500 Comments 250 Likes First Anniversary
✭✭✭✭

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?

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭

    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.