Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to select group?

Status
Not open for further replies.

JinT4191

Aerospace
May 2, 2013
12
Hi Eng-Tips!

I need some help in journaling, I need a selection of groups. Does anyone of you know how to make a selection where you can select several groups? I need the groups to make different plots.

 
Replies continue below

Recommended for you

NX8.5!
The problem is, when I record it, it writes out the usergroupIds which I don't know where to find...
 
Sure

Code:
Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main (ByVal args() As String) 

Dim theSession As Session = Session.GetSession()
Dim workSimPart As CAE.SimPart = CType(theSession.Parts.BaseWork, CAE.SimPart)

Dim displaySimPart As CAE.SimPart = CType(theSession.Parts.BaseDisplay, CAE.SimPart)

Dim usergroupIds1(0) As Integer
usergroupIds1(0) = 1
theSession.Post.PostviewApplyUserGroupVisibility(687, usergroupIds1, CAE.Post.GroupVisibility.ShowOnly)

Dim usergroupIds2(0) As Integer
usergroupIds2(0) = 2
theSession.Post.PostviewApplyUserGroupVisibility(687, usergroupIds2, CAE.Post.GroupVisibility.ShowOnly)

Dim usergroupIds3(0) As Integer
usergroupIds3(0) = 3
theSession.Post.PostviewApplyUserGroupVisibility(687, usergroupIds3, CAE.Post.GroupVisibility.ShowOnly)

Dim usergroupIds4(0) As Integer
usergroupIds4(0) = 4
theSession.Post.PostviewApplyUserGroupVisibility(687, usergroupIds4, CAE.Post.GroupVisibility.ShowOnly)

' ----------------------------------------------
'   Menu: Tools->Journal->Stop Recording
' ----------------------------------------------

End Sub
End Module

This was what I recorded when I clicked on all the groups with the function 'show only'. Now I need a selection of these groups.
 
In the API reference, look up the CreateUserGroupFromEntityLabels Method. It sounds like it may be what you need.

API reference said:
Returns a usergroup handle that may be used in UserGroup* calls and in PostViewApplyUserGroupVisibility

www.nxjournaling.com
 
Thanks for your help! But with this method you would create a new group out of entities wouldn't you? But I only want to select the groups I already created. Do you know any method how I could recall the usergroupIds?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor