Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

How to use parameter in apdl MWRITE format line to write array of varying size?

    • massey95
      Subscriber
      *MWRITE,xxarray,xx_results,txt
      
      (34(F11.9, X))
      

      The above code works providing the xxarray has 34 columns. However the formatting line stops working if I use a variable instead.

      ((par_total_sets)(F11.9, X)) !doesn't work
      

      How can I write result files that vary in size?


      Many Thanks!

    • massey95
      Subscriber
      Paulsar on reddit answered this issue. The below code works well for now.

      *cfopen, inputCommands,txt
      *vwrite,'*MWRITE,xxarray,xx_results,txt'
      %C
      *vwrite,'(',par_total_sets
      %C%d(F11.9, X))
      *cfclos
      /input,inputCommands,txt
      /del,inputCommands,txt
Viewing 1 reply thread
  • The topic ‘How to use parameter in apdl MWRITE format line to write array of varying size?’ is closed to new replies.
[bingo_chatbox]