CADVertex ouput problem

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
dlwotj4274
Posts: 13
Joined: 19 Jun 2019, 07:30

CADVertex ouput problem

Post by dlwotj4274 » 09 Jul 2019, 09:42

Hello

I got polylines from block

and polyines's vertexes.

I made a list for each values of point x and point y from vertexs.

I would like to write these values in console.

It is a code that I wrote. I'm having a difficult to approach CADVertex Class.



if (block.Entities.EntType == EntityType.LWPolyline)
{
CADLWPolyLine PolylinesData = (CADLWPolyLine)block.Entities;

List<CADVertex> vertexes = new List<CADVertex>();
PolylinesData.Vertexes.ForEach(ent => vertexes.Add(ent as CADVertex));
vertexes.ForEach(Console.WriteLine);
}

Thanks!

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

Re: CADVertex ouput problem

Post by support » 09 Jul 2019, 21:18

Hello,

To write the Point.X and Point.Y values from a CADVertex object in the console, use the following code:

Code: Select all

vertexes.ForEach(vertex => Console.WriteLine("x={0}; y={1}", vertex.Point.X, vertex.Point.Y));
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply