Jump to content

CUIX: Swapping my LISP routine’s mapped drive URL link in my Macro with the Google Share Drive web based link of the same file


RLispLearner

Recommended Posts

 

My LISP routines are on the Google Share Drive at my work. I have buttons in my custom ribbon that calls my routines using a mapped drive letter URL link. 

 

URL Link example in my custom Macro:

CUIX_Macro.thumb.PNG.f9df0330f2f83e2b8ea6eb6f3283a6d3.PNG

 

 

Goal:

Trying to share this with the other CAD users in the office.

 

Problem:

Various CAD Users have different mapped drive letters (Ex: H:\ or S:\ instead of G:\).

Trying to avoid going around and manually changing the drive letter to match their mapping every time I updated the CUIX file (since path would be overwritten).

Would like to use the universal Google Share Drive web based link (by selecting the file and choose "get link" in Google Drive and copy the link).

 

The Swap:

Current URL Mapping in my Macro example (if image above not showing):

^C^C(load "G:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine;

 

Example of swapping with the Google Share Drive link (not working):

^C^C(load "https://drive.google.com/file/d/0BlU92IihdhhcnRlcl9mWxl/view?usp=sharing&resourcekey=0-0VxGZXU_D8YjtjgjzQZnQ");My_routine;

 

 

 

Another method I tried

^C^C(command-s "_browser" "https://drive.google.com/file/d/0BlU92IihdhhcnRlcl9mWxl/view?usp=sharing&resourcekey=0-0VxGZXU_D8YjtjgjzQZnQ/")

 

 

Anyone know the proper syntax for the macro?

Thanks in advance!

 

 

 

Edited by RLispLearner
Link to comment
Share on other sites

You could do a check for, Various CAD Users have different mapped drive letters (Ex: H:\ or S:\ instead of G:\) use getfile My_routine.lsp do in a cond

(cond

(( G: yes load

(( H: yes load

(( S: yes load

 

Make sure your load is working 1st manually for the various drives.

Edited by BIGAL
Link to comment
Share on other sites

Thanks BigAl.

I think sticking with a mapped URL path with a drive letter is preferable to trying the Share Drive web based link so I appreciate your suggestion!

 

 

For what to put in the macro line, is this close to what you are suggesting (using "getfiled" and a "conditional" statement)?

^C^C (getfiled

                (cond

                     ((= G: yes (load "G:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine;)

                     ((= H: yes (load "H:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine;) 

                     ((= S: yes (load "S:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine;)

                );end Cond

      );end getfiled

 

 

I put together this IF statement just to see if its in the ballpark as well:

 

^C^C (getfiled 
     (if
           (Progn
              ((/= G: nil (load "G:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine;) 
              ((/= H: nil (load "H:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine;)  
              ((/= S: nil (load "S:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine;)
           );end progn
      );end if
 );end getfiled

 

Hopefully I'm not wildly off on all the syntax. 

 

 

Thanks again for the great suggestion…!

  • Like 1
Link to comment
Share on other sites

Thinking a bit more I don't use cloud drives, if each user has the support path set.

 

; must have support path set, Options Files Support files search path
(setq fileexist (findfile "My_routine.lsp"))
(if (= fileexist nil)
(alert "my_routine.lsp not found on G: H: or S: \nCheck your support path settings")
(load "My_routine.lsp")
)

 

The search path set ie "G:\shardrive\CAD_Department\CAD_menu\LISP\ can be H: S: etc then findfile will return either T or nil 

 

 

  • Like 1
Link to comment
Share on other sites

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