Put all drawings objects belonging to a specific layer in the foreground.

Put all drawings objects belonging to a specific layer in the foreground.

Anonymous
Not applicable
563 Views
2 Replies
Message 1 of 3

Put all drawings objects belonging to a specific layer in the foreground.

Anonymous
Not applicable

Hello,

 

Is there a simply way to put all drawings objects (blocs, table, polyline, cercle...) belonging to a specific layer in the foreground ?

 

layer.jpg

 

For example, I would like the objects belonging to the layer "002" to be in the foreground, etc...

 

Thanks,

Alexis

0 Likes
Accepted solutions (1)
564 Views
2 Replies
Replies (2)
Message 2 of 3

norman.yuan
Mentor
Mentor
Accepted solution

You would use DrawOrderTable class to do it, whether you consider that is a "simple way" or not. DrawOrderTable is actually an object wrapper of an ExtensionDictionary of a BlockTableRecord, named as "ACAD_SORTENTS".

 

Assume you want to do this to entities on layer "002" in ModelSpace, you would open the DrawOrderTable of the ModelSpace BlockTableRecord,  collect all the entity IDs on that layer, then, call DrawOrderTable.Move[Above/Below/ToTop/ToBottom]() method. 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks for your answer, I will do that.
0 Likes