Change result status without Clearing The Results

Hi,
Is there a way to change status of a from IsSolved == True to False. I know it can be done using ClearGeneratedData() on that result, but it also removes any files that were created along with it in the Solver directory. I have a separate object under Solution tree that controls some of the input for that result. During OnStartPost, script creates a .json file that consist of:

  • RST data from all time steps (obtained using DPF) - principal stress, shear stress, shell thickness and more.
  • Inputs from Excel spreadsheets selected in solution object.

I've learned that it greatly shortens the calculation time if I create the input json before Result Evaluation - especially with larger RST files. I can then modify different parameters of that result without the need to read any input from RST again. And I need that json file with all the input for additional, manual post processing checks and verifications.

I want to force user to re-evaluate the selected results after changing input parameters without clearing all generated data. The json should only be updated with the changed Excel input, the RST data should remain unchanged since the Solution is not affected.

Tagged:

Best Answer

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee, GitHub-issue-creator Posts: 327
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    edited August 2024 Answer ✓

    I think you want to modify the State (or maybe it's called ObjectState) instead of IsSolved.

    I am not sure if you can do this directly. If not, a workaround would be to change a property, then change it back to its original value

Answers

  • James Derrick
    James Derrick Administrator, Employee Posts: 283
    Ancient Membership 100 Comments 100 Likes 25 Answers
    admin

    Hi Mateusz, I don't know but someone from @AKD-Scripting-Team should be able to help

  • Rajesh Meena
    Rajesh Meena Moderator, Employee Posts: 128
    100 Comments 25 Likes Second Anniversary 5 Answers
    ✭✭✭✭

    @Mateusz How are you triggering your script? Is it a) python code/result object b) ACT Post/Result Object?

  • Mateusz
    Mateusz Member Posts: 11
    First Anniversary Name Dropper First Comment
    **

    ACT Post/Result object. I'm working with ACT since it is more familiar to me and I need to create a compilable file (wbex) to be easily share between users (and so they don't have access to source code => can't mess anything up :D )

  • Mateusz
    Mateusz Member Posts: 11
    First Anniversary Name Dropper First Comment
    **

    Yes, the State! I was thinking about the same thing, to change the property value back and forth. That forces result to go to Evaluate Required state without clearing my precious input json. This is the way (given there is no better built-in alternative).