乐筑天下

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

[综合讨论] Macro, Script or Lisp?

[复制链接]
Cat

6

主题

45

帖子

39

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-7 00:18:09 | 显示全部楼层 |阅读模式
What would be the best way to have the following occur automatically when you open a drawing?
Grid on, set to .125
Snap on, set to .0625
Ortho and Osnap off
 
I'm familiar with "old fashioned" line by line scripts, but that's about it........sad I know.
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-7 00:25:27 | 显示全部楼层
One could ask why aren't these set as a part of your template?
Would you ever be toggling all these on/off enmasse during a drawing session?
回复

使用道具 举报

Cat

6

主题

45

帖子

39

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-7 00:35:48 | 显示全部楼层
 
Actually Remark, these are the "personal" working preferences of my supervisor and I'm trying to eliminate some of the stress in her life. It drives her crazy when she works behind someone who uses other preferences.
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-7 00:38:41 | 显示全部楼层
For your boss I'd recommend a macro assigned to a button.  It will give her an alternate button to push instead of yours.
回复

使用道具 举报

4

主题

2143

帖子

2197

银币

限制会员

铜币
-24
发表于 2022-7-7 00:47:02 | 显示全部楼层
You could set that up in the ACADDOC.LSP
 
Search around on CADTutor for tips on modifying the ACADDOC.LSP and creating custom macro for a button.
回复

使用道具 举报

Cat

6

主题

45

帖子

39

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-7 00:53:30 | 显示全部楼层
Thanks for the input. I searched the net a bit yesterday and I think modifying the acaddoc.lsp is probably the way to go. I could write a script for her to run across the project before she started working on the drawings, but she would prefer not to have to do anything other than open the drawing.
回复

使用道具 举报

4

主题

2143

帖子

2197

银币

限制会员

铜币
-24
发表于 2022-7-7 00:57:13 | 显示全部楼层
 
There are plenty of examples on CADTutor for modifying the ACADDOC.LSP, just remember to save your original with another name, I usually go with acaddocoriginal.lsp.
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-7 01:03:24 | 显示全部楼层
One could do things a lot simpler, but this is what I run at startup...
 
  1. (defun AlanIfCheck (/) (if (eq (strcase (getvar "loginname")) "ATHOMPSON")   (progn     (foreach var              '(("fullplotpath" 0)                ("dtexted" 0)                ("inputhistorymode" 0)                ("vtenable" 0)                ("insunits" 0)                ("osnaphatch" 0)                ("traynotify" 0)                ("mtextfixed" 0)                ("cursorsize" 100)                ("cecolor" "bylayer")                ("celtscale" 1)                ("celtype" "bylayer")                ("gripsize" 6)                ("pickbox" 5)                ("aperture" 20)                ("peditaccept" 1)                ("BLIPMODE" 0)                ("CMDECHO" 0)                ("FILEDIA" 1)                ("MIRRTEXT" 0)                ("PLINEGEN" 1)                ("UCSICON" 1)                ("mtextfixed" 0)                ("mtexted" "internal")                ("mtjigstring" "ajt :-)")                ("attreq" 1)                ("dynmode" -2)                ("lockui" 3)                ("shortcutmenu" 18)                ("osnapz" 1)                ("xreftype" 1)                ("layernotify" 4)                ;; ("savetime" 15)                ("selectionarea" 0)                ("autosnap" 63) ; 55)                ("snapmode" 0)                ("gridmode" 0)                ("expert" 0)                ("dimassoc" 2)                ("edgemode" 1)                ("SELECTIONANNODISPLAY" 0)                ("MTEXTTOOLBAR" 1)                ("modemacro"                 "$(getvar,clayer)  ($(edtime, $(getvar,date),H:MMam/pm) - $(edtime,$(getvar,date),M.DD.YY))  Textsize: $(getvar,textsize) $(if, $(!=, $(getvar,viewtwist), 0), Viewtwist: $(angtos, $(getvar,viewtwist) [, 0, 2]) , ) AnnoScale: $(getvar,cannoscale)  Dimscale: $(getvar,dimscale) $(if, $(!=, $(getvar,filletrad), 0), FilletRad: $(getvar,filletrad), ) $(if, $(=, $(getvar,worlducs), 1),*WCS* ,*NON-WCS*) "                )               )       (vl-catch-all-apply (function setvar) var)     )     (command "_.wipeout" "_f" "_off")     (command "_.sheetsethide")     (princ (strcat "\nHey " (getvar "loginname") " you are all setup!"))   )   (alert "Who the hell are you?") ) (princ))
回复

使用道具 举报

Cat

6

主题

45

帖子

39

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-7 01:06:52 | 显示全部楼层
:lol::lol::lol::lol:
I'm a not lisp guru, but even I've read enough to know what
 
does.
 
You just made my day.
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-7 01:13:54 | 显示全部楼层
Who are you, who, who, who, who.
 
Now that the song is stuck in my head I'll just have to load up my Who - Live at Leeds CD and blast away!
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-9 09:17 , Processed in 0.481945 second(s), 72 queries .

© 2020-2025 乐筑天下

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