SelectSet.Select method how to use?

SelectSet.Select method how to use?

Cris-Ideas
Advisor Advisor
308 Views
1 Reply
Message 1 of 2

SelectSet.Select method how to use?

Cris-Ideas
Advisor
Advisor

Hi,

I have placed this on customisation forum but maybe someone hers can answer as well.

 

I have two subs in the form. But I am getting exception.

 

    Dim oComponentList As Inventor.SelectSet
    Dim compOcc As Inventor.ComponentOccurrence
    Dim obj As Object

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click oComponentList = _invApp.ActiveDocument.SelectSet For Each obj In oComponentList Debug.Print(obj.Name) Next Dim oComponentList As Inventor.SelectSet Dim compOcc As Inventor.ComponentOccurrence Dim obj As Object End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click For Each obj In oComponentList Debug.Print(obj.Name) Next End Sub

 

 

It is the second button, first works ok.

 

What do I do wrong, or what I do not understand?

Can someone advice?

 

Cris.

 

Cris,
https://simply.engineering
0 Likes
309 Views
1 Reply
Reply (1)
Message 2 of 2

johnsonshiue
Community Manager
Community Manager

Hi! Please refer to the similar thread on Inventor Customization forum.

 

https://forums.autodesk.com/t5/inventor-customization/selectset-select-method-how-to-use/m-p/8176774...

 

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes