Lisp to create Viewport in several drawings

Lisp to create Viewport in several drawings

ryan_carey
Contributor Contributor
1,634 Views
7 Replies
Message 1 of 8

Lisp to create Viewport in several drawings

ryan_carey
Contributor
Contributor

First, Thanks to all the post on the forums who have got me as far as i have with LISP!

 

I am stuck... Here is what I have.  I have a folder with hundreds of electrical schematic files that have the drawing in modelspace.  I have a lisp that i used to insert my custom title block on a new layout tab in paperspace, but the lisp didnt recognize the viewport.  I can manually (Mview >Object and select my boundary that did come over for my viewport).  My viewport is on its own layer named V-port if that helps.


I am looking to run a lisp that will Mview, and select my vport boundary.  I would also like for it to delete the layout 1 tab that is there by default also. Is there a way to do this without having to open each file and do it manually?  

 

Can anyone please help me figure this out?  I have researched and searched but cant find.

 

Thanks,

0 Likes
1,635 Views
7 Replies
Replies (7)
Message 2 of 8

maratovich
Advisor
Advisor

Attach your sample file.

 

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

ryan_carey
Contributor
Contributor

Attached.  Thank you!

0 Likes
Message 4 of 8

ryan_carey
Contributor
Contributor

Is this feasible or no?

0 Likes
Message 5 of 8

maratovich
Advisor
Advisor

1. Why do you create title blocks if you have it in the Model?
2. Maybe you need to print from the model?
3. Lisp works inside an open file, so you have to open all files.
4. Without opening the program do it.
5. Do without opening, and change what you need (if at all possible) - it takes a lot of time.
6. I will try on the weekend, but I promise nothing.

By the way, maybe this will help you:

https://www.kdmsoft.net/autoviewport.html

 

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

ryan_carey
Contributor
Contributor

Thanks so much for the reply, I think i have simplified it some.  I have attached a new file (Please disregard the old one), and i have the order of operations i need listed below this paragraph.  I have 200 drawings in one folder, that i would like for this to happen to each one of them.  I am really looking to apply it to all drawings by a lisp, without having to open each drawing.  Can you please help me with this? Very Appreciated!

 

layout<enter>
set<enter>
layout1<enter>
dr<enter>
1.5,0.3<enter>

<enter>

back<enter>
mv<enter>
object<enter>
10.3626,1.6978<enter>
zoom<enter>
extents<enter>
qsave<enter>
close<enter>

0 Likes
Message 7 of 8

maratovich
Advisor
Advisor

Maybe this is no longer useful.
But better posture than never.
1. You need to create a script

_Layout
_Set
Layout1
_DRAWORDER
1.5,0.3

_Back
_MVIEW
_Object
10.3626,1.6978

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

maratovich
Advisor
Advisor

2. Run it in multiple file
Watch the video.

 

 

 

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