Well, it looks like there are real problems there, although
the DumpDWG utility must be getting a RasterImage
object, otherwise it couldn't dump its properties. I haven't
checked, but it could be that the RasterImage and/or the
RasterImageDef object have some sort of obscure API
dependence on AutoCAD (or acmdg.dll).
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6377890@discussion.autodesk.com...
When I read a DWG file that contains raster image using RealDWG 2011, there is
no exception, and no image.
TrueView 2011 confirms that there is a background image in this DWG file.The
RasterImage entity should be in a blockreference.
When exploding this block using BlockReferene.Explode method, there is no
RasterImage entity in the returned DBObjectCollection, only 1 polyline entity in
the collection.
Using DumpDWG sample compiled with RealDWG 2011 to dump this dwg file will show
a message box: "ObjectDBX SDK DumpDwg Sample has encountered a user-defined
breakpoint.", although I didn't put any breakpoint in the source code.
The last few lines DumpDWG shows are:
BlockTableRecord.UnmanagedObject System.IntPtr=114612032
Autodesk.AutoCAD.DatabaseServices.RasterImage:
- RasterImage.Width System.Double=2481
- RasterImage.ImageTransparency System.Boolean=False
- RasterImage.ShowImage System.Boolean=True
- RasterImage.Rotation System.Double=0
- RasterImage.Position Autodesk.AutoCAD.Geometry.Point3d=(2481,1754,0)
- RasterImage.Path System.String=
- RasterImage.Name System.String=618103 WANG - NUDE
- RasterImage.ImageWidth System.Double=2481
- RasterImage.ImageHeight System.Double=1754
- RasterImage.Height System.Double=1754
- RasterImage.Fade System.Byte=0
- RasterImage.Contrast System.Byte=50
- RasterImage.Brightness System.Byte=50
- RasterImage.DisplayOptions
Autodesk.AutoCAD.DatabaseServices.ImageDisplayOptions=Show
- RasterImage.PixelToModelTransform
Autodesk.AutoCAD.Geometry.Matrix3d=((1,0,0,0.5),(0,-1,0,1753.5),(0,0,1,0),(0,0,0,1))
- RasterImage.IsClipped System.Boolean=True
- RasterImage.ClipBoundaryType
Autodesk.AutoCAD.DatabaseServices.ClipBoundaryType=Rectangle
- RasterImage.Scale Autodesk.AutoCAD.Geometry.Vector2d=(2481,1754)
- RasterImage.Orientation
Autodesk.AutoCAD.Geometry.CoordinateSystem3d=((0,0,0),(2481,0,0),(0,1754,0),(0,0,4351674))
- RasterImage.ReactorId Autodesk.AutoCAD.DatabaseServices.ObjectId=(0)
- RasterImage.ImageDefId Autodesk.AutoCAD.DatabaseServices.ObjectId=(2129671240)
Autodesk.AutoCAD.DatabaseServices.RasterImageDef:
- RasterImageDef.ImageModified System.Boolean=False
- RasterImageDef.UndoStoreSize System.Int32=10
- RasterImageDef.FileDescCopy System.IntPtr=0
- RasterImageDef.ResolutionUnits Autodesk.AutoCAD.DatabaseServices.Unit=Inch
- RasterImageDef.ResolutionMMPerPixel
Autodesk.AutoCAD.Geometry.Vector2d=(0.169333333333333,0.169333333333333)
- RasterImageDef.FileType System.String=
- RasterImageDef.ColorDepth System.Int32=32
- RasterImageDef.Organization Autodesk.AutoCAD.GraphicsInterface.ImageOrg=RGB
- RasterImageDef.Size Autodesk.AutoCAD.Geometry.Vector2d=(2481,1754)
- RasterImageDef.IsLoaded System.Boolean=False
- RasterImageDef.IsEmbedded System.Boolean=False