乐筑天下

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

[编程交流] macro mid to point doesn'

[复制链接]

14

主题

74

帖子

60

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
70
发表于 2022-7-5 23:24:20 | 显示全部楼层 |阅读模式
Hi to all,
 
I often use this (nameless) macro in Autocad 2010 while another command is open.
For example I digit "line" on promp, then I choose the first point, and then to select the second point which is a midpoint between other two, I digit:
 
'' + space (more comfortable for me than using shift and right click)
 
But I found that in 2014 atucad this macro does not work when  another command is open.
Does anyone know the reason? Is there any system variable to be set?
 
The macro is:
 
(defun c: ()
(command "_M2P")
)
 
Thanks for any help
回复

使用道具 举报

GP_

8

主题

248

帖子

245

银币

初来乍到

Rank: 1

铜币
42
发表于 2022-7-5 23:30:07 | 显示全部楼层
Hi Marco,
why not use an unused function key?
I've assigned F5, very fast.
回复

使用道具 举报

2

主题

84

帖子

83

银币

初来乍到

Rank: 1

铜币
9
发表于 2022-7-5 23:31:38 | 显示全部楼层
Try this:
'_M2P
回复

使用道具 举报

14

主题

74

帖子

60

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
70
发表于 2022-7-5 23:34:45 | 显示全部楼层
Hi ,
yes, F5 is an available option, but for a long time I used ''+space,which worked well on autocad 2007 and 2010, and I do not understand why on autocad 2014 will not work anymore.
Then to assign F5 I should create a new command passing through the CUI and is something that I prefer to avoid, because I often use the computers of colleagues and my customizations (for me easily reversible) are limited to lisp files I use frequently and aliases of PGP.
I do not want to change my habits because of a simple matter, perhaps a system variable set differently ...
Thanks
回复

使用道具 举报

14

主题

74

帖子

60

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
70
发表于 2022-7-5 23:39:27 | 显示全部楼层
Hi guran,
 
you mean that i've to chenge the macro?
like this:
 
(defun c: ()
(command "'_M2P")
)
回复

使用道具 举报

2

主题

84

帖子

83

银币

初来乍到

Rank: 1

铜币
9
发表于 2022-7-5 23:40:59 | 显示全部楼层
Yes, exactly!
回复

使用道具 举报

14

主题

74

帖子

60

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
70
发表于 2022-7-5 23:45:31 | 显示全部楼层
In Autocad 2010 '_M2P give me error.
I'll try tomorrow on Autocad 2014, I'll see if it works
回复

使用道具 举报

2

主题

84

帖子

83

银币

初来乍到

Rank: 1

铜币
9
发表于 2022-7-5 23:48:11 | 显示全部楼层
This is from AutoCad 2014 help:
"To use a command transparently, enter an apostrophe (') before entering the command at any prompt."
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-5 23:51:41 | 显示全部楼层
M2P is not a command.  It is a command modifier. Why would you need to use an apostrophe?
回复

使用道具 举报

2

主题

84

帖子

83

银币

初来乍到

Rank: 1

铜币
9
发表于 2022-7-5 23:54:19 | 显示全部楼层
You're right, ReMark, I just read marmo's macro - "(command "_M2P")". That should not be a command.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-11 00:34 , Processed in 0.877990 second(s), 72 queries .

© 2020-2025 乐筑天下

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