The ECS of lines that lie in the WCS XY plane is always the Identity matrix.
The only thing AutoCAD knows about an entity's coordinate system is its
normal, because that's the only thing it stores.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6363868@discussion.autodesk.com...
That isn't the issue I'm trying to figure out - I am able to change the current
UCS without a problem. Forget the reason I'm trying to use Ecs... The problem
I have is that Entity.Ecs is always the identity matrix. If I draw a line from
10,10,0 to 50,50,0 it's Ecs property should NOT be (1,0,0,0), (0,1,0,0),
(0,0,1,0), (0,0,0,1) - But it is.
This simple function will reproduce the problem I seem to be having:
public static void EcsTest()
{
Point3d start = new Point3d(10, 10, 0);
Point3d end = new Point3d(50, 50, 0);
Line line = new Line(start, end);
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Transaction tr = db.TransactionManager.StartTransaction();
BlockTableRecord mdlSpace = (BlockTableRecord)tr.GetObject(
SymbolUtilityServices.GetBlockModelSpaceId(db),
OpenMode.ForWrite);
mdlSpace.AppendEntity(line);
tr.AddNewlyCreatedDBObject(line, true);
tr.Commit();
doc.Editor.WriteMessage("\nECS: " + line.Ecs);
}
The output I get by running this function is
ECS: ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1))
Edited by: fyathyrio8 on Mar 30, 2010 8:29 PM