Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set File Location from a Shared Dropbox Folder

2 REPLIES 2
Reply
Message 1 of 3
dvanerem
639 Views, 2 Replies

Set File Location from a Shared Dropbox Folder

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,

2 REPLIES 2
Message 2 of 3
balisteor
in reply to: dvanerem

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")

Message 3 of 3
pbejse
in reply to: dvanerem


@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

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost