- Public Sub AddXRec(ByRef XrecName As String, DataType As Variant, Data As Variant)
- Dim DictCol As Collection
- Dim MyDict As AcadDictionary
- 'you want this to be a dictionary so no reason not to Dim it as such
- Dim Xrec As AcadXRecord
- Set DictCol = This.Drawing.Dictionaries
- Set MyDict = DictCol.Add("VBAtoLisp")
- 'if you are setting an object, you need Set X = Y
- Set Xrec = MyDict.AddXRecord(XrecName)
- Xrec.SetXRecordData DataType, Data
- 'if you are setting the properties of an object, you don't
- End Sub
|