Author Topic: X-refs and different directories  (Read 3945 times)

0 Members and 1 Guest are viewing this topic.

TJAM51

  • Guest
X-refs and different directories
« on: July 06, 2005, 09:40:28 AM »
I work for an MEP firm. In our drawing directory setup we have three main directories for our working / engineering drawings. The directories are DD, SD, and CD. We begin a project in our DD directory and as the project progresses we will move copy our drawings to the next directory and begin the next phase of design. For example we go from DD to SD to CD. When we start off our x-refs are pathed from the directory it started with. When we copy the drawings to the next directory the path from the previous is still shown. Is there a simple way to modify the pathing without having to go into every drawing and re-path the xref?


Thanks

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TJAM51

  • Guest
X-refs and different directories
« Reply #2 on: July 06, 2005, 10:22:18 AM »
I was hoping to receive an answer within a reasonable amount of time. I could spend days on the search engine.

hudster

  • Gator
  • Posts: 2848
X-refs and different directories
« Reply #3 on: July 06, 2005, 10:27:55 AM »
depends on the version if you have AutoCAD 2004, you could use the refernce manager utility that came with it and re-path every xref in one go.

You could also write a script for it and use EZscript pro to do the work.

It depends on how you want to go.
Here is a short script

Code: [Select]
-xref
path
*
"new path here"
qsave
;;end of script
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
X-refs and different directories
« Reply #4 on: July 06, 2005, 10:31:49 AM »
Quote from: TJAM51
I was hoping to receive an answer within a reasonable amount of time. I could spend days on the search engine.

Sorry, I wasn't trying to be a smart a$$.
I just copied the wrong link. :oops:
Here are a few.
http://www.theswamp.org/phpBB2/viewtopic.php?t=1936&highlight=xref+path+update

http://www.theswamp.org/phpBB2/viewtopic.php?t=2294&highlight=xref+path

http://theswamp.org/phpBB2/viewtopic.php?p=15132#15132

Looks like Hudster has an answer for you though.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TJAM51

  • Guest
X-refs and different directories
« Reply #5 on: July 06, 2005, 10:31:55 AM »
I am using 2004...when you speak of the reference manager are you talking about the XREF manager.....if so I just looked and could not determine how you could do all in one fell swoop...


Thnaks

hudster

  • Gator
  • Posts: 2848
X-refs and different directories
« Reply #6 on: July 06, 2005, 10:33:34 AM »
I don't have 2004 so I can't give you a run through.

I edited my last message and added a script, this will do what you want, use any script program to do the hard work for you.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

TJAM51

  • Guest
X-refs and different directories
« Reply #7 on: July 06, 2005, 11:00:32 AM »
Here is the script I modified........my problem may lie in the way the directory was set up.......I have alos included my error message.....



Script:

-xref
path
*
M:\DALLAS PROJECTS\705197\CD
qsave
;;end of script



Error Message:

Command: -xref
Enter an option [?/Bind/Detach/Path/Unload/Reload/Overlay/Attach] <Attach>:

Enter name of file to attach: path
Attach Xref "path": path.dwg
"path.dwg" cannot be found.
*Invalid*

whdjr

  • Guest
X-refs and different directories
« Reply #8 on: July 06, 2005, 11:11:12 AM »
I believe the express tools has a couple of tools for this:

1)  redir

2)  I don't remember the secon one.(sorry)

hudster

  • Gator
  • Posts: 2848
X-refs and different directories
« Reply #9 on: July 06, 2005, 11:13:35 AM »
you need to enter paths in autocad with a forward slash and in quotes if you have a space in the name

try this

Code: [Select]
-xref
path
*
"m:/dallas projects/705197/cd"
qsave
;;;end of script
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

CADaver

  • Guest
Re: X-refs and different directories
« Reply #10 on: July 06, 2005, 11:19:25 AM »
Quote from: TJAM51
I work for an MEP firm. In our drawing directory setup we have three main directories for our working / engineering drawings. The directories are DD, SD, and CD. We begin a project in our DD directory and as the project progresses we will move copy our drawings to the next directory and begin the next phase of design.
Might I suggest that, while that method was workable for earlier versions of AutoCAD, it may be time to re-design your working procedures.  Failure to re-direct just one XREF to the new directory prior to issue could be a major problem in construction.

hudster

  • Gator
  • Posts: 2848
X-refs and different directories
« Reply #11 on: July 06, 2005, 11:23:05 AM »
try this lisp I founbd on AUGI

this routine by Peter Jamtgaard was designed to update the paths of all xrefs in the drawing to the current directory

 
Code: [Select]
; Repath all instances of existing xrefs.
; by: Peter Jamtgaard <cordeck@acronet.net>
(defun C:XREPATH (/ CNT ENAM EOBJ SSET )
 (vl-load-com)
 (vlax-for BLKOBJ  
  (vla-get-blocks
(vla-get-activedocument
(vlax-get-acad-object)
)
  )
  (if (= (vla-get-isxref BLKOBJ) :vlax-true)
   (progn
(setq SSET (ssget "x" (list (cons 2 (vla-get-name BLKOBJ))))
 CNT  0
)
(if SSET
(repeat (sslength SSET)
 (setq ENAM (ssname SSET CNT)
CNT  (1+ CNT)
EOBJ (vlax-ename->vla-object ENAM)
 )
 (vla-put-path EOBJ
(strcat
; (getvar "dwgprefix")
(vl-filename-base
 (vla-get-path EOBJ)
)
".dwg"
)
 )
)
)
   )
  )
 )
 (prin1)
)
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

TJAM51

  • Guest
X-refs and different directories
« Reply #12 on: July 06, 2005, 11:33:31 AM »
I must be doing something wrong...I used your last script and I still received the same error message. I used the redir command and it appears you still have to type in a lengthy path which again it does not seem to reconize...possibly due to the spaces in the path name.

TJAM51

  • Guest
X-refs and different directories
« Reply #13 on: July 06, 2005, 11:43:08 AM »
I agree 100% about the working procedures but our management is quite the stubborn one and refuses to change anything...of course he is the president and with that what can on do. I tried to use the lisp routine but nothing happened. I may be up against a wall with no ladder to climb with....thanks guys...really appreciate it.....

pmvliet

  • Guest
X-refs and different directories
« Reply #14 on: July 06, 2005, 12:06:25 PM »
Do your file names change from SD, DD, to CD?
That would throw another wrench in the works.

Reference Manager was in the extensions package for 2002, but is now in 2004 and you can find it under Start, Programs, Autodesk, AutoCad 2004, Reference manager. As long as you have the default install.

Pieter