Hello,
could someone please help me to create DRAGMODE ON / OFF toggle with Macro, or maybe LISP
Thank you in advance!
Solved! Go to Solution.
Solved by Haider_of_Sweden. Go to Solution.
Why not create three buttons in your CUI? I added one to one of the menus.
This is the syntax:
Please select the Accept as Solution button if my post solves your issue or answers your question.
Hi,
if i understand your need right ... i suggest to try this :
repeat the previous steps to record DRAGMODE = OFF. NOW you have a customize commands name will be active and always whenever you need it.
Hope that it's help haider ..
Imad Habash
'dragmode $M=$(if,$(and,$(getvar,dragmode),2),0,$(+,$(getvar,dragmode),1))
This one togles between the 3 values DRAGMODE can have. and transparently
@tramber wrote:'dragmode $M=$(if,$(or,$(and,$(getvar,dragmode),1),$(and,$(getvar,dragmode),2)),0,1)Even simplier !
Yes, this looks like what I am searching for.
However, if I put it in an .SCR file and drag it into AutoCAD, it wont work. Do you really start with 'dragmode?
' before DRAGMODE allows you to click as you excecute any command. But the fact is that it wont show the effect during a draging.. action.
Nevertheless, Il should learn you that scripts are pretty different and don't allow any toggling, dont' they ?
' doesn't exists either in a script, as far as I know.
My solution stands for a buttton. Scirpting DRAGMODE is strange to me but you are welcome to do it with no DIESEL, no '
!
Well, sory to publish again but the question of the transparency in script may be asked. I should remember but it's time for me to go and we 'll talk about later on.
Hope I helped.
B
France
@tramber wrote:' before DRAGMODE allows you to click as you excecute any command. But the fact is that it wont show the effect during a draging.. action.
Nevertheless, Il should learn you that scripts are pretty different and don't allow any toggling, dont' they ?
' doesn't exists either in a script, as far as I know.
My solution stands for a buttton. Scirpting DRAGMODE is strange to me but you are welcome to do it with no DIESEL, no '
!
Unfortunately, this worked neither a shortcut nor button.
Maybe it is not working because of the transparent command? Although, I think transparent DRAGMODE might be rather cool instead of using ^C^C
It's about midnight where I live, I have to go
Yes it works good at my place.
Don't know what is going on...
^c^c is not an obligation.
' is cool
Again, I don't know what could be wrong for you with this humble macro
Your code resulted in "Invalid option keyword."
GETVAR gives us 0,1 and 2, but the input should be AUTO or OFF.
This is how I solved it;
^C^Cdragmode $M=$(if,$(and,$(getvar,dragmode),2),OFF,AUTO)
A note regarding transparent command in this context. The DRAGMODE effect won't be actualized until next time anyway, so using a transparent command is unfortunately of no use here. I was hoping it actually toggled DRAGMODE on the fly, not toggling it for next time's use.
Thank you for laying the ground for me.
Well, at least it is a solution.
let's dig it before i fall asleep !
What version are u running ? I'm on 2015 (edited).
And i like to try my 'macro. Look, it's funny to draw a polyline and to click on your button.
God. How is it that it doesn't work as I thought it would on any version ?
Why don't you put the macro in an accelerator then, rather than in a button ?
Anyway, it is still a mystery to me that you seem not to be able to get the same result
Ni______(on)ce We (off)ek-end !
What is an accelerator?
By the way, I put it in a button, just for test purpose. Now I run it as a shortcut.
My solution is intended for a button. Not for a script. This is why the ' should work.
Did we misunderstood ?
An accelerator is found in the CUI interface and corresponds to a CTRL+C, for exemple.
You may know CTRL+L or CTRL+B, that's an accelerator too (I'm not under English version but I think that it is the word)
Have a look in CUI, it is easy to find.
You can create one, with a '
Can't find what you're looking for? Ask the community or share your knowledge.