Author Topic: Image Path Options  (Read 11804 times)

0 Members and 5 Guests are viewing this topic.

M-dub

  • Guest
Image Path Options
« on: April 06, 2011, 04:33:30 PM »
I'll apologise for a confusing post ahead of time... Sorry.

This is from the help file.

Quote
Path Type

Specifies one of three types of folder path information to save with an attached image: an absolute path, a relative path, and no path. For a complete description of each option, see Set Paths to Referenced Drawings in the User's Guide.

Full Path
Specifies the absolute path to the image file.

Relative Path
Specifies a relative path to the image file.

No Path
Specifies only the image file name. The image file should be located in the folder with the current drawing file.

Any tests I've done to try to PROVE these options work as they say they do have apparently been foiled by our EDMS because it 'keeps track' of the files for us (in most cases).

Our issue:

Master Drawings reside in read only folders / libraries.  In this case, I'm referring to hybrid drawings where ABC-1234.DWG has ABC-1234.GP4 attached to it.
When we need to modify one of these scanned drawings, we sign it (the .dwg and .gp4) out to a separate work area and update as required and save.
When the drawing is 'As Built', it gets signed back into its library.
-Here's where the confusion begins-
When someone views the drawing with an external viewer, the drawings often come up showing the image's frame only. (plus any vector objects added to the dwg) because the drawing was last saved, referecing the .gp4 in the work area that no longer exists. ( FULL PATH, right? )
We CAD guys don't notice this because our EDMS (Adept) knows where all the files came from and went.
I thought that inserting the image with NO PATH meant that as long as the two files reside in the same directory that there would be no issues.

I don't have access to a machine that I can get access to our drawings WITHOUT our EDMS, so I can't test it.  Can someone confirm that NO PATH is the option I want to use, keeping our 'workflow' in mind?

Let me know if it's not clear enough.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Image Path Options
« Reply #1 on: April 06, 2011, 04:51:26 PM »
That is how we do it also.  I wonder if the viewing program doesn't work the same as autocad?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

M-dub

  • Guest
Re: Image Path Options
« Reply #2 on: April 07, 2011, 08:27:21 AM »
I just want to make sure that the dwg will load the image that is in the same folder.

M-dub

  • Guest
Re: Image Path Options
« Reply #3 on: April 07, 2011, 09:06:01 AM »
And the second thing I want to figure out is how to set the default if it's even possible.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Image Path Options
« Reply #4 on: April 07, 2011, 11:01:55 AM »
With Acad, it will load if it's in the same folder.  I don't think I have ever had an issue with it not.

I don't know what you mean by default.  Here is what the help says about image paths

Quote
To locate the image file, the program searches the following paths and folders in the following order:

Path specified when the image was attached
Folder containing the current drawing file
Project search paths specified on the Files tab of the Options dialog box
Support search paths specified on the Files tab of the Options dialog box
Start In folder specified in the program shortcut

And that is how mine works, even for xrefs.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

M-dub

  • Guest
Re: Image Path Options
« Reply #5 on: April 07, 2011, 11:28:16 AM »
Sorry, by default, I'm referring to the path setting when an image is drag & dropped from Explorer, etc.

I'll post back when I find out more.

Thanks Tim.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Image Path Options
« Reply #6 on: April 07, 2011, 11:44:00 AM »
You're welcome Mike.

Funny.  I just tried what you said, and it didn't even work for me.  It doesn't know the ' -image ' command when dragging in the file, but you can type it, and it will work.  It looks like it is running a lisp routine to attach the image, at least here it is '09 Elec, named ' imagefile ', where you need to supply a path to it.
Quote
Command: (imagefile "C:/test/test.TIF")
Unknown command "-IMAGE".  Press F1 for help.
Unknown command "ATTACH".  Press F1 for help.
Unknown command "C:/test/test.TIF".  Press F1 for help.

Maybe if you redefine the lisp, you can change the default path to the image.  Just a guess though, and I don't know where that lisp is defined.  To see if yours is the same, just drag it in, and after it's done, hit the up arrow key to see what command it called.  Just a little FYI that I found out just now.

Sorry for the ramble.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

M-dub

  • Guest
Re: Image Path Options
« Reply #7 on: March 13, 2012, 02:36:16 PM »
Old post, but a) it's mine and b) I need to revisit it.  :)

I still haven't been able to find out where or IF we can set the default Path Type to NONE.

I would also like to know how you change the path type of an image already inserted into the drawing.

If anyone knows...

Dinosaur

  • Guest
Re: Image Path Options
« Reply #8 on: March 13, 2012, 02:43:39 PM »
Will the setting persist if you set it in your DWT?

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Image Path Options
« Reply #9 on: March 13, 2012, 07:15:41 PM »
I do not know of a setting but in registry there is
 
ISM

 
 
And for the dialog box under Dialogs

 
Xattach

BlackBox

  • King Gator
  • Posts: 3770
Re: Image Path Options
« Reply #10 on: March 14, 2012, 12:29:49 AM »
If simply setting a registry key is not persistent, then just use a (command?) reactor to modify the attached images path programmatically.

I have a reactor 'shell' I can offer as a strafing point, if that becomes necessary (I use it to set a specific layer current when bringing in images, XREFs, etc.).
"How we think determines what we do, and what we do determines what we get."

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Image Path Options
« Reply #11 on: March 14, 2012, 08:03:24 AM »
But will the external viewer still be able to view the image files if they're in the same location as the drawing?
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Image Path Options
« Reply #12 on: March 14, 2012, 01:56:12 PM »
The 2013 xref command has had a bit of an update allowing users to edit the saved path directly in the Attach dialog box.  I'd be surprised if the image command didn't get the same treatment.

http://www.cadalyst.com/cad/autocad/autocad-2013-almost-here-14333?page_id=3
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

M-dub

  • Guest
Re: Image Path Options
« Reply #13 on: March 14, 2012, 02:23:38 PM »
Interesting...

I'm going to try a couple things and post back later... Still would like to know if anyone knows how to change the path to NO PATH without detaching the image and reattaching it...  I wish this was one of the image's properties.

danallen

  • Guest
Re: Image Path Options
« Reply #14 on: March 14, 2012, 06:21:03 PM »
In 2005 I have the bonus command "REDIR" to change paths of images and xrefs, and the lisp does an ENTMOD on the image dictionary, group code 1.  I could post the code except for the license agreement. PM me and I can send you the code.

Dan

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Image Path Options
« Reply #15 on: March 14, 2012, 09:25:58 PM »
Maybe this will help Mike.

Code: [Select]
(defun _stripimagepath (/ el imgdef path)
  (if (setq imgdef (cdadr (member '(3 . "ACAD_IMAGE_DICT") (entget (namedobjdict)))))
    (foreach x (entget imgdef)
      (and (eq (car x) 350)
   (setq path (cdr (assoc 1 (setq el (entget (cdr x))))))
   (setq path (strcat (vl-filename-base path) (vl-filename-extension path)))
   (findfile (strcat (getvar 'dwgprefix) path))
   (entmod (subst (cons 1 path) (assoc 1 el) el))
      )
    )
  )
  (princ)
)
(_stripimagepath)
« Last Edit: March 19, 2012, 10:49:00 AM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Image Path Options
« Reply #16 on: March 15, 2012, 01:36:18 AM »
I believe all that needs to be done is grab the 'RasterImageDef' that the RasterImage uses from 'ACAD_IMAGE_DICT' in NOD and set its SourceFileName to just the picture file.
 
 

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Image Path Options
« Reply #17 on: March 15, 2012, 11:48:14 AM »
You get this figured out Mike?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

M-dub

  • Guest
Re: Image Path Options
« Reply #18 on: March 15, 2012, 11:52:11 AM »
No yet.  I have had a few little fires to put out this morning and have a doc's appointment this afternoon... I can't get to it until tomorrow morning.

I will post back though.

Thanks!

ANDYSMI

  • Guest
Re: Image Path Options
« Reply #19 on: March 16, 2012, 10:50:15 PM »
Hi Mike:
You replied to my thread in the VB forum about xref and image file paths. I got to thinking about this thread and did some experimenting and have learned some stuff and might have a solution to your issue or at least shed some light on it. The one caveat is that I did this in 2006, not sure it will work in other versions.
You asked:
Still would like to know if anyone knows how to change the path to NO PATH without detaching the image and reattaching it... 
What I find is this. If I open a drawing with some images attached, I go into the image manager and click on one of the images in the list, the 'Image found at' textbox becomes enabled along with the 'Browse...' and 'Save Path' buttons. We all know we can use this button to fix a broken path. By clicking 'Browse...' we can navigate to a file location, select the file in the 'Select Image File' dialog box and hit open and when we are returned to the image manager, our new path is in the 'Image found at' textbox. We can then click the 'Save Path' button and our new path will be saved as the path of that image. What I found was that you can also use the 'Image found at' textbox, 'Browse...' button and 'Save Path' button to 'fake' a relative path or even no path. Heres how. For a relative path, you just manually type in what AutoCAD uses for a relative path or for no path you just erase or leave blank the 'Image found at' textbox and then click the 'Save Path' button. Done! Now... when you do this you are greeted with a little popup dialog box that says 'Active path is invalid' But if you click 'OK' (the only choice) and then click 'OK' to close the image manager, when you reopen it, sure enough, it now lists your homemade relative path or no path in the list above in the 'Saved Path' column. If you save and close the drawing and reopen it, it sticks. Try it, it works!!! Problem solved Mike?
Now for those of you who may be playing along at home and are wondering how to manualy type in a relative path, you type in a path exactly how AuotCAD creates one when you insert an image and choose relative path from the 'Path Type' dropdown. Make one to see. Lets say we are working in a drawing in a directory named 'Client_Name'. We insert a new image into the drawing by clicking the 'Attach...' button in the Image Manager. We choose an image file and click 'Open' in the 'Select Image File' dialog box. Now we're in the 'Image' Dialog box where we can select an insertion point, scale and rotation as well as pick a 'Path Type' so we pick 'relative path' and click OK and insert our image. Now go back and open the Image Manager and look at the 'Saved Path' column for the image we just inserted. Suppose the image file was in a sub-directory of the 'Client_Name' directory named 'Design'. The relative path will read .\Design\OurImageFile.TIF The leading period means 'This directory'. (anybody who knows Linux has seen this)
You can change the path of an already inserted image to a 'relative' path by typing something like the above into the 'Image found at' textbox and clicking 'Save Path'. When you do you will be greeted by a little popup dialog box that says 'Image file not found. Do you really want to use this path' (I'm not kidding) with 'Yes' and 'No' buttons. Click 'Yes', you will the be greeted by the 'Active path is invalid' dialog mentioned above. Again click OK, close the Image Manager, save the drawing, close it and reopen it and sure enough your relative path works like the real deal. By the way the 'Image file not found' dialog box pops up wheather you type in a legitamate good path or not so don't be discouraged. Also, syntax and spelling include case (upper or lower) count so be careful typing.
So anyhow.... for anybody who hasn't fallen asleep and is still reading this, it is my personal opinion that there is no property or system variable that defines 'path type' in the program. I believe that the 'Path Type' dropdown box in the insert dialog just tells AutoCAD how to format the path. If you choose 'full path' it saves the full path, if you choose 'relative path' it formats it like above and if you choose 'no path' it doesn't save anything in the path property. I believe the registry setting Jeff H. found in the prior post is simply a place the program stores the setting so when you reopen the dialog box next time, your previous choice reappears. That is what the registry is for, saving user settings and such so when you open a window for instance, it reappears in the same place on the screen as when you last had it open. In this way, when you reopen the Image manager, your choice the last time you used 'path type' is still there. I don't think there is a 'default' setting for it.
« Last Edit: March 17, 2012, 01:02:44 AM by andySMI »

M-dub

  • Guest
Re: Image Path Options
« Reply #20 on: March 19, 2012, 08:34:27 AM »
Nice!  I will try this when I get back to the office... Off work with a sick kid today.  :(

Thanks a lot for looking into this, Andy!

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Image Path Options
« Reply #21 on: March 19, 2012, 10:32:03 AM »
From my limited testing, you could add this to your startup and then the paths would be stripped upon open (if found in the same directory).
http://www.theswamp.org/index.php?topic=37809.15

Not sure how to set the default attachment type though.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

M-dub

  • Guest
Re: Image Path Options
« Reply #22 on: March 19, 2012, 10:44:11 AM »
From my limited testing, you could add this to your startup and then the paths would be stripped upon open (if found in the same directory).
http://www.theswamp.org/index.php?topic=37809.15

Not sure how to set the default attachment type though.

Hmmm... That sounds mighty interesting, too!  Thanks, Ron!

KewlToyZ

  • Guest
Re: Image Path Options
« Reply #23 on: March 29, 2012, 08:56:17 AM »
Just out of curiosity, Does anyone use Reference Manager? :|

M-dub

  • Guest
Re: Image Path Options
« Reply #24 on: March 29, 2012, 08:58:20 AM »
Yep, I does!

BlackBox

  • King Gator
  • Posts: 3770
Re: Image Path Options
« Reply #25 on: March 29, 2012, 09:08:41 AM »
Just out of curiosity, Does anyone use Reference Manager? :|
Yep, I does!

1+
"How we think determines what we do, and what we do determines what we get."

KewlToyZ

  • Guest
Re: Image Path Options
« Reply #26 on: March 30, 2012, 08:34:51 PM »
Just out of curiosity, Does anyone use Reference Manager? :|
Yep, I does!

1+
I just always wondered why Reference Manager wasn't part of the XREF manager functionality, and part of it is the way the drawing database mounts when opened as near as I can figure it.

BlackBox

  • King Gator
  • Posts: 3770
Re: Image Path Options
« Reply #27 on: March 31, 2012, 07:16:10 PM »
Speculating... I would think that is due to needing to manipulate the reference paths outside of AutoCAD, no? AFAIK - Reference Manager doesn't work on drawings that are open in editor.
"How we think determines what we do, and what we do determines what we get."