Re-insert raster - scale/size changes?!?

Discussion in 'AutoCAD' started by rjlohan, Oct 1, 2004.

  1. rjlohan

    rjlohan Guest

    Hi,

    As part of our software product, I need to be able to manipulate the path of a raster file (basically make it a relative path). The only way I know to do this (AutoCAD 2004 VBA Automation) is to remove the raster and reattach it from its new path.

    One hitch here is that in this process, the raster is not available at its new location when I want to add it, so what I do is create a dummy file (using a blank raster image) and attach that file using the geometry (scale, image height/width, origin) of the original raster.

    At this point, if I open my parent .dwg file, I see the 'raster not found' error message in a white box which is the correct size for the drawing.

    All I need to do to complete this process is to move the original raster to the new location and rename it over the dummy raster file.

    It's at this point that things seem to go wrong - when I now open my parent .dwg file, the old raster's dimensions are all out of whack. It is now completely the wrong size.

    My current guess is that when I reattach the dummy raster, something to do with the size of the blank raster image is being persisted into the.dwg so that simply replacing the file is not enough to maintain the original raster's geometry...


    Can anyone advise what I need to do to achieve my goal here? (Which is basically just to modify the saved path of the raster from a complete to a relative path) ?
     
    rjlohan, Oct 1, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.