乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 65|回复: 9

[编程交流] 通过acadd添加支持路径

[复制链接]

28

主题

124

帖子

96

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
140
发表于 2022-7-6 06:56:18 | 显示全部楼层 |阅读模式
早上好
是否可以通过acaddoc添加新的支持路径。lsp文件?我想添加新路径到:
 
1、支持文件搜索路径
2、打印机支持文件路径
3、模板设置
 
我需要在AutoCAD 2013 Mac版本中执行此操作,因此没有VisualLISP。我甚至不知道从哪里开始
 
谢谢
保罗
回复

使用道具 举报

28

主题

124

帖子

96

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
140
发表于 2022-7-6 07:06:05 | 显示全部楼层
我试过了,但没用
 
  1. ;;Sets the support file search paths
  2. (setenv "SupportFilePath" (strcat "/Users/PlaceLab03/Desktop/_Library/Lisp))
  3. (setenv "SupportFilePath" (strcat "/Users/PlaceLab03/Desktop/_Library))

 
保罗
回复

使用道具 举报

48

主题

1073

帖子

1043

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
238
发表于 2022-7-6 07:14:35 | 显示全部楼层
你不能通过选项永久地做到这一点吗?
回复

使用道具 举报

28

主题

124

帖子

96

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
140
发表于 2022-7-6 07:18:44 | 显示全部楼层
Hi dbroda你好
是的,我可以,但我正在尝试在多台计算机上远程执行此操作。我觉得通过lisp最好
当做
保罗
回复

使用道具 举报

pBe

32

主题

2722

帖子

2666

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
211
发表于 2022-7-6 07:26:25 | 显示全部楼层
不确定Mac版本:
 
(setenv“ACAD”“path;path;path….”)
 
我猜是阿卡多克的原因。LSP是因为您希望为每个CAD站“重新设置路径”,以阻止用户根据自己的喜好调整SFSP。
回复

使用道具 举报

8

主题

38

帖子

25

银币

初来乍到

Rank: 1

铜币
47
发表于 2022-7-6 07:35:34 | 显示全部楼层
但是,对于打开的每个文件,您都必须这样做吗?
这就是阿卡多克。lsp用于!
回复

使用道具 举报

28

主题

124

帖子

96

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
140
发表于 2022-7-6 07:38:10 | 显示全部楼层
pBe-谢谢-这让我思考和研究了更多。是的,阿卡多克。lsp阻止用户修改内容。
 
多哥-谢谢-也许这太过分了,我应该停止偏执,但我想确保文件路径保持原样。也许有一种更简洁的方法可以做到这一点,但我的知识还不足以实现它。
 
在进一步调整之后,我得到了:
 
  1. ;;set the path to the subdirectory.
  2. (setq netpath "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD")
  3. ;;set the support paths to the AutoCAD default
  4. (setenv "ACAD" "")
  5. ;;store the default paths
  6. (setq defpath (getenv "ACAD"))
  7. ;;set up the support file search paths
  8. (setenv "ACAD" (strcat
  9. defpath ";"
  10. netpath ";"
  11. netpath "\" "Blocks;"
  12. netpath "\" "Lisp;"
  13. netpath "\" "Logos;"
  14. netpath "\" "PC3;"
  15. netpath "\" "Plotstyles;"
  16. ))
  17. ;;set up the template settings paths
  18. (setenv "QnewTemplate" "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD\\Templates\\PlaceLab.dwt")
  19. (setenv "SheetSetTemplatePath" "C:\\Users\\Paul&Jen\\Documents\\_Library\\AutoCAD\\Templates\\_SheetSets")
  20. (setenv "TemplatePath" "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD\\Templates")
  21. ;;set up the printer support file paths
  22. (setenv "PrinterStyleSheetDir" "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD\\Plotstyles")
  23. (setenv "PrinterConfigDir" "C:\\Users\\Paul&Jen\\Documents\\_Library\\_PlaceLab\\AutoCAD\\PC3")
  24. ;;inform the user
  25. (prompt "\nSupport Paths Defined\n")
回复

使用道具 举报

28

主题

124

帖子

96

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
140
发表于 2022-7-6 07:43:47 | 显示全部楼层
我拥有的路径用于在本地机器上进行测试。当我完全实现时,我将拥有网络路径。
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 07:51:42 | 显示全部楼层
在MAC上可能有几种方法?在Pc上,我们复制并更改autocad桌面图标,以在启动autocad时识别另一个配置文件,其/p>位已更改/p C3D2013。在windows中,右键单击图标,然后编辑属性“目标”
 
你所要做的就是设置所有路径等,然后保存一个配置文件。这里重要的一部分是将你的主自定义菜单设置到其他地方,在我们的例子中是它的\用户\用户ID。
 
将新的ARG文件和CUI复制到您已访问的新目录。
 
重要信息:正常启动Autocad加载新配置文件使其可用使其成为当前配置文件,然后使用新图标退出Autocad。它应完全加载(我们有8台电脑)在出现故障时将旧图标删除到目录中。
 
这是一个扩展版本,用于设置配置文件中的大部分内容
 
  1. ; resets the paths usefull for update versions of Autocad
  2. ; by BIGAL 2011
  3. ; This sets a reference to the install path of your product
  4. ; the gets are their for info maybe other use
  5. ; use this to find other settings
  6. ;(vlax-dump-object (vla-get-files (vla-get-preferences (vlax-get-Acad-object))) T)
  7. (vl-load-com)
  8. ; make temp directory
  9. ;(vl-mkdir "c:\\AcadTEMP")
  10. (setq *files*  (vla-get-files  (vla-get-preferences (vlax-get-Acad-object))))
  11. ; savepath
  12. ;(vla-get-AutoSavepath *files*)
  13. (vla-put-AutoSavepath *files* "C:\\AcadTemp")
  14. ; custom icons
  15. ;(vla-get-CustomIconPath *files*))
  16. (vla-put-CustomIconPath *files* "P:\\Autodesk\\ICONS")
  17. ; custom menu
  18. ;(vla-get-Menufile *files*))
  19. (vla-put-Menufile  *files* "C:\\Users\\BIGAL")
  20. ; printers config
  21. ;(vla-get-PrinterConfigPath *files*)
  22. (vla-put-PrinterConfigPath *files* "P:\\AutoDESK\\Plotting\\Plot Styles 2011")
  23. ; printers style sheet
  24. ;(vla-get-PrinterStyleSheetPath *files*)
  25. (vla-put-PrinterStyleSheetPath *files* "P:\\AutoDESK\\Plotting\\Plot Styles")
  26. ; printer drv's
  27. ;(vla-get-PrinterDescPath *files*)
  28. (vla-put-PrinterDescPath *files* "P:\\AutoDESK\\Plotting\\Drv")
  29. ; print spooler
  30. ;(vla-get-PrintSpoolerPath *files*)
  31. (vla-put-PrintSpoolerPath *files* "C:\\AcadTemp\")
  32. ; template  path
  33. ;(vla-get-TemplateDwgPath *files*)
  34. (vla-put-TemplateDwgPath *files* "P:\\Autodesk\\c3d Templates")
  35. ; template location
  36. ;(vla-get-QnewTemplateFile *files*)
  37. (vla-put-QnewTemplateFile *files* "P:\\Autodesk\\c3d Templates\\my.dwt")
  38. ;make new support paths exist + new
  39. (setq paths (vla-get-SupportPath *files*))
  40. (setq coggpaths
  41. "P:\\autodesk\\supportfiles;
  42. P:\\autodesk\\lisp;
  43. P:\\autodesk\\fonts;
  44. P:\\autodesk\\hfs fonts;"
  45. )
  46. (setq newpath (strcat coggpaths paths))
  47. (vla-put-SupportPath *files* newpath)
  48. ; Tempdirectory
  49. ;(vla-get-TempFilePath *files*))
  50. (vla-put-TempFilePath *files* "C:\\AcadTemp\")
  51. ;   PlotLogFilePath = "C:\\Documents and Settings\\AD\\local
  52. settings\\application data\\autodesk\\c3d 2011\\enu\"
  53. (vla-put-PlotLogFilePath *files* "C:\\AcadTemp\")
  54. ;   LogFilePath = "C:\\Documents and Settings\\AD\\local
  55. settings\\application data\\autodesk\\c3d 2011\\enu\"
  56. (vla-put-LogFilePath *files* "C:\\AcadTemp\")
  57. ; xref temp path
  58. ;(vla-get-TempXrefPath *files*))
  59. (vla-put-TempXrefPath *files* "C:\\AcadTemp\")
  60. ; end use of *files*
  61. (vlax-release-object *files*)
  62. ; exit quitely
  63. (princ "All Done")
回复

使用道具 举报

28

主题

124

帖子

96

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
140
发表于 2022-7-6 07:57:26 | 显示全部楼层
嗨BIGAL
谢谢你的回复。不幸的是,Mac版本没有VisualLisp,不过现在有了类似于图纸集管理器的项目管理器,所以我尝试了一种更基本的方法来获得相同的结果。
当做
保罗
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-10 10:05 , Processed in 0.556938 second(s), 72 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表