A couple weeks ago I asked about getting the user to select a list of groups so I could handle it programmatically here and got a quick answer that I accepted.
The answer to this question ended up only working for Gateway Groups, and I am looking to get CAE groups. There does not seem to be a simple change to the provided answer to get these groups instead of the Gateway groups.
(UFConstants.UF_group_type is used for the Selection Mask but I can't find an equivalent for the type of groups I am looking for, and these are for Gateway Groups)
Solved! Go to Solution.
You cannot set a mask to allow direct selection of CAE groups.
You need to obtain a list of the groups from the CaePart.CaeGroupCollection, build a list of group names and present it to the user via an enum block, multi line string block , etc.. In the apply callback, map the selected name(s) back to the appropriate Cae.Group objects.
Thank you for the answer! I will look to use a MultilineString object to do this. Currently I am able to get all the groups to put in the MultilineString object, but am stuck trying to figure out how to get a MultilineString object for the session.
'Store list of all groups Dim grpList As List(Of String) = New List(Of String) 'get groups Dim allGroups As CAE.CaeGroupCollection = caePart.CaeGroups() For Each curGroup As CAE.CaeGroup In allGroups.ToArray() grpList.Add(curGroup.GetName()) Next 'user prompt for groups Dim usrGrpsSelect As NXOpen.BlockStyler.MultilineString '??How do I initialize for this session?? 'Add group titles to usrGrpsSelect usrGrpsSelect.SetValue(grpList.ToArray())