Jump to content

Lisp or Script - Procedure on Multiple Drawings?


ILoveMadoka

Recommended Posts

Lisp or Script - Procedure on Multiple Drawings?

 

 

Either way I'm not sure where to start.

(Didn't know whether to post this here or in the Scripting forum..)

 

--

 

Readers' Digest Version: How do I run a lisp routine on all drawings in a directory?

 

--

 

I have several hundred drawings and I want to open each drawing then

go to the model tab and zoom extents then go to each tab and do the same then

run a lisp routine that I have that updates to specific printer and print configuration (plotting extents) for model space and each tab.

 

I don't know how to do this to a folder full of drawings and don't know if lisp

or scripting is better and how to do it?

I looked at ScriptPro but it does not install on XP64.

 

I'm also looking at Lee's ScriptWriter but I don't know how to script going from tab to tab. There may be one tab there may be 30 and they may be called anything..

 

Is one preferable over another?

Has someone written anything along these lines that they're willing to share?

How do you run either (script/lisp) on multiple drawings? :cry:

 

OR..

 

Can I force the PUBLISH command to print the Extents?

 

 

Please advise...

 

 

Thanks!!

Link to comment
Share on other sites

Write a LISP program to perform all the necessary operations on a drawing.

 

Use a Script to Open / (Load &) Run LISP / Save / Close each drawing in a directory.

 

For operating on each tab, something like:

 

(foreach layout (layoutlist)
 (setvar 'CTAB layout)
...
)

Link to comment
Share on other sites

How do you open a drawing with a script?

 

 

So is this used in conjunction with your Script program?

 

>>Use a Script to Open / (Load &) Run LISP / Save / Close each drawing in a directory.

 

Link to comment
Share on other sites

How do you open a drawing with a script?

 

Maybe this will help:

 

http://lee-mac.com/scriptwriting.html

So is this used in conjunction with your Script program?

 

>>Use a Script to Open / (Load &) Run LISP / Save / Close each drawing in a directory.

 

You are welcome to use my ScriptWriter program, or ScriptPro (there is a 64-bit version somewhere), or even write your script manually.

Link to comment
Share on other sites

Ohhhh....

 

I have to create this....

 

_.open "C:\My Folder\Drawing1.dwg"

_.open "C:\My Folder\Drawing2.dwg"

_.open "C:\My Folder\Drawing3.dwg"

That is going to be one LOOOOOOOOONG script!

 

 

Thanks!!

Link to comment
Share on other sites

I have to create this....

 

_.open "C:\My Folder\Drawing1.dwg"

_.open "C:\My Folder\Drawing2.dwg"

_.open "C:\My Folder\Drawing3.dwg"

That is going to be one LOOOOOOOOONG script!

 

That's where the Script Writing programs come in :)

Link to comment
Share on other sites

Link to comment
Share on other sites

I use old fashioned start cmd DIR *.dwg >dirlist.scr /b and then word to make scripts its very fast when you know how or use excell to copy and paste columns to make your script

 

_.open "C:\My Folder\Drawing1.dwg" (load "lisp1")(load "lisp2") close Y etc

 

also here is zoom all tabs for you

 

; goes through all layout tabs and zooms all
[font=monospace]; By Alan H june 2011[/font]
[font=monospace](vl-load-com)[/font]
[font=monospace](command "_.pspace")[/font]
[font=monospace](setq curtab (getvar "Ctab"))[/font]
[font=monospace](setq this_dwg (vlax-get-acad-object))[/font]
[font=monospace](foreach d (layoutlist)[/font]
[font=monospace]     (setvar "CTAB" d)[/font]
[font=monospace]     (vla-ZoomExtents this_dwg)[/font]
[font=monospace])[/font]
[font=monospace](setvar "ctab" curtab)[/font]
[font=monospace](princ)[/font]

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...