Automated LISP Xref Tool

Automated LISP Xref Tool

Anonymous
Not applicable
398 Views
4 Replies
Message 1 of 5

Automated LISP Xref Tool

Anonymous
Not applicable
Hello,
I'm sorry this post might not be in the right place. The firm I work for is
primarily Microstation. We have a few seats of AutoCAD 2000, and only
limited experience with it. An associate firm we are working with on a
project did the construction documents for a project in AutoCAD with our
firm doing construction management and admin. Needing to make changes,
revisions, etc will be done using a CD they burned with the entire project
directory on it. The problem lies in that all the Xrefs for some 400+ files
are linked to their project directory ie.
g:\projectype\constructiontype\projectname\detail\detailtype\filename.dwg
and our directory looks something like this
m:\projectnumber\constructionphase\details\detailtype\filename.dwg

Is there a LISP file or alternative means to updating all the Xrefs in those
400+ files without manually having to go into each file and update them?? In
MS we have an xref manager program that would automatically update that for
us, but being AutoCAD we have no such tool.

Any help would greatly appreciated.

Gordon McKenzie
Dallas, Texas
0 Likes
399 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Did you realize that if you put all the dwgs in the same folder, autocad
will find the xrefs automatically even though they have a saved path that
doesn't exist on your machine?
Probably so, but just thought I'd mention it.
It sounds like you want to keep the "main" drawings in one folder and the
xrefs are detail drawings kept in another folder?
Do you know about the projectname system variable?
You could create a project and point it to your xrefpath then set the
projectname in each dwg, but you'd still need a way to automate that for
your 400 dwgs.

Are your 400 dwgs the 'main dwgs' which call xrefs, or are they the xrefs
themselves which may be called from a smaller number of 'main dwgs'?

sounds like a fun challenge so I'm working on something in vb that will do
that for you using objectDBX.
probably one of the experts here will shoot you a solution before I get done
with mine but if not, I'll continue with this when I have time and try to
help out.

I assume the files will be copied from the cd to a local or network drive?
Further, I'm sure you realize the files will need their readonly attribute
unchecked after copying from cd in order to modify them.

Are the xref paths exactly as you wrote them?
Do all xrefs share the same exact existing path(except for drawing name of
course)?
Do any xrefs have paths you don't want to change or do you want the same
path on all xrefs in all drwgs, regardless of original path?

Do you really want to hardcode your path or do you just want a relative
path(strip all path info except dwg name) so if all dwgs are in the same
directory then autocad will find them without a path? (probably not?)


What is the path name of the directory into which you will copy the files
from cd?

Is this a one time deal or are you looking for a professional quality tool
with dialog interface where you can browse to the directory containing the
drawing files, enter old path, new path etc?

I could hard code the path values and make a quick and dirty solution to
your immediate problem but it would take longer to make a polished full
fledged program.

I assume you needed this like a couple hours ago?

and then if you succeed in changing all the paths will you need to send the
dwgs back to their source company? in which case they will be faced with the
same problem you have now?

I'll keep an eye on the board to see if I should keep working on this.
Mark

"Gordon M." wrote in message
news:82D8C8F5457125BF49AADC57460E6F98@in.WebX.maYIadrTaRb...
> Hello,
The problem lies in that all the Xrefs for some 400+ files
> are linked to their project directory ie.
> g:\projectype\constructiontype\projectname\detail\detailtype\filename.dwg
> and our directory looks something like this
> m:\projectnumber\constructionphase\details\detailtype\filename.dwg
>
0 Likes
Message 3 of 5

Anonymous
Not applicable
If your project isn't already using it, use the OpenDWG's ODX library.
With it, itt'll take about an hour to code the project. I have a
hardcoded one that I can email you that does exactly what you want -
it'll just have to wait til I get in the office on Monday:)

Let me know.
___________________________
Mike Tuersley
AutoCAD Clinic
Rand IMAGINiT Technologies
0 Likes
Message 4 of 5

Anonymous
Not applicable
Hi Mike,
Not sure if you were talking to me or Gordon.
In any case I'm not familiar with opendwg or odxlib, but always interested
to learn something new.
To that end I'd appreciate seeing the code also.
Didn't have time to work on this over the weekend as i had hoped but the
more i thought about it the more i realized there'd need to be some way to
display all existing paths and allow a user to choose which ones to change
and what to change them to.
I'm extrapolating from how he worded the paths involved that there would be
multiple paths involved, not just as simple as making all xrefs have one
path. It quickly got more complicated than I was at first thinking - change
one path to another path for all xrefs.
In my dwgs there would usually be a maximum of two possible xref paths and
at times we do have situations where outsources send in dwgs with hard paths
I need to change, which so far have been few and far between so I've just
been using lisp to strip paths, but I haven't had 400 dwgs to process at a
time so I haven't bothered setting up an odbx solution yet.
the changing of the paths seems trivial, the part I'm still pondering is the
user interface, deciding how to display existing ones and how to link
multiple existing paths with multiple resulting paths and providing method
to replace only some or all or ???/
etc.

in the event you were speaking to me...
> With it, itt'll take about an hour to code the project.
probably should be worded:
"it would take *me*(M.T.) about an hour to code the project."
...since if it would take *you* an hour it would take me(mp) about a month!
:-)~

"Mike Tuersley" wrote in message
news:MPG.1a3bb59fd45962f39897c4@discussion.autodesk.com...
> If your project isn't already using it, use the OpenDWG's ODX library.
> With it, itt'll take about an hour to code the project. I have a
> hardcoded one that I can email you that does exactly what you want -
> it'll just have to wait til I get in the office on Monday:)
>
> Let me know.
> ___________________________
> Mike Tuersley
> AutoCAD Clinic
> Rand IMAGINiT Technologies
0 Likes
Message 5 of 5

Anonymous
Not applicable
If you are Using AutoCAD 2000 you might want to use the XPATH routine that
comes with the Express Tools of AutoCAD This has solved the problem for me
in many situaitions where I had to change paths to XREF's in multiple
Drawings.

Hope that Helps,

Roberto,

PS: I Believe (if I'm not mistaken) the Express Tools are in the AutoCAD CD
but you have to install them manually is not part of the main Installation
of AutoCAD.
http://www.cd-cad.co.nz/dl_active99.htm
http://www.cd-cad.co.nz/downloads/express-tools-descript.htm

Also DotSoft makes a tools for the same purpose.
http://www.dotsoft.com/express.htm


Description of XPATH:

Xref Repathing XPATH
This nifty utility allows you to redefine Xref paths for multiple
drawings without opening them. You can replaceeither the full Xref path or a
portion of the path.


"Gordon M." wrote in message
news:82D8C8F5457125BF49AADC57460E6F98@in.WebX.maYIadrTaRb...
> Hello,
> I'm sorry this post might not be in the right place. The firm I work for
is
> primarily Microstation. We have a few seats of AutoCAD 2000, and only
> limited experience with it. An associate firm we are working with on a
> project did the construction documents for a project in AutoCAD with our
> firm doing construction management and admin. Needing to make changes,
> revisions, etc will be done using a CD they burned with the entire project
> directory on it. The problem lies in that all the Xrefs for some 400+
files
> are linked to their project directory ie.
> g:\projectype\constructiontype\projectname\detail\detailtype\filename.dwg
> and our directory looks something like this
> m:\projectnumber\constructionphase\details\detailtype\filename.dwg
>
> Is there a LISP file or alternative means to updating all the Xrefs in
those
> 400+ files without manually having to go into each file and update them??
In
> MS we have an xref manager program that would automatically update that
for
> us, but being AutoCAD we have no such tool.
>
> Any help would greatly appreciated.
>
> Gordon McKenzie
> Dallas, Texas
>
>
>
>
0 Likes