ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

loading raster images

3 REPLIES 3
Reply
Message 1 of 4
Paul.Stardraw
626 Views, 3 Replies

loading raster images

Hi

I'm using RealDWG 2010 but the question applies equally to ObjectArx.

I'm loading drawing files which contain raster images, and during iteration of the model space block table, these are encoded as AcDbProxyEntity objects; specifically:

{code}
Autodesk.AutoCAD.DatabaseServices.ProxyEntity
base Autodesk.AutoCAD.DatabaseServices.Entity: Autodesk.AutoCAD.DatabaseServices.ProxyEntity
ApplicationDescription: "ISM"
GraphicsMetafileType: FullGraphics
OriginalClassName: "AcDbRasterImage"
OriginalDxfName: "IMAGE"
ProxyFlags: 2175
{code}

A few points of note:
1. If the original drawing is a DXF, then I can see quite clearly in the text file the IMAGE and IMAGEDEF entities, and the associated prperties and even the image paths.
2. inspecting the drawing within AutoCAD 2010 using the Inspector.arx plugin shows the block table rercords as AcDbRasterImages, so clearly AutoCAD is recreating these proxy entities at load time into RasterImages in the resultant block table.
3. I've read in the ObjectArx and RealDWG docs scant details about the Imaging Support Module (ISM) but it's not at all clear how this is used by a third-party application which loads a drawing.

Does anyone know how to convert the AcDbProxyEntity into the corresponding AcDbRasterImage and AcDbRasterImageDef?

Many thanks
Paul Clark
Stardraw.com
www.stardraw.com
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Paul.Stardraw

Paul:

> Does anyone know how to convert the AcDbProxyEntity into
> the corresponding AcDbRasterImage and AcDbRasterImageDef?

Only the object enabler can resurrect the proxy object. As long as the
ISM.arx is registered, and demand loading is enabled, this should occur
automatically when the file is loaded. There is no way for your code to do
anything more than load the ISM object enabler manually. 🙂
--
Owen Wengerd
President, ManuSoft <>
VP Americas, CADLock, Inc. <>
Message 3 of 4
Anonymous
in reply to: Paul.Stardraw

And, the object enabler portion (all that you've got for RealDWG) won't be a
.arx. It will be a .dbx. In this case its acismobj18.dbx (for AutoCAD
2010). For earlier AutoCAD releases, the number will be lower such as 17
for AutoCAD 2007 - 2009.

"Owen Wengerd" wrote in message
news:6230911@discussion.autodesk.com...
Paul:

> Does anyone know how to convert the AcDbProxyEntity into
> the corresponding AcDbRasterImage and AcDbRasterImageDef?

Only the object enabler can resurrect the proxy object. As long as the
ISM.arx is registered, and demand loading is enabled, this should occur
automatically when the file is loaded. There is no way for your code to do
anything more than load the ISM object enabler manually. 🙂
--
Owen Wengerd
President, ManuSoft <>
VP Americas, CADLock, Inc. <>
Message 4 of 4

Many thanks for both responses.

The ISM enabler was registered to demand load, but could not resolve all of its load-time dependencies at run-time.

Having fixed that, the loaded object model now contains correctly converted AcDbRasterImages.

Paul Clark
Stardraw.com
www.stardraw.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost