TAGGED: LS-Dyna-Workbench, script
-
-
October 27, 2025 at 12:50 pm
2398629771
SubscriberIn Workbench, when adding keywords with Command in LS-DYNA, its SolverTarget property is automatically assigned to LS-DYNA (as shown in Figure 1).
However, when using Command to add keywords in LS-DYNA Restart analysis, the SolverTarget property needs to be modified manually (as shown in Figure 2), and this operation is not recorded in the script (as shown in Figure 3).
How to modify the SolverTarget property for Command by using the script?
In script, the SolverTarget in the AddCommandSnippet () attribute is gets-only.Thank very much!!!
-
October 28, 2025 at 11:43 am
-
October 30, 2025 at 7:52 am
2398629771
Subscriber -
October 30, 2025 at 7:59 am
2398629771
Subscriber-
October 30, 2025 at 8:17 am
Deepak
Ansys EmployeeHello,
It might be challenging to interact with pop-up messages directly using a script. However, as a workaround, you can try the following approach:
analysis24 = DataModel.GetObjectById(24)
command_snippet = analysis24.AddCommandSnippet()
command_snippet.Input = ''
command_snippet.PropertyByName("CommandEditorSolverTarget").InternalValue = 3Please give this a try and let me know how it works for you.
Thanks,
Deepak
-
-
October 30, 2025 at 8:38 am
2398629771
SubscriberThank you again for your timely reply. Your script is very useful. how awesome it is!
Thank you again for solving the problem that has been bothering me for a long time!
-
October 30, 2025 at 8:45 am
Deepak
Ansys EmployeeYou're very welcome! I'm really glad to hear the script was helpful and that it resolved the issue you were facing.
If you encounter any further challenges with scripting, feel free to reach out through the Home - Community Forum. It's a great place to find support and share ideas.
-
-
- You must be logged in to reply to this topic.
-
4167
-
1487
-
1358
-
1189
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.




