Dim objdict As AcadDictionary Dim objxrecord As AcadXRecord Dim xdata(0 To 2) As Variant Dim xdatatype(0 To 2) As Variant xdata(0) = UserForm1.ComboBox2.Text xdata(1) = UserForm1.ComboBox1.Text xdata(2) = Templ.Length xdatatype(0) = 1001 xdatatype(1) = 1002 xdatatype(2) = 1003 Set objdict = Templ.GetExtensionDictionary() Set objxrecord = objdict.AddXRecord(lname) objxrecord.SetXRecordData xdatatype, xdata ThisDrawing.ActiveLayer = ThisDrawing.Layers.Item("0") If Templ.HasExtensionDictionary Then MsgBox "has" Else MsgBox "no" End If Dim objdict1 As AcadDictionary Dim objxrecord1 As AcadXRecord Dim xdata1(0 To 2) As Variant Dim xdatatype1(0 To 2) As Variant Set objdict1 = Templ.GetExtensionDictionary() Set objxrecord1 = objdict1.GetObject(lname) objxrecord1.GetXRecordData xdatatype1, xdata1 MsgBox "is" & xdatatype1(0) & xdata1(0) 大家帮我看看,为什么读不出来扩展数据? 谢谢 |