参考一下这个
https://spiderinnet1.typepad.com/blog/2013/05/autocad-net-transform-picked-point-from-current-ucs-to-wcs.html
Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor; Matrix3d ucs = ed.CurrentUserCoordinateSystem; PromptPointResult ppr = ed.GetPoint("\nSpecify base point: "); if (ppr.Status != PromptStatus.OK) return; Point3d baseUcs = ppr.Value; CoordinateSystem3d cs = ucs.CoordinateSystem3d; // Transform from UCS to WCS Matrix3d mat = Matrix3d.AlignCoordinateSystem( Point3d.Origin, Vector3d.XAxis, Vector3d.YAxis, Vector3d.ZAxis, cs.Origin, cs.Xaxis, cs.Yaxis, cs.Zaxis ); Point3d baseWcs = baseUcs.TransformBy(mat); Point3d curPt = baseWcs;
这个不错,不过我好像说反了。。。问题已修改