be_bo Posted December 8, 2010 Share 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 Link to comment Share on other sites More sharing options...
Lee Mac Posted December 8, 2010 Share 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 Link to comment Share on other sites More sharing options...
be_bo Posted December 9, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
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.