Layer width and height

Discuss and ask questions about CAD .NET library.

Moderators: support, SDS, admin

Post Reply
Ljurka
Posts: 4
Joined: 11 Jun 2018, 00:08

Layer width and height

Post by Ljurka » 12 Jun 2018, 17:39

Hello!
Is there a chance to get the height and width or something like that inside the area of the layer?

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

Re: Layer width and height

Post by support » 13 Jun 2018, 20:25

Hello,

The LAYER object is non-visible that means it doesn't have a width and height. If you need to get the area occupied by the visible CAD objects (entities) which belong to a certain layer, it may be possible.

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

Ljurka
Posts: 4
Joined: 11 Jun 2018, 00:08

Re: Layer width and height

Post by Ljurka » 14 Jun 2018, 14:51

"need to get the area occupied by the visible CAD objects (entities) which belong to a certain layer"

Yes, that what I need. How to archive this?

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

Re: Layer width and height

Post by support » 15 Jun 2018, 21:35

Hello,

It can be achieved by iterating through the entities located on a certain layout (e.g. Model, Layout1, Layout2, etc.) and finding the minimum (bottom, left) and maximum (top, right) extent values for all the entities which belong to a certain layer. Please ensure that the layer entities in your drawing file are located within the same layout, otherwise, this task doesn't make sense.

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

Post Reply