Select all object in the drawing

Select all object in the drawing

Anonymous
Not applicable
4,403 Views
3 Replies
Message 1 of 4

Select all object in the drawing

Anonymous
Not applicable

Hello,

 

How can I select all the objects (lines, plylines, etc) in the drawing using C# + AutoCad?

 

AcadSelectionSet select = _acadCurrentDocument.SelectionSets.Add("my");

select.Select(AcSelect.acSelectionSetAll);

 Trying to modify this coede, but something is missing.

0 Likes
Accepted solutions (1)
4,404 Views
3 Replies
Replies (3)
Message 2 of 4

BrentBurgess1980
Collaborator
Collaborator
I haven't got ACAD on this computer, so I can't verify the exactness of the code, but look at the editor and the PromptSelectionOptions and PromptSelctionResult
0 Likes
Message 3 of 4

Hallex
Advisor
Advisor
Accepted solution

If you using AcadInterop so try this code snip:

    AcadSelectionSet oSset = doc.SelectionSets.Add("my");                
                //using filter
                object miss = Type.Missing;
                short[] dxfcode= new short[]{0};
                object[] dxfvalue= new object[]{"line,polyline,circle,ellipse,text,insert"};

                oSset.Select(AcSelect.acSelectionSetAll, miss, miss, dxfcode as object, dxfvalue as object);
                //send  message to command line:
                doc.Utility.Prompt(string.Format("\nSelected: {0} objects", oSset.Count));

 

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 4 of 4

amitnkukanur
Collaborator
Collaborator

But i am using Standard EXE and how does select all work in  my case and get the texts with Origins

Senior Software Engineer
0 Likes