Open, Plot, Close a specific drawing

Open, Plot, Close a specific drawing

Anonymous
Not applicable
1,261 Views
8 Replies
Message 1 of 9

Open, Plot, Close a specific drawing

Anonymous
Not applicable

I am trying to create a custom command/button that will open a specific drawing, plot it with a saved page setup, then close it. Does anyone know of a macro, script, or lisp that may do this?

 

Note: This is a typical drawing that we use to print binders for our drawing packages and just want a quick way to allow users to print when they need a binder.

0 Likes
1,262 Views
8 Replies
Replies (8)
Message 2 of 9

hak_vz
Advisor
Advisor

(defun C:bpp (/  file)
(setq file "C:/Drawing1.dwg" )
(command "_.fileopen" file)
(command "-.plot") ; follow command input and follow switches

; for ex

;(command "-.plot"  "y" ........

(command "close" file)
)

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 3 of 9

cadffm
Consultant
Consultant

Menu macro:

Ever tried to write your own?

For example by command -Publish and a predefined puplish list?

 

And yes, there are many ways, thats just of them.

Sebastian

0 Likes
Message 4 of 9

cadffm
Consultant
Consultant

191210-5.JPG

Sebastian

Message 5 of 9

maratovich
Advisor
Advisor

Give us an example of your .dwg file.

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

Anonymous
Not applicable

I have written many. This simple task seems to have me stuck.

0 Likes
Message 7 of 9

Anonymous
Not applicable

This lisp will open the drawing but will not plot and close. Note: 17x22 is the page setup saved to the drawing. Any suggestions?

 

(defun C:bpp (/  file)
(setq file "C:/Binders.dwg" )
(command "_.fileopen" file)
(command "-.plot" "n" "17x22" "17x22"  "n" "n" "y" )
(command "close" file)
)

 

 

0 Likes
Message 8 of 9

cadffm
Consultant
Consultant

@Anonymous  schrieb:

I have written many. This simple task seems to have me stuck.


I posted one possible solution..

 

You can start a new AutoCAD instance with a script parameter, for example.

 

And for Using PLOT command inside the current program session

you have to fight with the SDI (= 1).

 

Sorry, time out, i am out. 😀

Sebastian

0 Likes
Message 9 of 9

Sea-Haven
Mentor
Mentor

Way to short check what it does when you do manually.

(command "-.plot" "n" "17x22" "17x22"  "n" "n" "y" )

 (COMMAND "-PLOT"  "Y"  "" "DWG To PDF"
	       "Iso full bleed A3 (420.00 x 297.00 MM)" "m" "LANDSCAPE"  "N"   "W"  "-6,-6" "807,560" "1=2"  "C"
	       "y" "Acad.ctb" "Y"	"n" "n" "n" pdfName "N" "y"
    )
0 Likes