Error in definition of Drawable.Bounds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I just ran into an odd problem with the Bounds method (inherited by all DBObjects). I was attempting to us it like:
Dim bounds As Extents3d = txt.Bounds
but VB stated:
Error 3 Option Strict On disallows implicit conversions from 'Autodesk.AutoCAD.DatabaseServices.Extents3d?' to 'Autodesk.AutoCAD.DatabaseServices.Extents3d'.
I looked to see where that question mark was coming from and if there was another class that I hadn't heard of. It turns out that in the type library, it is defined as:
Public Overridable ReadOnly Property Bounds As Autodesk.AutoCAD.DatabaseServices.Extents3d?
Member of Autodesk.AutoCAD.GraphicsInterface.Drawable
This really seems like an error in the type library, how do I ask Autodesk to fix it?
Dim bounds As Extents3d = DirectCast(txt.Bounds, Extents3d)
does not work since there is not a inheritance or implementation relationship to the typo.
Dim bounds As Extents3d = CType(txt.Bounds, Extents3d)
seems to work, but how do I get someone to fix the underlying problem? I think it effects every entity in the database since they all inherit from Drawable. Or did they do this on purpose for reasons that are beyond me?