I would like to put our company programming on a Dropbox folder. I have not fully tested everything out yet, like locations of lisp files and image name...
Has anyone done this with success? One thing I am struggling with is an absolute path in my lisp file:
(setq FL:FLAYTAB "C:\\Users\\dvanerem\\Dropbox\\Canova and Stone\\Customizations\\Autodesk AutoCAD 2010\\Programming\\OENV-RCP.TAB")(FL:LoadTable)
I am confused how this would work with other users? Or does AutoCAD automatically correct for this?
Any help would be really nice.
Thanks,
Sorry but i don't quite understand your question, you have a username in there, so i assume its not the same folder but rather a folder on a server for each user? also you are also using c: as drive, is it supposed to be a server path or local?
If it's to depend on the user you can use something like this.
(strcat "C:\\Users\\" (getvar 'loginname) "\\Dropbox\\Canova and Stone\\Customizations\\Autodesk AutoCAD 2010\\Programming\\OENV-RCP.TAB")
@dvanerem wrote:I would like to put our company programming on a Dropbox folder. I have not fully tested everything out yet, like locations of lisp files and image name...
Has anyone done this with success? One thing I am struggling with is an absolute path in my lisp file:
(setq FL:FLAYTAB "C:\\Users\\dvanerem\\Dropbox\\Canova and Stone\\Customizations\\Autodesk AutoCAD 2010\\Programming\\OENV-RCP.TAB")(FL:LoadTable)
I am confused how this would work with other users? Or does AutoCAD automatically correct for this?
Any help would be really nice.
Thanks,
Almost always the problem is the mapped network drive letter vaies from one computer to another.
So a sub to retrive the current drive letter:
(defun NetDrive (/ WscrptO Driveletter NDrive) (setq WscrptO (vlax-create-object "WScript.Network") Driveletter (vlax-invoke WscrptO 'EnumNetworkDrives) ) (setq NDrive (vla-Item Driveletter 0)) (vlax-release-object WscrptO) NDrive)
and the users loginname (getvar 'loginname) as suggested by balisteor
(setq FL:FLAYTAB (strcat (NetDrive) "\\\\Users\\" (getvar 'loginname) "\\Dropbox\\Canova and Stone\\Customizations\\Autodesk AutoCAD 2010\\Programming\\OENV-RCP.TAB"))
will give you the correct path
You can also use the stations computer name
(getenv "ComputerName")
or even users logon name
(getenv "UserName")
HTH