Can I access the arguments in a command snippet through ACT scripting?
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
Is it possible to access the details view, and especially read/edit the “ARG1”, “ARG2”, etc. values of a command snippet in Mechanical?
Tagged:
4
Answers
-
Yes, this is possible:
analysis = ExtAPI.DataModel.Project.Model.Analyses[0] # reference analysis snippet = analysis.GetChildren(DataModelObjectCategory.CommandSnippet,True)[0] # get first command snippet object in the analysis print(snippet.InputArgument1) # print the value of “ARG1” snippet.InputArgument1="342" # change the value of “ARG1”
0 -
OutputParameter_1 = snippet.OutputParameters[0].Value
2