Showing results for 
Search instead for 
Do you mean 
Solved! Go to solution

User-Select CAE Groups

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.

The groups to selectThe groups to select

(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)



Accepted by topic author Ryan_
‎06-21-2017 11:45 AM

Re: User-Select CAE Groups

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.



Re: User-Select CAE Groups

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()

'user prompt for groups
Dim usrGrpsSelect As NXOpen.BlockStyler.MultilineString
'??How do I initialize for this session??

'Add group titles to usrGrpsSelect


Re: User-Select CAE Groups

If you design the block styler dialog through the UI in NX, it will produce all of the necessary template code that you need.