- 积分
- 119
- 明经币
- 个
- 注册时间
- 2009-10-22
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
- //水平标注
- public static void SPBZ(Point P1,Point P2)
- {
- Double[] PT1 = new Double[3];
- Double[] PT2 = new Double[3];
- Double[] PT3 = new Double[3];
- PT1[0] = P1.x; PT1[1] = P1.y; PT1[2] = 0;
- PT2[0] = P2.x; PT2[1] = P2.y; PT2[2] = 0;
- PT3[0] = (P1.x + P2.x)/2; PT3[1] = P1.y; PT3[2] = 0;
- Autodesk.AutoCAD.Interop.AcadApplication AcadApp;
- Autodesk.AutoCAD.Interop.AcadDocument AcadDoc;
- AcadApp = (AcadApplication)System.Runtime.InteropServices.Marshal.GetActiveObject("AutoCAD.Application");
- Microsoft.VisualBasic.Interaction.AppActivate(AcadApp.Caption);
- AcadDoc = AcadApp.ActiveDocument;
- AcadApp.Application.Visible = true;
- AcadDoc.ActiveDimStyle.Name = "abc";
- AcadDoc.SendCommand("_dimscale 200000 ");
- AcadDimAligned dimObj = AcadDoc.ModelSpace.AddDimAligned(PT1,PT2,PT3);
- }
本人想修改全局比例,却总是不成功?希望高手指点。
|
|