How to get a line's start and end point
Moderators: SDS, support, admin
-
- Posts: 13
- Joined: 19 Jun 2019, 07:30
How to get a line's start and end point
I found that 2DLine Class has a StartPoint and EndPoint member.
so I want to extract line's start point and end point in CadImage
However, I'm confusing how to approach 2Dline Class in CadImage.
I wrote a cod like this.
public static List<2DPoint> GetLineDataFromCad(CADImage cadImage)
{
List<2DPoint> lineData = new List<2DPoint>();
if (cadImage != null)
{
//TODO
//List<CADEntity> cadTexts = cadImage.Converter.Entities.FindAll(ent => ent.EntType == EntityType.Line);
//cadTexts.ForEach(entity => lineData.Add((entity as 2DPoint).StartPoint));
}
return lineData;
}
so I want to extract line's start point and end point in CadImage
However, I'm confusing how to approach 2Dline Class in CadImage.
I wrote a cod like this.
public static List<2DPoint> GetLineDataFromCad(CADImage cadImage)
{
List<2DPoint> lineData = new List<2DPoint>();
if (cadImage != null)
{
//TODO
//List<CADEntity> cadTexts = cadImage.Converter.Entities.FindAll(ent => ent.EntType == EntityType.Line);
//cadTexts.ForEach(entity => lineData.Add((entity as 2DPoint).StartPoint));
}
return lineData;
}
Re: How to get a line's start and end point
Hello
"2Dline" is not used for reference to the entity on a layout (just like other entity names with the prefix "2D"). You need to use "CADLine" instead. Please find out more at https://cadsofttools.com/help/cadnet/to ... 00D01.html
Andrey
"2Dline" is not used for reference to the entity on a layout (just like other entity names with the prefix "2D"). You need to use "CADLine" instead. Please find out more at https://cadsofttools.com/help/cadnet/to ... 00D01.html
Andrey
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support