Code Red > VB(A)

change raster image path in multiple files

(1/3) > >>

andySMI:
Hi group
I need to move thousands of dwg files. I have written a routine in VB6 that walks the directory structure, finds each file and using objectdbx, changes the xref paths to match the new location.
I need to do the same with the paths of the raster images. Using objectdbx I can locate the dictionary object 'ACAD_IMAGE_DICT'. I can loop through the dictionary object and get the name of the image, an object ID and a handle but cannot figure out how to access the object's properties. The object I can access is an acdbRasterImageDef object.
This is a one shot deal, I need to use this routine just once to move the files. I like the speed of the objectdbx interface but would be willing to use any programming method to do the job.
I'm migrating from xp to Win7 and from acad 2006 to acad 2012, have vb6 and VS2010 so can use any of the languages or versions mentioned. My lisp is a little rusty, know a little C++ and I'm learning .net but VB(a) is my most famliar.

andySMI:
OK... I wrote another routine that uses the regular Acad VB interface (not objectdbx), loops through the drawings, finds any image objects and changes thier paths. It's slower then using objectdbx (takes about 3 to 4 times longer) but it would work.
Only problem is one of the drawings threw up a dialog box prompting the user to click OK button and program halts waiting for a reply. The dialog was 'Newer Version AEC Objects Detected'. All the typical dialog boxes asking for missing linetypes ect are skipped but this one. This program will take hours to run and I was planning on running it overnight unattended.
Anyway to clear such dialogs programically?

andySMI:
ok... now I'm getting the feeling I'm talking to myself.
Funny thing I've noticed testing this application. When I go back and open the drawings, all the paths for xrefs and images are changed but the little bubble pops up and says xrefs need reloaded. When I go into the xref manager, all the paths are correct and acad has found all the xrefs in thier new locations, but they still say they need reloaded. I reload all of them, save the drawing, close it and reopen it and it says they need reloading again. It isn't until I've opened ever xrefed drawing and saved it that it stops prompting me to reload them. A minor annoyance but still...
Anybody got any idea why?
comments?

M-dub:

--- Quote from: andySMI on March 14, 2012, 04:45:29 pm ---ok... now I'm getting the feeling I'm talking to myself.
Funny thing I've noticed testing this application. When I go back and open the drawings, all the paths for xrefs and images are changed but the little bubble pops up and says xrefs need reloaded. When I go into the xref manager, all the paths are correct and acad has found all the xrefs in thier new locations, but they still say they need reloaded. I reload all of them, save the drawing, close it and reopen it and it says they need reloading again. It isn't until I've opened ever xrefed drawing and saved it that it stops prompting me to reload them. A minor annoyance but still...
Anybody got any idea why?
comments?

--- End quote ---

First of all, welcome to theSwamp. :)
These xrefs... did they give you any warnings when you opened them?

I don't know if you've seen this thread, but I've got my own image pathing issues...

M@yhem:
We all have "issues", Dub.  :)


As for the AEC message, once you toggle on the "don't ever show me this freaking message again" option and click ok, you should be good to go with your program and shouldn't see the message again.

Navigation

[0] Message Index

[#] Next page

Go to full version