Home > Net >  AutoCAD CUIX: Swapping my LISP routine’s mapped drive URL link in my Macro with the Google Share Dri
AutoCAD CUIX: Swapping my LISP routine’s mapped drive URL link in my Macro with the Google Share Dri

Time:03-10

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: enter image description here

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/");My_routine;

Anyone know the proper syntax for the macro?

Thanks in advance!

CodePudding user response:

Sounds like a more configurable approach is needed, where the users can map the drives with whatever path they want (G:, S:\ or whatever). But they can still use the tools that are inside said drive.

To do this there are three things that would help:

1.) start using AutoCAD profiles. It's possible write a setup script to create the profile for the user. This profile would contain a support file path entry for the location of your LISP code. The path would vary depending on where the user has google drive mapped to.
2.) load all LISP from the profile when AutoCAD starts up, this can be done with the acaddoc.lsp file.
3.) remove all hard-coded load statements from the CUI buttons

  • Related