simulate pressing a key while grread is active?

simulate pressing a key while grread is active?

cadomatic
Enthusiast Enthusiast
831 Views
10 Replies
Message 1 of 11

simulate pressing a key while grread is active?

cadomatic
Enthusiast
Enthusiast

Hi,

I have a function that uses grread.

While grread is running, I use a key to manipulate the cursor shape.

I want to add the option to use a ribbon button for this as well.

However, if I add a macro for the button, such as "R," it terminates grread.

Is it possible to use a button macro as an option trigger for a command line command? Specifically, can the button simply simulate pressing "R" while grread is active?

 

thanks

S

0 Likes
832 Views
10 Replies
Replies (10)
Message 2 of 11

komondormrex
Mentor
Mentor

hey,

i think it shouldn't terminate grread, but you cannot distinguish the macro itself because grread will give you sort of (11 -1) on every toolbar or ribbon item click. so technically, you can switch cursors by clicking on any toolbar or ribbon item. you also can use right-click for that purpose.

0 Likes
Message 3 of 11

cadomatic
Enthusiast
Enthusiast

what is 11-1? 

 

the macro in the button terminates grread. 

 

my grread used R to manipulate action , if i macro R in the button, it terminates grread and calling redraw

0 Likes
Message 4 of 11

komondormrex
Mentor
Mentor

that is what grread returns.

komondormrex_0-1717397632421.gif

 

0 Likes
Message 5 of 11

cadomatic
Enthusiast
Enthusiast

i dont understand. 

 

what is the meaning of 11-1 returned by grread?

 

and what it have to do with the original problem?

 

 

0 Likes
Message 6 of 11

komondormrex
Mentor
Mentor

you catch that list while grread is active and switch cursor then.

0 Likes
Message 7 of 11

cadomatic
Enthusiast
Enthusiast

im not sure we are taking about the same thing.

 

with grread active , user can press a key to do something. 

 

i want to allow the user to press a button instead of using that key.

 

but when i try , the grread is terminated. autocad treat that as a new command and not as a key pressed while grread is running.

0 Likes
Message 8 of 11

komondormrex
Mentor
Mentor

are you going to use grread's curtype argument to change cursor or draw extra exotic self drawn one?

0 Likes
Message 9 of 11

cadomatic
Enthusiast
Enthusiast

grread is used to attach a rectangle to the cursor. pressing R rortate that rectangle

0 Likes
Message 10 of 11

komondormrex
Mentor
Mentor

some similar to this? right-click rotation. 

komondormrex_0-1717402342270.gif

 

Message 11 of 11

cadomatic
Enthusiast
Enthusiast

kind of. do you press any key to rotate it? 

 

let say you press R , but i cant set a button that simulate pressing R

0 Likes