.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select objects in the drawing

3 REPLIES 3
Reply
Message 1 of 4
bolek75
339 Views, 3 Replies

Select objects in the drawing

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
3 REPLIES 3
Message 2 of 4
Anonymous
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
Message 3 of 4
bolek75
in reply to: bolek75

thats exactly what I needed. Thanks a lot. My project missed the reference to this dll.

Cheers
bolek75
Message 4 of 4
foruma000256
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost