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

Select all object in the drawing

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
DenisLebedev
3683 Views, 3 Replies

Select all object in the drawing

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.

Tags (2)
3 REPLIES 3
Message 2 of 4

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
Message 3 of 4
Hallex
in reply to: DenisLebedev

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
in reply to: DenisLebedev

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

Senior Software Engineer

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