As the figs shown, I want to output the name selection result data, but the mechanical scripting doesn't record the hangdling operation. Can you give me a hand?
Try this out.
NamedSelNames = ['face','face2'] NSs = [ExtAPI.DataModel.GetObjectsByName(NamedSelName)[0] for Name in NamedSelNames] AS = Model.Analyses[0].AnalysisSettings AS.OutputSelection=OutputSelection.NamedSelection AS.NamedSelection=NSs
@Mike.Thompson
Hi, Mike Thanks for your help.
I made some minor changes, it's OK now.
NamedSelNames = ['face','face2'] NSs_nested = [ExtAPI.DataModel.GetObjectsByName(Name) for Name in NamedSelNames] NSs = [item for sublist in NSs_nested for item in sublist] AS = Model.Analyses[0].AnalysisSettings AS.OutputSelection=OutputSelection.NamedSelection AS.NamedSelection=NSs