cd_matjansen Posted July 21, 2020 Share Posted July 21, 2020 Hello, we would like to export lots (several thousand) Vectorworks files as VectorScript to use for further processing. The only option to process a larger amount of files is "Batch Processing", which unfortunately only converts files from the old format into the current one, and is obviously not what we need. Any tips would be much appreciated! Thanks a lot, Matthias Quote Link to comment
Pat Stanford Posted July 21, 2020 Share Posted July 21, 2020 If you are on Mac you should be able to write an AppleScript wrapper to open, do the export and then close the file and move the the next file. I wrote one about 10 years ago to do a batch export as DWG. Export to VS should be similar. If you are not on Mac, I don't know of any way to do a batch function on Windows. Quote Link to comment
cd_matjansen Posted July 22, 2020 Author Share Posted July 22, 2020 Hi Pat, thanks for your reply! We also thought of writing an Automator script, but were hoping there exists a more robust and native way of doing this in Vectorworks. Quote Link to comment
Pat Stanford Posted July 22, 2020 Share Posted July 22, 2020 No other way I know of. Vectorworks is really a single file based application. There is no (easy) way for a script in one file to impact a different file. Other than reading and writing resources. Using an AppleScript to locate the files, open them in VW, and then execute a Vectorscript to do the export, close the file and move to the next one. Is the best that I have come up with. I can try and dig up the Applescript if you would like. The Vectorscript was embedded in the AppleScript if I remember correctly. Quote Link to comment
cd_matjansen Posted July 23, 2020 Author Share Posted July 23, 2020 Hey Pat, no need to dig up your Applescript but thanks for your help! Quote Link to comment
Sarah Cole Posted August 16, 2021 Share Posted August 16, 2021 Hi! Did you ever get your script/process working and, if so, would you mind sharing it? I'm trying to convert 400+ MiniCad files (from 1998!) into modern formats. I've managed to batch convert most of them to .vwx but I'd really like to get a .dwg and .pdf of each one without manually having to open and export every file twice and will take any tips on this. I've been poking at the Mac Automator but the solution isn't immediately apparent. Many thanks for any advice/info you might have. Quote Link to comment
Pat Stanford Posted August 16, 2021 Share Posted August 16, 2021 HI Sarah, Here is an AppleScript that will batch export a folder of files to DXF/DWG using the current export settings. Run a manual export to make sure you have the destination folder and export options the way you want them. Open Vectorworks and close any open files. Run the AppleScript and select the folder with the VWX (version 2021) files that you want to export. It will open each file, run the export and then close the file. If the destination file already exists it will overwrite that file. I don't remember why, but I also store a text block with the time of the export into each VWX file. If you don't want that delete the CreateText Line in the first Run Vectorscript block. Since this is simulating user key presses, there are lots of delays to let windows open/close. Each file takes about 15 seconds to run. I recommend that you test is on a small subset (5 to 10 files) and make sure it does what you want before trying to run all 400+. Even then I would probably break it down to batches of 50 or so so that if there is a problem you know sooner. Something similar could be done for PDF, but unless you have Saved Sets to publish, the PDF export Vectorscript will be more complicated than the one line ExportDXFDWG one here. I have not played with PDF exports yet and don't have time to work on that today. Ask again if you have more questions. VW Batch DWG Rev3 2021.scpt.zip 2 Quote Link to comment
Sarah Cole Posted August 17, 2021 Share Posted August 17, 2021 Hi Pat, This looks incredibly helpful, thank you! I'll give it a go in the next couple of days and let you know how I get on with it. Many thanks. Quote Link to comment
Sarah Cole Posted September 22, 2021 Share Posted September 22, 2021 Hi Pat, Just to let you know that this did work and was an absolute lifesaver, thank you so much. I ended up tweaking it to run in Vectorworks 2022 and extending that final 'delay' to 10 to prevent crashes on big files—I might see if I can get it to delay while the exporting window remains open, but that's a challenge for another day. Thanks again for your help. 1 Quote Link to comment
Pat Stanford Posted September 22, 2021 Share Posted September 22, 2021 I am glad I was able to help. 1 Quote Link to comment
marco cheuk Posted June 27, 2022 Share Posted June 27, 2022 Hi Sarah, Hi Pat, I am late to the party but in the same boat. Would either of you be willing to re-upload the script to batch export to DWG? I am currently trialing VW 2022. Thank you, Marco Quote Link to comment
marco cheuk Posted June 27, 2022 Share Posted June 27, 2022 Ahh, It showed up. Will give it a shot. Thank you! Marco Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.