Show selection with PickObject's button

Show selection with PickObject's button

danil.kulik.2001
Observer Observer
242 Views
1 Reply
Message 1 of 2

Show selection with PickObject's button

danil.kulik.2001
Observer
Observer

(Sorry for my english)

I want to show selected elements (prewiew) with my wpf window.

I use

Selection.SetElementsIds(myElements)

then I use PickObjects, but it drops current selection

How can I use PickObjects buttons and save selection? (I don't need to select another elements, I just need that buttons)

0 Likes
243 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni

If you wish to prompt the user to select elements, call PickObjects.

  

If you want your add-in to specify the current selection set, use SetElementsIds.

  

If you want to use PickObject ti prompt the user to select elements and then later add those to the current selection set, store the element ids from PickObject in a list and add that list to the list you send to SetElementsIds.

   

If you use SetElementsIds, I see no point in presenting any buttons at all.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes