如何创建新标注?可修改属性的那种
//水平标注
public static void SPBZ(Point P1,Point P2)
{
Double[] PT1 = new Double;
Double[] PT2 = new Double;
Double[] PT3 = new Double;
PT1 = P1.x; PT1 = P1.y; PT1 = 0;
PT2 = P2.x; PT2 = P2.y; PT2 = 0;
PT3 = (P1.x + P2.x)/2; PT3 = P1.y; PT3 = 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);
}本人想修改全局比例,却总是不成功?希望高手指点。
这是原来引用别人的代码,后来自己修改却总是新建“样式替代”,希望高人指点
页:
[1]