dallion Posted April 5, 2013 Posted April 5, 2013 (edited) Forget all the DeepCloning, I've whittled it down to the DBText.Position point doesn't seem to work as advertised: The text doesn't move to 0,0,0. [CommandMethod("copyEnt")] public void copyEnt() { Document doc = Application.DocumentManager.MdiActiveDocument; Database db = doc.Database; Editor ed = doc.Editor; PromptEntityOptions options = new PromptEntityOptions("\nSelect entity to copy"); PromptEntityResult acSSPrompt = ed.GetEntity(options); if (acSSPrompt.Status != PromptStatus.OK) return; using (Transaction Tx = db.TransactionManager.StartTransaction()) { DBText oldText = Tx.GetObject(acSSPrompt.ObjectId, OpenMode.ForWrite) as DBText; oldText.Position = new Point3d(0,0,0); oldText.TextString = "BLAH BLAH"; Tx.Commit(); } } Edited April 5, 2013 by dallion changing code to runnable example of problem Quote
dallion Posted April 5, 2013 Author Posted April 5, 2013 Never mind, I have figured it out using the GetVectorTo() method. Not sure why just changing the writable property doesn't work? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.