Access Output Control( Analysis Settings) in WB LS-DYNA with ACT Issued

Wayne
Wayne Member Posts: 4
Name Dropper First Comment
**

I want to change Output Control (Analysis Settings) to **Time **and value is **0.01 **in WB LS-DYNA

Below is my code.


  1. Implicit_Analysis = ExtAPI.DataModel.Project.Model.Analyses[0]
  2. solver = Implicit_Analysis.Solver
  3. CaculateResultTemp = solver.Properties['Output Controls/Calculate Results At']
  4. CaculateResultTemp.Value= r'Time'
  5. solver.Properties['Output Controls/Time'].Value = 0.01
  6. ExtAPI.DataModel.Tree.Refresh()

After execute the Calculate Results will success change to Time but value will not show in WB

After Execute (Issue)

Expect (Correct)

Please help me to correct the code

Thanks

Best Answer

  • Rajesh Meena
    Rajesh Meena Moderator, Employee Posts: 125
    100 Comments Second Anniversary 5 Answers Solution Developer Community of Practice Member
    ✭✭✭✭
    Answer ✓

    @Wayne You can trigger Validate() callback via script which will make the Time property visible.

    Implicit_Analysis = ExtAPI.DataModel.Project.Model.Analyses[0]
    solver = Implicit_Analysis.Solver
    CaculateResultTemp = solver.Properties['Output Controls/Calculate Results At']
    CaculateResultTemp.Value= r'Time'
    CaculateResultTemp.Validate()
    solver.Properties['Output Controls/Time'].Value = 0.04
    

Answers

  • Rajesh Meena
    Rajesh Meena Moderator, Employee Posts: 125
    100 Comments Second Anniversary 5 Answers Solution Developer Community of Practice Member
    ✭✭✭✭

    @Wayne I am not sure which version you are using here. I rarely use Implicit in WB-DYNA but adding below line at the end of your script should show effects in UI.

    solver.NotifyChange()

    This is to send a signal to mechanical for updating properties for a custom object. Since WB-DYNA is an an ACT based system, it will be applicable as well. Let me know how it goes.

  • Wayne
    Wayne Member Posts: 4
    Name Dropper First Comment
    **

    @Rajesh Meena
    Thanks for the comment.
    I try it in my script but did not work
    Those Time Value still not show in UI.

    But I find some interesting thing.
    Although UI is not show but when export the .Kfile the Time Value is success change it.

    By the way my version is 2023R2

    Thanks

  • Wayne
    Wayne Member Posts: 4
    Name Dropper First Comment
    **

    Hi @Rajesh Meena

    Do you have any other recommend way to solve this issue?

    Thanks

  • Wayne
    Wayne Member Posts: 4
    Name Dropper First Comment
    **

    Hi @Rajesh Meena

    Appreciate!

    After using .Validate(), the time value is success display is UI.

    Thanks