I want to have a Lisp to not only copy the filepath of the current .dwg to the clipboard, but also Display the filepath in the command bar (e.g. to check that the current drawing is in the Folder it should be).
Can someone out there amend the Lisp for me?
Not sure which routine you're referring to, if any.
This should work.
(vl-load-com) (defun c:Path2ClipBoard ( / en tx html) (princ "\nFilepath to clipboard: ") (and (princ (setq tx (getvar "dwgprefix"))) (vlax-invoke (vlax-get (vlax-get (setq html (vlax-create-object "htmlfile")) 'ParentWindow) 'ClipBoardData) 'setData "Text" tx) (vlax-release-object html) ) (princ) )
thanks, that works nearly perfectly.
I just also Need the filename after the folderpath. Currently the above code only Displays/copies as far as the Folder the current drawing is in, but not the .dwg Name itself
After executing the Lisp command, I want to be able to just press CTRL+V in an Email to paste the entire Filepath in, so that a colleague just clicks the link and the .dwg opens
I assume it's as simple as adding a "nfilename" into the code somewhere, but I'm not a coder and don't know where...
I think you can right click the drawing tab for a quick menu that includes 'copy file path' (don't have autocad atm to check)
@Anonymous wrote:I think you can right click the drawing tab for a quick menu that includes 'copy file path' (don't have autocad atm to check)
(vl-load-com) (defun c:Path2ClipBoard ( / en tx html) (princ "\nFilepath to clipboard: ") (and (princ (setq tx (strcat (getvar "dwgprefix") (getvar "dwgname")))) (vlax-invoke (vlax-get (vlax-get (setq html (vlax-create-object "htmlfile")) 'ParentWindow) 'ClipBoardData) 'setData "Text" tx) (vlax-release-object html) ) (princ) )