How to create a post object in Mechanical with ACT

Jean
Jean Member Posts: 18
10 Comments Name Dropper
**

Hi,

I would like to create an object in the solution folder.
This object should write an APDL code in the ds.dat file after the solve.

I create with succes this kind of object in preprocessing :

    <load name="[Spectral] CQC" version="1" caption="[Spectral] CQC" icon="seisme" isload="true" color="#ff3300">

      <callbacks>
        <!-- This function is going to add APDL commands to the solver input (ds.dat) file in run time -->
        <getsolvecommands>writeCQCLoad</getsolvecommands>
      </callbacks>

      <!-- Expose 4 user inputs to collect for the APDL command -->
      <property name="CQC"  caption= "Significant parameter" control="float" default="0.001"/>

    </load>

I try do do the same in the post, but it dosn't work.

Is there any idea or example ?

Thanks,
Regards,
Jean

Best Answer

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 857
    500 Comments Photogenic Name Dropper Solution Developer Community of Practice Member
    ✭✭✭✭
    Answer ✓

    Another option is to use the callback, and define where the command should be added through the "location" parameter:

Answers

  • Jean
    Jean Member Posts: 18
    10 Comments Name Dropper
    **

    I found a solution :

    <load name="[Spectral] CQC" version="1" caption="[Spectral] CQC" icon="damping" isload="true" color="#ff3300" contextual="False">
    
    <callbacks>
            <!-- This function is going to add APDL commands to the solver input (ds.dat) file in run time -->
            <getsolvecommands>writeCQCLoad</getsolvecommands>
    </callbacks>
    
    <!-- Expose 4 user inputs to collect for the APDL command -->
    <property name="CQC"  caption= "Significant parameter" control="float" default="0.001"/>
    
    </load>
    
  • Jean
    Jean Member Posts: 18
    10 Comments Name Dropper
    **

    I made a mistake in my previous post.

    The correct code should replace :

    <getsolvecommands>writeCQCLoad</getsolvecommands>

    with :

    <getpostcommands>writeCQCLoad</getpostcommands>