C# 如何添加扩展属性
private void DrawLine(double X1,double Y1,double Z1,double X2,double Y2,double Z2){
Double[] Line = new Double;
Line = X1;
Line = Y1;
Line = Z1;
Line = X2;
Line = Y2;
Line = Z2;
Acad3DPolyline[] Polyline = new Acad3DPolyline;
Polyline = AcadDoc.ModelSpace.Add3DPoly(Line);
Polyline.Layer = "YS";
int id = Polyline.ObjectID;
AcadDictionary ObjDict=Polyline.GetExtensionDictionary();
AcadXRecord ObjXRecord = ObjDict.AddXRecord("name");
int[] aa = new int;
string[] bb = new string;
aa = 1;
aa = 2;
bb = "abc";
bb = "cc";
ObjXRecord.SetXRecordData(aa, bb); //**********type参数错误
}
SetXRecordData(object XRecordDataType, object XRecordDataValue) 这个方法 怎么用啊?
我想在线里 添加扩展属性1:abc , 2 :cc
扩展属性是XData aa = 1000;
aa = 1000;
试试看,你应该到COM板块去问
页:
[1]