Jump to content

Recommended Posts

Posted

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!

Posted

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 ]

Posted

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.

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...