Page 1 of 1

Getting Entities in between two Polylines.

Posted: 27 Sep 2017, 09:26
by nthangaraj
We have few Dimensions placed between 2 Poly lines. Please let me know how i can get only those dimensions.

Thanks
Thangaraj N

Re: Getting Entities in between two Polylines.

Posted: 27 Sep 2017, 17:19
by support
Hello,

Could you please post a screenshot which shows the position of these dimensions in relation to the polylines?


Mikhail

Re: Getting Entities in between two Polylines.

Posted: 28 Sep 2017, 07:30
by nthangaraj
Please find the attached Screenshot. i would need to get the dimension that are marked with arrow.

Thanks
Thangaraj N

Re: Getting Entities in between two Polylines.

Posted: 29 Sep 2017, 19:37
by support
Hello

If the marked dimensions are located on a separate layer, you may easily filter them off using the following code. If they are not, you will have to find another property that distinguishes these dimensions from other objects.

Code: Select all

using CADImport;
using System.Collections.Generic;
...

var cadDimensions = cadImage.CurrentLayout.Entities.FindAll(ent => ent.EntType == EntityType.Dimension);
var cadDimensionsOnLayer = cadDimensions.FindAll(dim => dim.Layer.Name == "SomeLayer");
Mikhail