PDA

View Full Version : Call the Osnap Cursor Menu from a Macro


Sailinshuz
2008-07-15, 09:44 PM
Is there a guru out there who can tell me how to Call the Osnap Cursor Menu from a Macro?

I am getting acclimated to using a 2 button Space Navigator while running AutoCAD, and I thought it would be nice to assign a macro to one of the buttons that would call the osnap cursor menu to assist with picking osnaps.

I dislike using running osnaps and find it a little inefficient to remove my hand from the Space Navigator to depress the CTL key and right click.

Thanks,

Dave

tedg
2008-07-15, 09:57 PM
Is there a guru out there who can tell me how to Call the Osnap Cursor Menu from a Macro?

I am getting acclimated to using a 2 button Space Navigator while running AutoCAD, and I thought it would be nice to assign a macro to one of the buttons that would call the osnap cursor menu to assist with picking osnaps.

I dislike using running osnaps and find it a little inefficient to remove my hand from the Space Navigator to depress the CTL key and right click.

Thanks,

Dave
Can you assign "middle button" to one of the buttons and set "mbuttonpan" to 0 (off)?

Sailinshuz
2008-07-16, 05:04 PM
Actually, there is no middle button function to assign. Good idea, though. :beer:

I assigned the Shift key to the right button, which eliminates having to move my left hand from the Navigator to the keyboard to hit the Shift key to pick an Osnap. Still not exactly what I am after, but it will do until I can figure out how to call the Osnap cursor menu from a macro.

Thanks for the input ...

Dave

tedg
2008-07-16, 06:07 PM
Actually, there is no middle button function to assign. Good idea, though. :beer:

I assigned the Shift key to the right button, which eliminates having to move my left hand from the Navigator to the keyboard to hit the Shift key to pick an Osnap. Still not exactly what I am after, but it will do until I can figure out how to call the Osnap cursor menu from a macro.

Thanks for the input ...

Dave
I'm not sure if this helps, but the macro for the osnap pull-down menu in the CUI is
$P0=SNAP $p0=*
Just for kicks, I created a tool button with this through the CUI and it works.

Sailinshuz
2008-07-16, 06:53 PM
I'm not sure if this helps, but the macro for the osnap pull-down menu in the CUI is
$P0=SNAP $p0=*
Just for kicks, I created a tool button with this through the CUI and it works.

I tried it, but it didn't work. In order to get this thing to work, I might can place the ($P0=SNAP $p0=* ) code into a newly defined command as part of a lisp routine that can be invoked transparently while using draw commands.

I am sort grasping at straws....

Sailinshuz
2008-07-17, 02:57 PM
Here's the solution folks:

Topic: AutoLISP in Macros

(menucmd "P0=*")

Thanks for the replies.

Dave

tedg
2008-07-17, 03:07 PM
Here's the solution folks:

Topic: AutoLISP in Macros

(menucmd "P0=*")

Thanks for the replies.

Dave
Thanks for the update!