×
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

VisualBasic .NET question

VisualBasic .NET question

VisualBasic .NET question

(OP)
Dear All,
What kind of vb routine could I use to ask What is the highlighted NXObject?

RE: VisualBasic .NET question

1. GET ALL PRE-SELECTED OBJECTS

Dim num_selected As Integer = sel.GetNumSelectedObjects()

2. PUT THOSE OBJECTS IN AN ARRAY

Dim objArray(-1) As NXObject
For inx = 0 To num_selected - 1
   ReDim Preserve objArray(inx)
   objArray(inx) = sel.GetSelectedObject(inx)
Next

RE: VisualBasic .NET question

(OP)
daluigi,
Thanks a lot.
And how could I remove this preselected object from the selection list.
I try the theUI.SelectionManager.RemoveFromSelectionList() function. But I can't add any value to the selectionhandle.

RE: VisualBasic .NET question

1. REMOVE OBJECT FROM THE LIST

Redim objArray(-1)

2. DE-SELECT THE OBJECTS ON SCREEN

Dim partCleanup1 As PartCleanup

    partCleanup1 = s.NewPartCleanup()
    partCleanup1.TurnOffHighlighting = True
    partCleanup1.DoCleanup()
    partCleanup1.Dispose()

RE: VisualBasic .NET question

(OP)
Thanks,very thanks.
Your method works on the graphics area, it is very good.
But the component remains selected in the assembly navigator tree.

I tried the Part cleanup utility and I found that it can remove the selection from the component in the ANT, too.
But when I recorded the part cleanup utility and rerun the journal it doesn't work in the ANT. The component remained seletected.
what could I do?

RE: VisualBasic .NET question

Hi All,
is there any vb.net macro available to select
the components of same type(eg ejector pins, tap holes etc),
or is there a way to write in either Grip/KF.

about an year ago we switched to NX in our design dept
and we are experiencing some issues with the models sent to
shop floor like missing holes etc.

Regards
Girish.
 

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