Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
.NET
»
Topic:
Custom Osnap
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Custom Osnap (Read 2653 times)
0 Members and 1 Guest are viewing this topic.
jgr
Guest
Custom Osnap
«
on:
April 08, 2010, 09:18:20 PM »
With acad 2009 (or other)
How do I detect when activated or deactivated custom osnap's (CustomObjectSnapMode)?
For me, does not work with CustomObjectSnapMode, CommandWillStart, Command... events.
Thanks (sorry, i do not speak english).
Logged
gile
Gator
Posts: 2520
Marseille, France
WWW
Re: Custom Osnap
«
Reply #1 on:
April 09, 2010, 03:37:41 AM »
Hi,
CustomOsnaps work the same way as native osnaps.
You can managed the activation with a registered 'custom sysvar'.
You can get some inspiration from
this thread
(source code for a single solution for different target versions for AutoCAD
here
).
In the Commands class, a command (CUSTOSMODE) and 2 LISP functions (gc-GetCustOsmode and gc-SetCustOsmode) allows the user to activate/deactivate osnaps.
Logged
Speaking English as a French Frog
jgr
Guest
Re: Custom Osnap
«
Reply #2 on:
April 09, 2010, 12:49:08 PM »
Thanks, I know your code. My (vb.net) code is a copy of yours,
In AutoCAD 2009 you can turn on/off the custom osnaps from a menu (right click on statusbar "osnap" button) and does not fire any event and i would like to know when they are activated or deactivated.
For if it helps someone:
I sent the vb.net code. Is your code (converted to vb.net) with some modifications.
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
.NET
»
Topic:
Custom Osnap