.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
GetSelecti on from user with some entities already selected
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
393 Views, 5 Replies
05-06-2010 12:17 PM
Hallo,
I need to get a selection of entities from the user, as with the editor.GetSelection() method, but I want some entities to be already selected when the user starts selecting, so he/she can de-select them. I managed to do this with ActiveX, but I can't find a way to achieve this using the managed wrappers. I don't know if Utils.SelectObjects() can be of any use, cause I can't find any documentation on it.
Could anyone help, please?
Thanks
using AutoCAD 2007 (or earlier if possible)
I need to get a selection of entities from the user, as with the editor.GetSelection() method, but I want some entities to be already selected when the user starts selecting, so he/she can de-select them. I managed to do this with ActiveX, but I can't find a way to achieve this using the managed wrappers. I don't know if Utils.SelectObjects() can be of any use, cause I can't find any documentation on it.
Could anyone help, please?
Thanks
using AutoCAD 2007 (or earlier if possible)
*Tony Tanzillo
Re: GetSelecti on from user with some entities already selected
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-06-2010 03:11 PM in reply to:
pavlos.katsonis
How did you do it with ActiveX?
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6387136@discussion.autodesk.com...
Hallo,
I need to get a selection of entities from the user, as with the
editor.GetSelection() method, but I want some entities to be already selected
when the user starts selecting, so he/she can de-select them. I managed to do
this with ActiveX, but I can't find a way to achieve this using the managed
wrappers. I don't know if Utils.SelectObjects() can be of any use, cause I can't
find any documentation on it.
Could anyone help, please?
Thanks
using AutoCAD 2007 (or earlier if possible)
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
Hallo,
I need to get a selection of entities from the user, as with the
editor.GetSelection() method, but I want some entities to be already selected
when the user starts selecting, so he/she can de-select them. I managed to do
this with ActiveX, but I can't find a way to achieve this using the managed
wrappers. I don't know if Utils.SelectObjects() can be of any use, cause I can't
find any documentation on it.
Could anyone help, please?
Thanks
using AutoCAD 2007 (or earlier if possible)
Re: GetSelecti on from user with some entities already selected
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-06-2010 11:46 PM in reply to:
pavlos.katsonis
Using
SelectionSet sSet = .... // create a new selection set
sSet.AddItems(oldEntities); // where oldEntities is AcadEntity[] with the entities to be pre-selected.
sSet.SelectOnScreen(...); // get user input
SelectionSet sSet = .... // create a new selection set
sSet.AddItems(oldEntities); // where oldEntities is AcadEntity[] with the entities to be pre-selected.
sSet.SelectOnScreen(...); // get user input
*Tony Tanzillo
Re: GetSelecti on from user with some entities already selected
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-07-2010 03:53 PM in reply to:
pavlos.katsonis
I don't see any obvious way to do that in ObjectARX.
If the Editor's SelectionAdded event fires before the
first selection is made by the user, that would be the
only way it could be done.
In any case, if you can't get that to work, then I would
just use the ActiveX API to get the selection, and then
use the Editor's SelectPrevious() method to get the
resulting selection as a managed SelectionSEt.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6387416@discussion.autodesk.com...
Using
SelectionSet sSet = .... // create a new selection set
sSet.AddItems(oldEntities); // where oldEntities is AcadEntity[] with the
entities to be pre-selected.
sSet.SelectOnScreen(...); // get user input
If the Editor's SelectionAdded event fires before the
first selection is made by the user, that would be the
only way it could be done.
In any case, if you can't get that to work, then I would
just use the ActiveX API to get the selection, and then
use the Editor's SelectPrevious() method to get the
resulting selection as a managed SelectionSEt.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
Using
SelectionSet sSet = .... // create a new selection set
sSet.AddItems(oldEntities); // where oldEntities is AcadEntity[] with the
entities to be pre-selected.
sSet.SelectOnScreen(...); // get user input
Re: GetSelecti on from user with some entities already selected
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-07-2010 11:57 PM in reply to:
pavlos.katsonis
Thanks for the advice. I'll use the ActiveX API for the selection.
In fact, I may port the whole project to using ActiveX, since I need my main program to run outside AutoCAD's process and the method described in "Interfacing an external COM application with a .NET module in-process to AutoCAD (redux)" by K. Walmsley gives me a hell of problems.
In fact, I may port the whole project to using ActiveX, since I need my main program to run outside AutoCAD's process and the method described in "Interfacing an external COM application with a .NET module in-process to AutoCAD (redux)" by K. Walmsley gives me a hell of problems.
Re: GetSelecti on from user with some entities already selected
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-15-2010 03:48 AM in reply to:
pavlos.katsonis
I'm sorry, but I was wrong. The AddItems method adds the supplied entities to the selection set, but the user can not de-select them.
And I thought I had tested it. It seems I have to make my tests more thorough.
And I thought I had tested it. It seems I have to make my tests more thorough.
