Hi, as far as I know .Net 2020 Objarx Sdk is compatible with Vsto2017, but currently my habit is to use on Vsto2019, it still works normally with my cad2020 version except some pretty annoying notifications and I haven't yet know how to handle them (no message appear on vsto2017 andalso no message with Excel vsto 2019 but only Cad ). This is the code I come across (code written a long time ago) but I'm still here reading them because I'm newer:
Private Sub SetStoredRotation(ByVal obj As DBObject, ByVal rotation As Double)
AddRegAppTableRecord(kRegAppName)
Dim rb As ResultBuffer = obj.XData
If rb Is Nothing Then
[u]rb = New ResultBuffer[/u](New TypedValue(kAppCode, kRegAppName), New TypedValue(kRotCode, rotation))
Else
rb.Add(New TypedValue(kAppCode, kRegAppName))
rb.Add(New TypedValue(kRotCode, rotation))
End If
obj.XData = rb
rb.Dispose()
End Sub
The error is:
Disposable object created by 'New ResultBuffer... is never disposedI am stuck using [using / try catch] and I'm not sure why rb.dispose doesn't work (other vsto19 project without Cad still work normally)
Can I handle this error without suppress messages and without declaring other object types?
Thanks a lot!