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

Selection set select all

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
WPerciful
276 Views, 3 Replies

Selection set select all

How does one do a selection set to select all in C#



Wayne Perciful
Founder | Perciful Consulting LLC
Perciful Consulting

3 REPLIES 3
Message 2 of 4
Ed.Jobe
in reply to: WPerciful

Here's one way that I found by searching this forum.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 3 of 4
_gile
in reply to: WPerciful

Hi,

Editor.SelectAll method.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 4 of 4
norman.yuan
in reply to: WPerciful

In terms of AutoCAD programming, especially with AutoCAD .NET programming, the question does not make much programming sense without take into account what you intend to do in a concrete situation.

 

Firstly, "selection" means differently to CAD users and to programmers: for the former, it means AutoCAD VISUALLY shows which entities being selected with highlights and grips, while for the latter, they just want to identify a group of entities in computer's memory, and the entities may or may not be shown highlighted or be noticed by CAD users.

 

In the VBA age, AcadSelectionSet in COM API is used much more than .NET API's counterpart SelectionSet, because VBA lacks built-in collection/container class. With .NET API, programmer can use one of the many built-in collection/container classes (List/Dictionary/Queue/Stack/...) besides Acad .NET API's SelectionSet. There are many different ways a programmer can identify entities and gather them into a collection class of his/her choice, depending the need at the moment/situation.

 

But, basically, for short/dirty answer, to select all entities, you either call Editor.SelectAll(), or get the layout/ModelSpace BlockTableRecord, which is a container of all entities (entity IDs) in the layout/ModelSpace. I'd say the latter would be the quickest way. But if you want the entities being highlighted, this is another thing to discuss, unless you post this question as CAD user, not a programmer (then, wrong forum).

 

 

Norman Yuan

Drive CAD With Code

EESignature

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

Post to forums  

Forma Design Contest


AutoCAD Beta