be_bo Posted December 8, 2010 Posted December 8, 2010 I'm printing test.dwg to PDF using lisp routine. I'm using this expression to generate the file name: (setq pdf_name (getfiled "Specify file name to plot *.pdf" (getvar "SAVENAME") "pdf" 5)) On some computers it saves file as test.pdf On some computers it saves file as test.dwg.pdf. How I can set all computers to save test.pdf? Thank you! Quote
Lee Mac Posted December 8, 2010 Posted December 8, 2010 Using bit 5 (= 1+4) you are allowing any file extension, why not just use bit 1? (setq pdf_name (getfiled "Specify file name to plot *.pdf" (getvar "SAVENAME") "pdf" 1)) Or, if you want the pdf to match the drawing name, you could use something like: (strcat (getvar 'DWGPREFIX) (vl-filename-base (getvar 'DWGNAME)) ".pdf") [ Remember to use (vl-load-com) first ] Quote
be_bo Posted December 9, 2010 Author Posted December 9, 2010 Thank you, Lee Mac! My problem with extra extension was gone after I reloaded the profile, but your feedback is very useful for some other similar routines that I'm working on. Quote
Recommended Posts
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.