Hi everyone.
I have a single base file that I need to insert into about 50 separate drawings, is there a quick way of doing this in one hit? Don't really want to have to open each one in turn.
I have Autocad, Civil 3D and Map3d at my disposal if that helps, (although I'm mostly experienced with Autocad)
Thanks.
Solved! Go to Solution.
Solved by TheCADnoob. Go to Solution.
This one is a bit of a journey and doesn't really use much traditional AutoCAD but it'll get the job done.
We are going to look at using AutoCAD core console. Below is a screencast of the process.
First you need to set up your files in a folder so as to only impact the files you want to add the xrefs to. It will apply it to every dwg in a folder so make sure you do due diligence to only affect the files you want.
Next you are going to need to create two files. One will be a bat file which will do the Batch operation and the other will be a script file that will handle the xref application. I will try to attach the two files. (i tried attaching the files but the forum didnt like the .bat and .scr extension so i have changed them to text. Just remove the .txt extension and they should be good to go)
You will need to tailor the files to meet your conditions such as file localisations, script locations and the location of your core console application. you may have to tinker in the script file as well if you need the xref at a location different than 0,0.
Once the foot work is done, its almost magical to see it run through saving you the hours of opening each file and applying the xref. Its a kind daunting task if you are not used to this sort of thing but its really not to bad once you get in it. I have also done a walk though on my webpage though its not specific to your needs and i tend to be crass there.
CADnoob
CADnoob, outstanding reply, clear, concise and no BS. Thanks for the help!
Adam.
The bat files operate in the command window which is like DOS. The structure of the bat file is very similar to old DOS .bat syntax (if not exactly the same, but i dont know enough to say that definitively).
AutoCAD coreconsole is a program that runs in the command window (unless suppressed). The actual AutoCAD operations are not DOS as the are executed by coreconsole. Coreconsol is AutoCAD without a GUI. You can just open up a windows command window and run AutoCAD coreconsole solely from the command window so it will look everything like running it all from DOS.
CADnoob
Thanks! This is the first time I hear about this after 14 years of working with AutoCAD! I know a little of DIESEL and LISP! Where do I start if I want to learn more about Core Console?
I haven't found much out there but i havent look much either. I did my walkthough but all my stuff was basicaly sourced from these Two sources; https://autocadtips1.com/2013/01/30/up-and-running-with-the-2013-core-console/
CADnoob
Hi, firstly thankyou for posting this.
I have tried to amend your files to suit the file paths for where my drawings and xefs are saved, and the location of the where the acaccoreconsole.EXE is saved and I am getting an error message.
can you advise where I have gone wrong please?
Cheers
Ryan.
Those kinds of errors can have multiple causes unfortunately.
That said is your script in a trusted location?
CADnoob
Hello Sir,
Could there be away to insert the Xref at layouts only?
Thanks in advanced.
Thanks for the quick reply.
Is not the TILEMODE=0 required to open the dwg? Or Do I just need to add in the .bat or .scr?
I can insert the Xref in Layout, only if it was saved as the layout is active.
I want to insert the Xref file without having to open the dwg whether the model or layout is active but insert in layout space.
Does it make sense? I am sorry if it is hard to understand. I am not really good at English. It is my second language.
Thanks in advanced.
Sorry for the late reply. That would be doable but im not certain this would be the best approach for doin that. The time it would take to create the script might be better spent just performing the actions. If the insert locations are at a set interval you could probably use a list to do it which could be called form core console, but again not sure that would be the best way to handle that. It might be better to just do a lisp (or VBA) and not involve coreconsole
CADnoob