I recently used Reference Manager to update xref paths for signature files on sheets (we recently switched servers). But I found after doing so that the Ref Manager unloads the xrefs so I want to use lisp to try to batch reload all dwgs in the specified folder and only the specified xref file names (I don't want to reload all xrefs). I have very little experience with writting lisp code.
Solved! Go to Solution.
Solved by paullimapa. Go to Solution.
Solved by paullimapa. Go to Solution.
It strikes me that you could use a dialog box to multiply select the xrefs to reload from a list_box, and then hit a "Reload" button.
Yes, it requires a little AutoLisp programming but I am occupied by my daughter and her family down from Maine for several days to celebrate my wife's birthday. But there are plenty of brainy lispers in this forum to help you out.
John F. Uhden
Yes, a GUI interface would be what I would be looking for (to make it simple for everyone in the office to use), I have a start of the code attached for the background process but am getting an error when I try to use it, and don't know what I am doing wrong. I have never tried to code lisp. I only had any code experience with C++ in college for a semester before I switched my degree, over 8 years ago.
You can use LeeMacs’s script writer to execute the same sequence of commands on an entire folder of dwgs
A sequence of commands to reload an xref:
-xref _repload the-xref-name
After reviewing your code it seems to me you may have taken a wrong turn, although I like your level of expertise as just a beginner.
If the xrefs were just unloaded and not detached, then you can find them in the blocks section of your drawing, complete with path, and just reload them. You don't need to search for the file locations. In fact, you don't need to know the file locations at all.
In fact in fact, you don't need any lisp at all. In your list of references you can just pick one that's unloaded, right click, and reload.
John F. Uhden
If your xrefs are located in the same place as your dwg then re-pathing should not be necessary, as the CAD will look there also for them.
I have never used LeeMac's scripting tool, when I try to run the command it comes back with this error, and I can't figure out what I am doing wrong. It is probably something stupid. See attached.
Should be -xref reload
and make sure you don’t have that dwg opened
I got it working!
Is there a setting for it to run in the background, so I can do something else while it runs, like the setting for plotting in the background?
For anyone else who is looking for a solution to the same problem here is the script.
_.open *file* -image reload [AttachedImageName] _.save _Y _Y _.close
_.open *file* -xref reload [xrefName] _.save _Y _Y _.close
*you need the second _Y for it asking if you would like to overwrite itself.
No setting to run this in the background for this method.
But there's another method with AcCoreconsole which does not even open AutoCAD's graphic window.
But I'm not sure you can open and work on AutoCAD while AcCoreconsole is running.
Can't find what you're looking for? Ask the community or share your knowledge.