AutoCAD CUIX:将宏中 LISP 例程的映射驱动器 URL 链接与同一文件的 Google Share Drive 基于 Web 的链接交换
我的 LISP 例程位于我工作的 Google Share Drive 上。我的自定义功能区中有一些按钮,可以使用映射的驱动器号 URL 链接调用我的例程。
目标:
尝试与办公室中的其他 CAD 用户分享此内容。
问题:
不同的 CAD 用户具有不同的映射驱动器盘符(例如:H:\ 或 S:\ 而不是 G:)。 每次更新 CUIX 文件时,尽量避免手动更改驱动器号以匹配其映射(因为路径将被覆盖)。 想要使用通用的 Google Share Drive 基于网络的链接(通过选择文件并在 Google Drive 中选择“获取链接”并复制链接)。
交换:
我的宏示例中的当前 URL 映射(如果上面的图像未显示):
^C^C(load "G:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine ;
与 Google Share Drive 链接交换的示例(不起作用):
^C^C(load "https://drive.google.com/file/d/0BlU92IihdhhcnRlcl9mWxl/view?usp=sharing&resourcekey=0-0VxGZXU_D8YjtjgjzQZnQ") ;我的例程;
我尝试过的另一种方法 ^C^C(命令-s“_browser”“https://drive.google.com/file/d/0BlU92IihdhhcnRlcl9mWxl/view?usp=sharing&resourcekey=0-0VxGZXU_D8YjtjgjzQZnQ/”);My_routine;
有人知道宏的正确语法吗?
提前致谢!
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:
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来需要一种更可配置的方法,用户可以将驱动器映射到他们想要的任何路径(G:、S:\ 或其他路径)。但他们仍然可以使用所述驱动器内的工具。
为此,以下三件事将有所帮助:
1.) 开始使用 AutoCAD 配置文件。可以编写一个设置脚本来为用户创建配置文件。此配置文件将包含 LISP 代码位置的支持文件路径条目。该路径会根据用户将 google 驱动器映射到的位置而有所不同。
2.) 在 AutoCAD 启动时从配置文件中加载所有 LISP,这可以通过 acaddoc.lsp 文件来完成。
3.) 从 CUI 按钮中删除所有硬编码的加载语句
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
对于我在上面的评论中提到的有关仅通过 CUIX 宏(而不是通过 LISP 例程)打开文件夹的问题,我找到了这个可能的解决方案:
感谢 Paul_Gander 及其评论位于此处:
< a href="https://forums.autodesk.com/t5/autocad-forum/open-a-folder-with-a-button/td-p/3010928" rel="nofollow noreferrer">https://forums.autodesk.com/t5/autocad-forum/open-a-folder-with-a-button/td-p/3010928
需要更多测试,但到目前为止一切顺利..谢谢
保罗!
For the issue I mentioned in my comment above about opening a folder through the CUIX macro only (and not through a LISP routine), I found this possible solution:
Credit to Paul_Gander and his comments located here:
https://forums.autodesk.com/t5/autocad-forum/open-a-folder-with-a-button/td-p/3010928
More testing needed but so far so good...
Thank you Paul!