PDA

View Full Version : Getting a List of Attached Images



Marshal_Rosenberg60828
2004-06-18, 07:02 PM
Hi all,

How does one programatically get a list of image Filenames attached to a DWG file? (The list which appears with the Image Manager)

richard.binning
2004-06-25, 04:05 PM
Try this:



Public Sub LocalDeps_Images()
Dim myFileDeps As AcadFileDependencies
Dim myFileDep As AcadFileDependency
Set myFileDeps = ThisDrawing.FileDependencies
For Each myFileDep In myFileDeps
If myFileDep.Feature Like "Acad:Image" Then
ThisDrawing.Utility.Prompt "Image: " & myFileDep.FileName & " Found Path is :" & myFileDep.FullFileName & vbCrLf
End If
Next myFileDep
End Sub

Marshal_Rosenberg60828
2004-06-25, 04:54 PM
Outside of looking at each individual Object in Model and Paperspace, is there a way to get this list for pre - 2004 Drawings?

richard.binning
2004-06-25, 04:59 PM
It would be much faster to search using ObjectDBX with VBA outside of drawing. If you need to search this file while it is open, then you are at the mercy of searching each entity. Perhaps a quick save would solve your problem?

Marshal_Rosenberg60828
2004-06-25, 08:58 PM
Hi Richard,

I don't know anything about OBJECTDBX. Can you suggest a reference?

richard.binning
2004-06-25, 09:02 PM
Check this link (http://forums.augi.com/showthread.php?t=5145)out for a pointer...