发布网友 发布时间:2024-10-24 01:29
共2个回答
热心网友 时间:2024-11-01 11:02
以下是我的程序中的一段,应该能回答楼上的问题吧,不知道对楼上的有没有帮助。 Database db = HostApplicationServices.WorkingDatabase; Editor ed = Application.DocumentManager.MdiActiveDocument.Editor; PromptDoubleOptions SourceOptions = new PromptDoubleOptions("\n请输入原中央经线"); SourceOptions.DefaultValue = 123; PromptDoubleOptions DestinationOptions = new PromptDoubleOptions("\n请输入转换后中央经线"); DestinationOptions.DefaultValue = 121.30; PromptResult GeoEllip = ed.GetKeywords("\n椭球体选择:1.WGS-84 2.Krassovsky",new string[]{"1","2"}); if(GeoEllip.Status != PromptStatus.OK) return; PromptDoubleResult SourceCL = ed.GetDouble(SourceOptions); if(SourceCL.Status != PromptStatus.OK) return; PromptDoubleResult 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);热心网友 时间:2024-11-01 11:02
感谢楼上meworld分享代码!能单独说明一下调用CAD中命令的实例吗?比如sendStringToExecute的用法?谢谢!