乐筑天下

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

[编程交流] Restore Osnap's

[复制链接]

6

主题

14

帖子

8

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-6 17:15:16 | 显示全部楼层 |阅读模式
I use an addon called Hydratec with AutoCAD 2007.  One of our commands presets the Osnaps.  I want to make a button so after I finish with the Hydratec command I can restore my Osnap settings.  I want to be able to use it in the middle of a command with out breaking the command if possable.  Thanks for any help!
回复

使用道具 举报

0

主题

24

帖子

24

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-6 17:20:37 | 显示全部楼层
Off the top of my head, I can think it may be possible, but you would either (a) have to click a button before using the tool to 'mark' the snap settings, or (b) use a standard list of snaps, then activate any additional afterwards.
would this be ok?
回复

使用道具 举报

4

主题

940

帖子

961

银币

初来乍到

Rank: 1

铜币
12
发表于 2022-7-6 17:23:04 | 显示全部楼层
use this macro for a new command and make a toolbar button from it.
  1. (setvar "osmode" 1)
the integer after "osmode" is the sum of the bitcodes for the snaps you want on. The above will turn endpoint on. See Help for the system variable Osmode for a listing of the bitcodes.
回复

使用道具 举报

6

主题

14

帖子

8

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-6 17:27:27 | 显示全部楼层
 
That worked for creating a new button thanks! Is there a way to make the button not break my current command? ie. I am in the middle of a move command and need to reset my Osnaps I click the button and my command doesnt break. Currently while in a command it does break the command.
 
Thanks for all the help so far!
回复

使用道具 举报

0

主题

24

帖子

24

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-6 17:28:45 | 显示全部楼层
If you are in the middle of a command, then just hold Shift + RightClick to select a temporary snap point. Then reset the snaps after.
 
cheers
回复

使用道具 举报

4

主题

940

帖子

961

银币

初来乍到

Rank: 1

铜币
12
发表于 2022-7-6 17:32:28 | 显示全部楼层
If you have ^C^C in your macro remove them.
回复

使用道具 举报

6

主题

14

帖子

8

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-6 17:35:38 | 显示全部楼层
 
I removed the ^C^C  it is still breaking my command.  I have tryed putting a ' infront of the command but all that seems to do is mess up the command all together.  Any other suggestions?
回复

使用道具 举报

4

主题

940

帖子

961

银币

初来乍到

Rank: 1

铜币
12
发表于 2022-7-6 17:40:33 | 显示全部楼层
Works for me, are you trying it in the the middle of an Autocad command or Hydratec command?
回复

使用道具 举报

6

主题

14

帖子

8

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-6 17:41:05 | 显示全部楼层
that is how I have entered it. it uses the 4159 as a distance to move the object i have selected.
回复

使用道具 举报

0

主题

269

帖子

279

银币

限制会员

铜币
-4
发表于 2022-7-6 17:46:47 | 显示全部楼层
try
 
(setvar "osmode" 4159)(princ)
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-4 16:13 , Processed in 0.745931 second(s), 72 queries .

© 2020-2025 乐筑天下

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