.NET

Reply
Active Contributor
bolek75
Posts: 28
Registered: ‎11-29-2005
Message 1 of 4 (170 Views)

Select objects in the drawing

170 Views, 3 Replies
02-27-2006 12:37 AM
I would like to select objects in the drawing programatically.
I am using a SelectionFilter and invoke theHighlight method. It works fine but I would like the vertices to be highlighted as I achieve when secting the object manually.
What can I do?

Cheers
bolek75
*Tony Tanzillo
Message 2 of 4 (170 Views)

Re: Select objects in the drawing

02-27-2006 02:11 PM in reply to: bolek75
Add a reference to acmgdinternal.dll (where acad.exe is),
and then try something like this:

Editor ed = AcadApp.DocumentManager.MdiActiveDocument.Editor
PromptSelectionResult result = ed.GetSelection();
if( result.Status == PromptStatus.OK && result.Value.Count > 0 )
{
ObjectId[] ids = result.Value.GetObjectIds();
Autodesk.AutoCAD.Internal.Utils.SelectObjects(ids);
}

Or you can just PInvoke acedSSSetFirst, which is what
the SelectObjects() method does.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:5096504@discussion.autodesk.com...
I would like to select objects in the drawing programatically.
I am using a SelectionFilter and invoke theHighlight method. It works fine but I would like the vertices to be highlighted as I achieve when secting the object manually.
What can I do?

Cheers
bolek75
Active Contributor
bolek75
Posts: 28
Registered: ‎11-29-2005
Message 3 of 4 (170 Views)

Re: Select objects in the drawing

02-28-2006 01:25 AM in reply to: bolek75
thats exactly what I needed. Thanks a lot. My project missed the reference to this dll.

Cheers
bolek75
Distinguished Contributor
foruma000256
Posts: 216
Registered: ‎01-28-2004
Message 4 of 4 (170 Views)

Re: Select objects in the drawing

07-03-2008 02:19 PM in reply to: bolek75
--Or you can just PInvoke acedSSSetFirst, which is what
the SelectObjects() method does.--

My limited training materials does not tell me how to get the acedsssetfirst selection set, I want to clear it out.

I used:

Autodesk.AutoCAD.Internal.Utils.SelectObjects(ids);

to get some objects for zooming, and now I want to un-select them for the user to move on.

In vba i could get a selection set by name from a group of selection sets in the drawing. Can I do that in .net?

Thanks,

jvj
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.