• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

predefined configurations object snap types

  • Thread starter Thread starter strudel
  • Start date Start date

strudel

Guest
Hello.
in autocad 2010, I often have to change the triggered snaps, for example:
- quotation: active only fine, dial, intersection
- normal design: all active
- other setting: center, middle point

I would like to know if it is possible, instead of having to open the curtain every time and click on the desired snaps, if I can make three types of configuration like: quotas, all, no one else; so you can change the active snaps by clicking on one button.

thanks for the courteous attention
greetings
 
Yes, that's possible.

each osnap has a numerical value (of each one you can find the value in the online guide).
simply sum the values of the osnap you want and get the total value to assign to the osmode variable (reachable also directly through the osmode command).

to make a stupid example, no snap takes value 0, therefore typing by keyboard (or through a macro) osmode -> sending -> 0 -> sending will disable the osnap (in a permanent way, not as the f3) key does.
the end combination, mid, cen, int, nod, ins has as sum for example 111.
you type osmode -> sending -> 111 -> sending and you activate the combination of osnap reported.

being osmodes a command that can be transparent, just prioritize the apostrophe, changing it in 'The mode to change the osnap combo even during another command.
 
It can't happen.
a certain combination, generates only one sum and only that.
the values of individual osnap make sure that this does not happen.
 
great, thank you very much, but:
Can't a certain sum not be given by several osnap?
here (official documentation autodesk):http://tinyurl.com/9pu26xyyou can find how to realize the sums (it is a binary mask; that is why there is no danger that at equal numbers correspond different settings).

if you don't want to make the sums you can always set the osnap directly for how you need it and then display the content of the osmode variable (just write it and autocad displays the current value and asks you what new value to assign).
by wanting you can store directly in a variable its value:
(setq a (getvar "osmode))
this instruction stores in the current osnap settings.
repeat it for the other combinations you need (maybe using letters b, c etc. or the names you want) and you are appropriate.
to restore the value to you useful just an instruction of the type:
(setvar "osmode" a)
Anyway, you better sign the values somewhere.

Note the values you may assign to appropriate keys the assignments of the type:
(setvar "osmode" 31743).
But this key assignment is something I never looked at and now, honestly, I can't tell you how to do it.
 
But this key assignment is something I never looked at and now, honestly, I can't tell you how to do it.
It's a very simple thing.
to the key check the macro 'smode; roam; deleting the "c^c" that is proposed by default, in order not to lose the transparency of the command.

assigning the osmode value to a variable can make sense in a lisp program, but not in general usage. at the exit from the current design you would lose all values.
 
great, as you say you have to keep in mind the sums.
Is there a way to assign to each icon the value to use?
 
lattu, as already mentioned before, by customization (the English command is to which), in the button that you create checks to the macro value string 'smode; roam;you will have (for example) a button with 'osmode;an altro 'osmode;111; and so forth for those who make you more comfortable.

the marked structure, allows you to change the osnap without exiting the current command.

below the osnap values table. just sum up to have the combination

e.g. near+quadrante+nodo = 512+16+8=536 to assign to osmode (although it doesn't make sense because the snap near causes the choice of other osnap)

0 None
1 endpoint
2 midpoints
4 center
8 knots
16 quadrant
32 intersection
64 insertion
128 perpendicular
256 tangent
512 nearest
1024 clears all object snaps
2048 apparent intersection
4096 extension
8192 parallel
 
Thank you.
I created new buttons with 'osmode n one assignment for every configuration I need and I made a drop-down menu in the toolbar
works perfectly
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top