×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to select group?

How to select group?

How to select group?

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

RE: How to select group?

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

RE: How to select group?

Can you post your recorded journal, or at least the relevant section?

www.nxjournaling.com

RE: How to select group?

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

RE: How to select group?

In the API reference, look up the CreateUserGroupFromEntityLabels Method. It sounds like it may be what you need.

Quote (API reference)

Returns a usergroup handle that may be used in UserGroup* calls and in PostViewApplyUserGroupVisibility

www.nxjournaling.com

RE: How to select group?

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources