Jump to content

Just discovered auto publish on save and I love it, but can the filename be changed?


Recommended Posts

Posted

I output plenty of drawings that are 30+ paperspace layouts from a single 3D model, so the auto publish feature of outputting a single PDF for me is fantastic.

 

The one thing I would like to change/customize if possible is the output filename. For example, B250.dwg always saves as B250.pdf, which is fine, but I would like to automatically insert a date and time into the filename itself. The advantage would be saving a new PDF every time I save the .dwg rather than overwriting the same .pdf over and over.

 

Does anyone know if there's a way to customize this?

Posted

Have you considered the PLOT STAMP SETTINGS?

Yes, I know you are describing something different, but there are some other features which you might enjoy using,

like the user defined fields, which do enable some additional text.

auto publish options.jpg

plot stamp settings.jpg

advanced plot stamp settings.JPG

Posted

I looked into plot stamps and found them to be extremely limited. I use MTEXT in my title blocks with fields inserted for far, far more flexibility.

Posted

I don't know a way to customise this, but you could look for a free program called 'renamer' which is pretty slick...

Posted

FWIW -

 

I haven't tested to know for sure, but methinks you could hook the CommandEnded Event with a simple Visual LISP Reactor to check if the file exists, and rename via sub-function:

 

(defun _Rename (filePath / newPath)
 (if (and (findfile filePath)
          (not
            (findfile
              (setq newPath
                     (strcat
                       (vl-filename-directory filePath)
                       (vl-filename-base filePath)
                       "_"
                       (menucmd "M=$(edtime,$(getvar,date),YYYY-MO-DD-HH-MM)")
                       "_"
                       (vl-filename-extension filePath)
                     )
              )
            )
          )
     )
   (vl-file-rename filePath newPath)
 )
)

Posted

I've used plenty of AutoLISP but never any Visual LISP, so that would be new territory for me.

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