marmo 发表于 2022-7-5 23:24:20

macro mid to point doesn'

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 whenanother 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_ 发表于 2022-7-5 23:30:07

Hi Marco,
why not use an unused function key?
I've assigned F5, very fast.

guran 发表于 2022-7-5 23:31:38

Try this:
'_M2P

marmo 发表于 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

marmo 发表于 2022-7-5 23:39:27

Hi guran,
 
you mean that i've to chenge the macro?
like this:
 
(defun c: ()
(command "'_M2P")
)

guran 发表于 2022-7-5 23:40:59

Yes, exactly!

marmo 发表于 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

guran 发表于 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."

ReMark 发表于 2022-7-5 23:51:41

M2P is not a command.It is a command modifier. Why would you need to use an apostrophe?

guran 发表于 2022-7-5 23:54:19

You're right, ReMark, I just read marmo's macro - "(command "_M2P")". That should not be a command.
页: [1] 2
查看完整版本: macro mid to point doesn'