Layers or Entities order

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Sing
Posts: 48
Joined: 12 Apr 2020, 17:39

Layers or Entities order

Post by Sing » 12 Apr 2020, 18:35

Is there a way to reorder layers or entities after adding them to bring to front, send to back or add to between.

I tried to reorder the layers list, but it was not changed.
=> cadImage.Converter.Layers.Reverse();

A entity added to a layer is shown on front on the layer as it is expected.

Can I add a entity between entities on a layer directly? or should I remove and add all entities that I reorder?
And how about layer order as the same to the entity ones?

Thank you

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Layers or Entities order

Post by support » 15 Apr 2020, 00:15

Hello,

Entities are drawn in the order they are stored in a CADConverter.Entities collection: Entities[0], Entities[1], Entities[2], etc. For example, a solid fill normally goes after the entities which form its border (has a higher index in the Entities collection) that means the fill is drawn on top of the border.

To reorder entities (bring to front, send to back or add an entity between other entities), you will have to rearrange elements in the CADConverter.Entities collection.

Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Sing
Posts: 48
Joined: 12 Apr 2020, 17:39

Re: Layers or Entities order

Post by Sing » 15 Apr 2020, 03:57

Thank you!! Mikhail. I will try to do it.

Post Reply