to find - model or layout - in cad drawings

to find - model or layout - in cad drawings

Anonymous
Not applicable
1,421 Views
17 Replies
Message 1 of 18

to find - model or layout - in cad drawings

Anonymous
Not applicable

required a lisp to resolve my problem,

 

i have a 1500  drawings to print drawings to pdf, i use script to print drawings drawings, but i have to find out which drawings are using layouts tab, then i can make separate script to print,

 

so kindly help me , I required a lisp to identify the which drawings using model or layout tab, If that lip could generate to excel which will be more helpful,

0 Likes
1,422 Views
17 Replies
Replies (17)
Message 2 of 18

JTBWorld
Advisor
Advisor

See the code snippet for emptyornot at https://jtbworld.com/autolisp-visual-lisp


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

Message 3 of 18

maratovich
Advisor
Advisor

Add an example of your files, different 2-3 pieces.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
Message 4 of 18

Sea-Haven
Mentor
Mentor

maratovich has a great plot program and should solve your problem hopefully.

 

The only crash I can think of is where a layout has 1 single item in it say a pline as a rectang then it would plot that rather than say model.

 

It sounds like the words "Company standards" were ignored if you have a mixture of model and layout plotting. I had 88 layouts in one dwg no probs. We just adopted plot from layouts was the company std. It may be to late now but there are tools to help make layouts with title blocks and mview at correct scale from Model. 

 

 

Message 5 of 18

Anonymous
Not applicable

i was thinking it would generate excel report in detail which would having the layout tab names,

0 Likes
Message 6 of 18

JTBWorld
Advisor
Advisor

Try the LSP I showed earlier. To export to Excel is easiest to do as CSV. 

Below is a code example:

(setq f (open "c:\\test.csv" "w"))

(write-line "text here" f)

(close f)

 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

Message 7 of 18

Sea-Haven
Mentor
Mentor

If using multi layouts you can get layout name and why not title block details of that layout also to excel, makes sense to me.

 

Plotting multiple layouts in a dwg is not a problem as you can get a layout list.

 

(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(vlax-for lay (vla-get-Layouts doc)
  (setq plotabs (cons (vla-get-name lay) plotabs))
)

(setq plottablist (acad_strlsort plotabs))
Message 8 of 18

hak_vz
Advisor
Advisor

@AnonymousI'm working on some code but I need folowing info:

- how are your files stored, in lots of folders with subfolders, or else

- how to organize exel files, with full paths or by folder

If you have any info that can help to organize code add it here

Miljenko Hatlak

EESignature

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.
Message 9 of 18

Anonymous
Not applicable

I have full paths of the all the drawings

 

 

0 Likes
Message 10 of 18

hak_vz
Advisor
Advisor

What kind of file txt or ....?

Miljenko Hatlak

EESignature

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.
0 Likes
Message 11 of 18

Anonymous
Not applicable

hi there,

kept in excel

 

0 Likes
Message 12 of 18

maratovich
Advisor
Advisor

@Anonymous wrote:

hi there,

kept in excel

 


Until you attach a sample, no one will make you.

I have a solution, but I need your sample.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 13 of 18

Anonymous
Not applicable

sorry, please find the attachments

0 Likes
Message 14 of 18

maratovich
Advisor
Advisor

We need DWG files.
You also need to find out what is inside the drawing files. Therefore, drawings are needed.
And in general - if you get how much in the model and how much in Layouts, then this will not help you in any way. You won't be able to print with your script anyway.
As I understand your task is to print, but you cannot because you have title blocks in both the model and Layouts.
So ?

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 15 of 18

Anonymous
Not applicable

hi there,

if you can write lisp that can generate excel report of these drawings to find which space (model / layout) of its been using Then i can make it,

 

but i would need a another lisp or script to change layout name to make them unique like.."layout1"...

0 Likes
Message 16 of 18

JTBWorld
Advisor
Advisor

You might find someone that can make what you need for free. If not feel free to contact me directly and I can create whatever you need for a fee. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 17 of 18

Sea-Haven
Mentor
Mentor

If the dwg has only 1 title block name, or a list of title block names, then you can look for the title blocks and make some form of list, but like Maratovich request you have not provided any details, really dont care about dwg names that is the easy part.

 

You can not just use Plot extents. As I hinted earlier it would plot even 1 line in a layout.

 

Need some rules to work with.

0 Likes
Message 18 of 18

Anonymous
Not applicable

Please find the attachment for drop box link to dwgs😎

0 Likes