Export multiple layouts to dwg (model space) from multiple sheet files (dwg)

Export multiple layouts to dwg (model space) from multiple sheet files (dwg)

neil96VHF
Participant Participant
10,399 Views
41 Replies
Message 1 of 42

Export multiple layouts to dwg (model space) from multiple sheet files (dwg)

neil96VHF
Participant
Participant

Hi All,

 

Does anyone know of a workflow to export Autocad (paper space) layouts to dwg (model space) from multiple separate sheet dwg files?

 

The project is composed of multiple folders containing separate sheet files. The layouts show xref'd drawings from model space files contained in separate model folders. I can see how to export the layout from inside an individual sheet file but have been asked for model space versions of all of the layouts from all of the sheet files.

 

Im assuming this is only possible through a third party addon, any suggestions would be much appreciated 🙂

0 Likes
Accepted solutions (2)
10,400 Views
41 Replies
Replies (41)
Message 21 of 42

neil96VHF
Participant
Participant

Hi Ed.Jobe, I'm not sure if it was unclear but I was hoping to automate t he processing of layouts across multiple separate files. Exporting multiple layouts from the same file can be done easily using the built in EXPORTLAYOUT command and shift selecting the tabs.

 

I think thats where the script is failing maybe?

0 Likes
Message 22 of 42

Ed__Jobe
Mentor
Mentor

My script runs the EXPORTLAYOUT command for each layout in the dwg using Visual Lisp. I told you that LT can't do those commands. The script will only work on full AutoCAD. LT may be able to run the script, but parts of it will fail.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 23 of 42

neil96VHF
Participant
Participant

Yes I am trying it on the full version

0 Likes
Message 24 of 42

Ed__Jobe
Mentor
Mentor

Then what is failing?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 25 of 42

neil96VHF
Participant
Participant

Here is my process:

neil96VHF_0-1705421083637.png

then i select the files I want the script to work on:

neil96VHF_1-1705421141588.png

The run the script on selected files like this:

neil96VHF_2-1705421195331.png

This is the result:

neil96VHF_4-1705421278855.png

Is there something else I need to do?

 

Sorry this is being such a pain. Im sure it will be beneficial to others if we reach a solution though...

 

0 Likes
Message 26 of 42

Ed__Jobe
Mentor
Mentor

All I can think of is for you to zip up some files for me to test and post the zip. 2 -3 files should do.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 27 of 42

cadffm
Consultant
Consultant

Please confirm again, to make sure for us

 

You are using AutoCAD FOR MAC ? (in LT for mac  - the Ed. programm won't work)

I'm very surprised that ScriptPro works, I know otherwise.

 

Sebastian

0 Likes
Message 28 of 42

neil96VHF
Participant
Participant

No, Im using full AutoCad on PC

 

0 Likes
Message 29 of 42

neil96VHF
Participant
Participant

Hi Ed.Jobe,

 

Please see attached the files and dependencies for testing. Is it possible to make this message private?

 

Many thanks

0 Likes
Message 30 of 42

Ed__Jobe
Mentor
Mentor

You can pm me but you cant attach files to pm's. You can click on the 3 dots next to your post and select Edit Message. Then you can delete the file you posted.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 31 of 42

neil96VHF
Participant
Participant

Have you downloaded?

0 Likes
Message 32 of 42

paullimapa
Mentor
Mentor

You have a very long path there. I know windows os does have a limit so if your layout names are also long then you might have reached the limit preventing the dwg from being created


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 33 of 42

neil96VHF
Participant
Participant

Hi Paul,

I have moved the test folder to my desktop and tried there in an effort to reduce the path length but still get the same 'failed' message.

Im not sure how I can reduce it further without moving it up to the top of the C drive directory.

 

Thanks

0 Likes
Message 34 of 42

paullimapa
Mentor
Mentor

no zip file attached to your post


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 35 of 42

neil96VHF
Participant
Participant

Sorry, I guess Ed.jobe deleted it for me. Please see attached

0 Likes
Message 36 of 42

Ed__Jobe
Mentor
Mentor

The first two failed for me due to missing xrefs and missing sheetset. Those two prompts cause the script to fail.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 37 of 42

neil96VHF
Participant
Participant

So any pop up prompts will cause a fail?

0 Likes
Message 38 of 42

cadffm
Consultant
Consultant

ScriptPro setting:

linked to accoreconsole.exe or acad.exe(choose acad.exe. if not done)

Sebastian

0 Likes
Message 39 of 42

Ed__Jobe
Mentor
Mentor

@neil96VHF wrote:

So any pop up prompts will cause a fail?


Yes, if there is no way to respond to them. Also, Sebastian had a good idea, check SciriptPro's options to point to where your acad.exe is installed.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 40 of 42

paullimapa
Mentor
Mentor
Accepted solution

So I opened your dwgs & detached all the image files you didn't include so there would be no prompts when dwg opens.

ScriptPro would failed most of the time though would succeed some of the time whether setup to open Acad2020 or 2024.

But I've successfully gotten results using this other app called:

AutoScript (similar to ScriptPro) which is a free add-on that gives you the capability of selecting multiple drawings to run a script file 

But also even when it's successful I'm not sure that the results are what you wanted. The exportlayout drawing does not look like the actual drawing's layout. The layer settings are all gone. Is this really what you want?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes