以下是我的程序中的一段,应该能回答楼上的问题吧,不知道对楼上的有没有帮助。 Database db = HostApplicationServices.WorkingDatabase; Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;  romptDoubleOptions SourceOptions = new PromptDoubleOptions("\n请输入原中央经线"); SourceOptions.DefaultValue = 123;  romptDoubleOptions DestinationOptions = new PromptDoubleOptions("\n请输入转换后中央经线"); DestinationOptions.DefaultValue = 121.30;  romptResult GeoEllip = ed.GetKeywords("\n椭球体选择:1.WGS-84 2.Krassovsky",new string[]{"1","2"}); if(GeoEllip.Status != PromptStatus.OK) return;  romptDoubleResult SourceCL = ed.GetDouble(SourceOptions); if(SourceCL.Status != PromptStatus.OK) return;  romptDoubleResult DestinationCL = ed.GetDouble(DestinationOptions); if(DestinationCL.Status != PromptStatus.OK) return; ed.WriteMessage("\n开始坐标换带,请稍候。"); Transaction trans = db.TransactionManager.StartTransaction(); BlockTableRecord btr = (BlockTableRecord)trans.GetObject(db.CurrentSpaceId,OpenMode.ForRead);
|