Message 1 of 8

Not applicable
05-16-2012
07:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey everyone, yet another question...
I've got my code to create a rectangle just fine, however i've noticed it doesn't take "Z" coordinates at all. I've got through the code and found my issue to be at these lines;
BlockTableRecord btr = (BlockTableRecord)tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite); using (Polyline pline = new Polyline()) { pline.AddVertexAt(0, new Point2d(LowerLeft.X, LowerLeft.Y), 0.0, 0.0, 0.0); pline.AddVertexAt(1, new Point2d(UpperRight.X, LowerLeft.Y), 0.0, 0.0, 0.0); pline.AddVertexAt(2, new Point2d(UpperRight.X, UpperRight.Y), 0.0, 0.0, 0.0); pline.AddVertexAt(3, new Point2d(LowerLeft.X, UpperRight.Y), 0.0, 0.0, 0.0); pline.Closed = true; btr.AppendEntity(pline); tr.AddNewlyCreatedDBObject(pline, true); }
I need to use a Point3d in order to add "Z" but apparently the pline.AddVertexAt only allows for a Point2d. Has any come across this or know of a solution?
Cheers
Vince
Solved! Go to Solution.