ObjectCollection from SelectSet and invert it - help

ObjectCollection from SelectSet and invert it - help

Anonymous
Not applicable
408 Views
1 Reply
Message 1 of 2

ObjectCollection from SelectSet and invert it - help

Anonymous
Not applicable
I want to create a object collection of object in selectset. Then I want to invert this process. Please help me.

My macro:

Public Sub test()

Dim oapp As Inventor.Application
Set oapp = GetObject(, "Inventor.Application")
Dim odoc As PresentationDocument
Set odoc = oapp.ActiveEditObject

Dim colSelectedItems As Collection
Set colSelectedItems = New Collection

colSelectedItems.Add odoc.SelectSet.Item(1)

odoc.SelectSet.Clear

odoc.SelectSet.Select colSelectedItems(1) ' This is a problem

Stop
End Sub
0 Likes
409 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
I don't see anything wrong with the code. It's just that the API support for
presentation documents is very limited. So you are probably running into
objects that the API doesn't yet support selections for.

Sanjay-

wrote in message news:5642749@discussion.autodesk.com...
I want to create a object collection of object in selectset. Then I want to
invert this process. Please help me.

My macro:

Public Sub test()

Dim oapp As Inventor.Application
Set oapp = GetObject(, "Inventor.Application")
Dim odoc As PresentationDocument
Set odoc = oapp.ActiveEditObject

Dim colSelectedItems As Collection
Set colSelectedItems = New Collection

colSelectedItems.Add odoc.SelectSet.Item(1)

odoc.SelectSet.Clear

odoc.SelectSet.Select colSelectedItems(1) ' This is a problem

Stop
End Sub
0 Likes