乐筑天下

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

[编程交流] acaddoc.lsp - Question

[复制链接]

35

主题

145

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
180
发表于 2022-7-5 13:07:25 | 显示全部楼层 |阅读模式
Will the acaddoc.lsp run in any folder, or just in folders defined in the search path.  My assumption from reading the documentation is that it does not need to be defined in the search path.  The only requisite is the acaddoc.lsp file and the .dwg file need to be in the same folder. 
       
        The reason that I ask is that on AutoCAD 2018 does not run acaddoc.lsp like the earlier versions did (2014 & 2016).
       
        Can anyone confirm or correct this?
       
        Greg
回复

使用道具 举报

58

主题

3353

帖子

33

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1761
发表于 2022-7-5 13:20:08 | 显示全部楼层
It might be due to the security settings Autodesk has been adding ( TRUSTEDPATHS, SECURELOAD etc. )
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 13:23:32 | 显示全部楼层
The support paths are checked first and if I remember right once it finds one it stops searching.
回复

使用道具 举报

24

主题

1265

帖子

1028

银币

后起之秀

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

铜币
362
发表于 2022-7-5 13:35:45 | 显示全部楼层
I have to admit, I was skeptical when I read your post. Things rarely change with AutoCAD/Autolisp over the years, or at least I would have thought I would have remembered this.
        But after some testing, I agree.
        Given an "acaddoc.lsp" file in the drawing folder, in AutoCAD 2016 and lower, it does get loaded, regardless of the existence of any other "Acaddoc.lsp" file. Presumably because AutoCAD is considering the drawing folder at the TOP of the support file search path.
         
        On 2017 and later, it does not load the "Acaddoc.lsp" file from the drawing folder. It loads the first one it finds in the Support File Search Path (presuming there is another one). This makes me think it's no longer considering the DWG folder to be at the top of the support file search path.
         
        An old trick is to run the -INSERT command (note the hyphen), and then enter a bogus string (EXAMPLE: "gsdfg543casdfas" ) for the block you want to insert. AutoCAD will respond with a message dialog stating that it can't find "gsdfg543casdfas" in the search path, and then list all of the search paths. The listing of the search paths has not changed in 2017 and later however. It still shows the DWG folder as second in the list, right above the "Support File Search Path" that you see in OPTIONS.
         
        Looks like you found a bug, unless you can find some documentation on this changed behavior. I know who to ask. I'll report back if I find out something.
回复

使用道具 举报

35

主题

145

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
180
发表于 2022-7-5 13:44:02 | 显示全部楼层
Thank you, rkmcswain, for taking an interest in this issue and appreciate the information if something is known.  I have been scratching my head a few days about it.
         
        Greg
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 13:45:14 | 显示全部楼层
Call your acaddoc autoload.lsp and try interested to know, we use this name for our library lisp so never change acaddoc.lsp
回复

使用道具 举报

18

主题

1529

帖子

973

银币

中流砥柱

Rank: 25

铜币
649
发表于 2022-7-5 13:55:28 | 显示全部楼层
This is not a bug and ronjonp is correct in mentioning the TRUSTEDPATHS variable.
        Further reading:
        https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/AutoCAD-and-Viruses.html
回复

使用道具 举报

35

主题

145

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
180
发表于 2022-7-5 14:01:38 | 显示全部楼层
I took up the issue with my reseller and he forwarded it to Autodesk when he was able to replicate it with AutoCAD 2017 and a fully patched install of 2018.
         
        The answer came back pretty quickly and they were simple fixes:
       
        LEGACYCODESEARCH set that to ON
        SECURELOAD set that to 0
         
        Once I set those then all was golden again.
         
        Thank you for all the comments.
         
        Greg
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 14:08:24 | 显示全部楼层
With a little reading, you could have saved you & your reseller some time -
         
         
        You can lead a horse to water...
         
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-15 08:34 , Processed in 2.160629 second(s), 71 queries .

© 2020-2025 乐筑天下

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