Deleting xrecords in VB(A)
It looks like deleting Xrecords in VBA does not work. I have the following code for testing this (in a form with two command buttons):Private Sub CommandButton1_Click()Dim oDict As IntelliCAD.DictionaryDim oXrec As IntelliCAD.XrecordDim vTyp As VariantDim vDat As Variant ReDim vTyp(0) As Integer ReDim vDat(0) As Variant vTyp(0) = 1 vDat(0) = "TEST" On Error Resume Next Set oDict = ThisWorkspace.ActiveDocument.Dictionaries.Item("CT_TEST") If oDict Is Nothing Then Set oDict = ThisWorkspace.ActiveDocument.Dictionaries.Add("CT_TEST") End If Set oXrec = oDict.Item("CT_TEST") If oXrec Is Nothing Then Set oXrec = oDict.AddXRecord("CT_TEST") End If oXrec.SetXRecordData vTyp, vDat End SubPrivate Sub CommandButton2_Click()Dim oDict As IntelliCAD.DictionaryDim oXrec As IntelliCAD.Xrecord On Error Resume Next Set oDict = ThisWorkspace.ActiveDocument.Dictionaries.Item("CT_TEST") Set oXrec = oDict.Item("CT_TEST") oXrec.Delete End SubInspacing the dictionary/xrecords after running both buttons reveals that the xrecord was not deleted.Can you confirm this as a bug, and if so, when will it be fixed?
Comments
-
This is indeed a bug. The .delete method on XRecord doesn't seem to do anything on the Xrecord.Thanks for pointing this out. We will try to fix this as soon as possible
0