Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Finding all jpg references in drawings

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Lisa_Pohlmeyer
2824 Views, 10 Replies

Finding all jpg references in drawings

I searched the group and the closest discussion I could find was here but there didn't seem to be a clear cut solution. http://forums.autodesk.com/t5/NET/How-to-programmatically-find-all-references-xref-dwg-jpg-pdf-OLE/m... I have a jpg file that I needed to apply some transparency to and saved it as a png file. I now want to delete the jpg file from the folder but it's being referenced in several drawings, andI don't know which ones. Is there a way to reverse the function of Reference Manager (perhaps with a different app), ie find all the drawing files that reference my jpg file?


Lisa Pohlmeyer
Civil 3D User
Website | Facebook | Twitter

10 REPLIES 10
Message 2 of 11
pendean
in reply to: Lisa_Pohlmeyer

Nothing built-in if I understood your need: try asking in on of these forums instead

 

Lisp Customization Discussion area:
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/bd-p/130

Visual Basic Customization Forum:
http://forums.autodesk.com/t5/Visual-Basic-Customization/bd-p/33

Autodesk ObjectARX Customization Forum:
http://forums.autodesk.com/t5/Autodesk-ObjectARX/bd-p/34

.NET Customization Forum:
http://forums.autodesk.com/t5/NET/bd-p/152

Message 3 of 11
abubakars
in reply to: Lisa_Pohlmeyer

I hope it is possible using Design Center but I have a work around to catch those files which has reference to a particular image file.

 

Here I use a tool BatchInDatabase which is available to download from Autodesk Exchange Apps as a Free tool.

 

Steps

1. add the list of files which you think that  there could be chances for the reference file attached or load all the files within a folder

2. add the command "image-Detach_Reload_unload" and select the file which has to be searched or use the Image name option

3. select uload option and apply the command to all the files which you have loaded in to Batch

4. Run the batch with "Do not Save option" as this will discard the changes and the batch status log will report the existance of such file.

 

As I have said this is not a straight forward answer to you but a work around to find the reference of image file in the drawing

The batch process is being done without opening the drawings, So the process will be quicker. Hope this will help you

 

Image-Unload.PNG

Message 4 of 11
Lisa_Pohlmeyer
in reply to: abubakars

To add a little more detail: The image is from ONE network location (it's a Highway sign that gets used on several projects). So, the drawings that it is used in are also in several different project folders. The BatchInDatabase 1.1 from the Exchange looks promising. Since I'm searching the entire network, there's 4614 files to search. We'll see. It would be VERY helpful if there were a Image-Replace function which I would think could be done. Am I correct in thinking "If it can be done manually, a macro could be created"?


Lisa Pohlmeyer
Civil 3D User
Website | Facebook | Twitter

Message 5 of 11

I downloaded the app and was careful to follow your directions. However, I'm getting an error. Is it perhaps related to the # of drawings I have? 4614 drawings, I changed the Max files per session to 5000 and tried again, same error. See attached image. I think I'm close.


Lisa Pohlmeyer
Civil 3D User
Website | Facebook | Twitter

Message 6 of 11
abubakars
in reply to: Lisa_Pohlmeyer

These is no image replace command available in the current version but the existing image can be detached and the new image file could be inserted using "Image-Insert" command.
The version which you have downloded is a free version which processess maximum of three files only but you can get the free license key to make it full version from CADManagerTools , send your license key request information to register@cadmanagertools.com.
Message 7 of 11
abubakars
in reply to: Lisa_Pohlmeyer

The warning message means you need to add the command to files, individual commands can be added to selected files.

 

Thers is a little learning curve is needed to use this tool to its full potential, for a quick learning watch the learning videos which are available in the below links and help file availble to  download

 

http://cadmanagertools.com/Downloads_BID.aspx

 

extract plot style from drawings

 

Rename layouts

 

Create Drawing list

Message 8 of 11
abubakars
in reply to: Lisa_Pohlmeyer

I think of replacing image from jpg to png by using another command "Xref-Redirect" which allows to use it as a find and replace action.

For example

case-1

You have an image "Test.jpg" which has been referenced in multiple files

You create another image with same name but different image type,  let us say "Test.png"

Since we are changing only the extension and path will remain same, so both images should be in the same folder, the command checks the file first for its location, if found then replace the name, thus the reference is changed to new image type.

 

image replace.PNG

 

case-2

You have an image "P:\ABC-123\DD\Iamges\Test.jpg" which has been referenced in multiple files

You have another image which is located in diffrent directory "P:\ABC-123\WD\Images\Test.jpg"

 

here we have a part of image path is different, the command parameter will be as below

 

image replace2.PNG

 

case-3

You have an image "P:\ABC-123\DD\Iamges\Test.jpg" which has been referenced in multiple files

You have another image which is located in diffrent directory "P:\ABC-123\WD\Images\NEW.png"

 

here we have a different path, file name and image type, the command parameter will be as below

 

image replace3.PNG

 

 

 

 

Message 9 of 11
abubakars
in reply to: Lisa_Pohlmeyer

Hi LisaPohlmeyer,

Please refe to below link and I have an updated command added "Image - Is Referenced" which will create csv files storing all the drawings which has rerence to a single or multiple images, have a look and let me know

 

http://forums.autodesk.com/t5/AutoCAD-2010-2011-2012-DWG/Reference-Manager/td-p/4719003

 

Regards,

Abubakars

Message 10 of 11
Lisa_Pohlmeyer
in reply to: abubakars

Is there a similar solution for replacing an image with a dwg? Images really aren't working for us anymore. As we are creating more exhibits at different scales, and having to scale the images as well, the resolution is becoming an issue. We'd like to replace the images with dwg files. BTW - thanks so much for your help. Your solutions are awesome!


Lisa Pohlmeyer
Civil 3D User
Website | Facebook | Twitter

Message 11 of 11
abubakars
in reply to: Lisa_Pohlmeyer

It is doable but it would take 2 processess,

1. Search files whish has reference to image using command "Image-Is Referenced" that create the drawing lsit

2.Load the drawings list in to the Batch process, add the commands, "Image-Detach" to remove the images and "Xref-Insert" or "Block-Insert" to insert your dwg files,

Hope this will be a solution that I could think of now, The tools BatchInDatabase and BatchInEditor are comes with multiple built-in commands, so there may be more than one way to get the job done using them.

 

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

Post to forums  

Autodesk Design & Make Report

”Boost