乐筑天下

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

[编程交流] Check if a profile exist, copy

[复制链接]

1

主题

8

帖子

7

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:12:15 | 显示全部楼层
As Lee Mac pointed out I need it to be active profile that's being copied. This is something I'm going to you for about 20-30 users and I don't know exactly how their AutoCAD setup is I want to make a copy of their current settings and just add some support paths, tool palettes and so on.
回复

使用道具 举报

1

主题

8

帖子

7

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:14:25 | 显示全部楼层
This is what happens:
 
  1. Command: (load setprofile); error: bad argument type: stringp nil
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 07:18:33 | 显示全部楼层
 
Assuming you have saved the file as 'setprofile.lsp' in your AutoCAD Support Path, you can load it using:
  1. (load "setprofile")
Note the quotation marks!
回复

使用道具 举报

1

主题

8

帖子

7

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:21:55 | 显示全部楼层
Had forgotten about the quotation marks. But I still can't get it to work. No new profiles show up.. I have tried it on both AutoCAD 2012 and 2013.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

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

铜币
358
发表于 2022-7-6 07:25:50 | 显示全部楼层
 
I am not sure if you are running the lisp code correctly as it's clear from your last reply , so here is a way about how to run the code .
 
* Open Autocad and type in the command line vlide and start a new file .
* Copy the codes that I posted for you and paste them in the new file in Vlide and save the file with the name test .
* Go back to autocad and type appload or ap and select the lisp file that you have just saved earlier and press load to load the lisp file .
* Finally type test in the command line to invoke the function and you must see the changes on the screen and after that type options , then
go to profile tab to see the new profile "engineering" that must be created .
 
 
Try it and let me know .
 
Hope this helps
回复

使用道具 举报

1

主题

8

帖子

7

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:28:13 | 显示全部楼层
That worked!
I had loaded the file but never actually invoked the function. My bad
 
Thanks guys for your help
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

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

铜币
358
发表于 2022-7-6 07:30:35 | 显示全部楼层
 
 
Excellent , you're welcome .
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 07:33:30 | 显示全部楼层
No worries helmer
回复

使用道具 举报

1

主题

8

帖子

7

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:37:16 | 显示全部楼层
I have one more question about this. The script provided works if I load it and start the function from the command line after a drawing has been opened. Is it possible to make this work from the acad.lsp file? My goal is to distribute the acad.lsp to all user on a network and that way automatically run this every time they start AutoCAD.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 07:40:46 | 显示全部楼层
 
In your acad.lsp type:
  1. (load "setprofile.lsp" "Unable to load setprofile.lsp")(if c:setprofile (c:setprofile))
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-10 15:02 , Processed in 0.352549 second(s), 70 queries .

© 2020-2025 乐筑天下

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