Message 1 of 13
Set UCS to ECS
Not applicable
03-29-2010
12:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In the midst of a command, I prompt the user to select an entity. I want to set the UCS to the ECS of that object. I'm trying a basic example with the entity being a line (not horizontal obviously), but the Ecs property is always the identity matrix, and thus it doesn't change UCS from WCS.
Transaction tr = db.TransactionManager.StartTransaction();
Entity ent = (Entity)tr.GetObject((ObjectId)id, OpenMode.ForRead);
ed.CurrentUserCoordinateSystem = ent.Ecs;
It should be just that simple (I think). I posted a similar issue dealing with DBText before, but never got a solution. Any ideas?
Transaction tr = db.TransactionManager.StartTransaction();
Entity ent = (Entity)tr.GetObject((ObjectId)id, OpenMode.ForRead);
ed.CurrentUserCoordinateSystem = ent.Ecs;
It should be just that simple (I think). I posted a similar issue dealing with DBText before, but never got a solution. Any ideas?