<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Macro to turn all OSNAPS to ON in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8740429#M142291</link>
    <description>&lt;P&gt;&lt;U&gt;I'm posting this to hopefully&amp;nbsp;help others interested in the same goal I had. (I couldn't find anything on the webs)&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My company runs a LISP routine every-time I open any .dwg file up in AutoCAD and it turns all my OSNAP settings to just Intersection (among other standard things it does). This drives me crazy as I'm used to running OSNAP with all modes ON. And this LISP routine runs every-time I open another file, which happens very frequently in small spans of time as I'm jumping between parts checking measurements etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So my question/goal was; What would I have to type in for a macro to activate all OSNAP modes? (I want to map this to a key on my keyboard or mouse. My mouse comes with a macro creating feature. But this isn't about making macros, just a general solution.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are a few options I found to do this...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You can type&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-OSNAP&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;END,MID,CEN,NOD,QUA,INT,EXT,INS,PER,TAN,NEA,APP,PAR&lt;/STRONG&gt;&amp;nbsp;&amp;lt;---(type in each that you want to activate, which seems to be a lot of work, even for a simple macro. Note Geometric&amp;nbsp;Center as CE seems broken or wrong in the source link and will not work. I had to omit it, which means this command will not snap to Geometric Centers) &lt;A href="https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-CF5780AD-D1AB-4526-9608-83D7952749E7-htm.html" target="_blank" rel="noopener"&gt;Source&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;OSMODE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;16383&lt;/STRONG&gt; &amp;lt;--(That's if you add everything up. This can be broken down per what you want. This by far was the easier solution for me.) &lt;A href="https://www.cad-notes.com/using-autocad-snaps-sets/" target="_blank" rel="noopener"&gt;Source2&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If anyone else wants to suggest any other method. Feel free to add a reply.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more on custom commands, see &lt;A href="https://www.cad-notes.com/using-autocad-snaps-sets/" target="_blank" rel="noopener"&gt;Source2&lt;/A&gt; as it mentions some options. But just to repeat, I used a mouse that I love using for all my CAD programs to custom map out my macro in a non-transparent way. This can however be done in dozens of different ways for your own needs including transparent macros.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Apr 2019 16:15:00 GMT</pubDate>
    <dc:creator>noah.holweck</dc:creator>
    <dc:date>2019-04-18T16:15:00Z</dc:date>
    <item>
      <title>Macro to turn all OSNAPS to ON</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8740429#M142291</link>
      <description>&lt;P&gt;&lt;U&gt;I'm posting this to hopefully&amp;nbsp;help others interested in the same goal I had. (I couldn't find anything on the webs)&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My company runs a LISP routine every-time I open any .dwg file up in AutoCAD and it turns all my OSNAP settings to just Intersection (among other standard things it does). This drives me crazy as I'm used to running OSNAP with all modes ON. And this LISP routine runs every-time I open another file, which happens very frequently in small spans of time as I'm jumping between parts checking measurements etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So my question/goal was; What would I have to type in for a macro to activate all OSNAP modes? (I want to map this to a key on my keyboard or mouse. My mouse comes with a macro creating feature. But this isn't about making macros, just a general solution.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are a few options I found to do this...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You can type&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-OSNAP&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;END,MID,CEN,NOD,QUA,INT,EXT,INS,PER,TAN,NEA,APP,PAR&lt;/STRONG&gt;&amp;nbsp;&amp;lt;---(type in each that you want to activate, which seems to be a lot of work, even for a simple macro. Note Geometric&amp;nbsp;Center as CE seems broken or wrong in the source link and will not work. I had to omit it, which means this command will not snap to Geometric Centers) &lt;A href="https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-CF5780AD-D1AB-4526-9608-83D7952749E7-htm.html" target="_blank" rel="noopener"&gt;Source&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;OSMODE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;16383&lt;/STRONG&gt; &amp;lt;--(That's if you add everything up. This can be broken down per what you want. This by far was the easier solution for me.) &lt;A href="https://www.cad-notes.com/using-autocad-snaps-sets/" target="_blank" rel="noopener"&gt;Source2&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If anyone else wants to suggest any other method. Feel free to add a reply.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more on custom commands, see &lt;A href="https://www.cad-notes.com/using-autocad-snaps-sets/" target="_blank" rel="noopener"&gt;Source2&lt;/A&gt; as it mentions some options. But just to repeat, I used a mouse that I love using for all my CAD programs to custom map out my macro in a non-transparent way. This can however be done in dozens of different ways for your own needs including transparent macros.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 16:15:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8740429#M142291</guid>
      <dc:creator>noah.holweck</dc:creator>
      <dc:date>2019-04-18T16:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to turn all OSNAPS to ON</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8740620#M142292</link>
      <description>&lt;P&gt;Just a comment or few on the inadvisability of having &lt;EM&gt;all&lt;/EM&gt;&amp;nbsp; Osnap modes running:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't include NEArest in your running modes.&amp;nbsp; If you do, in most situations all the others will be pointless, because there's almost always a point on an Osnappable object NEArer to the cursor location than whatever other modes would give you -- NEArest NEArly always "wins" [except in &lt;EM&gt;very&lt;/EM&gt;&amp;nbsp; limited geometrical situations].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With Geometric-center [I don't know where your CE is coming from --&amp;nbsp;its abbreviation is&amp;nbsp;GCEN],&amp;nbsp;in almost all cases one of those other modes will latch onto a place on the object that's closer to the cursor location than the geometric center is.&amp;nbsp; Likewise, CENter may be kind of pointless with all those other modes going [for instance, since you have to hover&lt;EM&gt; over the drawn curve &lt;/EM&gt;&amp;nbsp;of an Arc to Osnap to its CENter, most of the time an ENDpoint or a QUAdrant point or its MIDpoint will be "seen" rather than its CENter, unless the Arc itself is small compared to the size of the Osnap aperture].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When could EXTension ever be invoked in regard to a Line, if ENDpoint and MIDpoint are in the mix?&amp;nbsp; Etc., etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some&amp;nbsp;are a little more situational.&amp;nbsp; APParent-intersection only &lt;EM&gt;sometimes&lt;/EM&gt;&amp;nbsp; finds anything with a single pick, more often needing two, so some other mode is usually&amp;nbsp;going to "win out" over it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you think about which of them you &lt;EM&gt;really make use of regularly&lt;/EM&gt;, and set it for just those, and call for the others individually when needed, since you'll often need to do that anyway to prevent some other mode from taking over.&amp;nbsp; I like the END-MID-INT-PER combination [OSMODE = 163], but you'll have a combination that suits your kind of work best.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 17:56:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8740620#M142292</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-04-18T17:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to turn all OSNAPS to ON</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8753037#M142293</link>
      <description>&lt;P&gt;I didn't want to get into the the negligible details of why all OSNAPS being on is a negative thing or not. (Didn't want to derail the purpose.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But honestly, all your points are correct as well. But in my case, I've personally become attentive enough to identify when too many snaps are a problem. It's more that I want to start with all, then adjust when the situation calls for it be narrowed in scope, just my personal preference (we all have our personal preferences and that's why AutoCAD is so great). There's some quick hotkeys that are extremely helpful for narrowing OSNAPs on the spot. Like &lt;STRONG&gt;Ctrl+right click&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as breaking down your questions/points. (It's a bit hard to explain off the top of my head, as these things happen as I work and are more 2nd nature.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nearest OSNAP: I like this b/c sometime I'm just trying to connect to the line in general for construction purposes or quick aligning something... or if I'm measuring from one line to the next, I use the X, Y, Z information in the command line to give me an exact reading.&lt;BR /&gt;&lt;BR /&gt;Geometric Center: So long as the object was made with a object to give one, this tends to still not to be an issue. Plus center takes over b/c it's has more importance for good reason. It is however useful for hex head bolts though to ensure their centered on my holes etc. Also it was helpful when I'm aligning centerlines or section / detail callouts. But again it's&amp;nbsp;negligible to worry about for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as the rest: it's pretty relate-able to Autodesk Inventor sketch mode. Extensions come on for everything in that all the time (kinda obnoxious until you get used to it). You just place and adjust or get used to it and know when that extension is useful or not and take advantage of the scenario. (And yes I know in AutoCAD, you don't place things and then adjust and Inventor is designed for that type of workflow.) But I use it often to start off of nearby, then go back and delete the useless features later when I'm satisfied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But yes, like you said. We all have a personal preference to how we use AutoCAD. This has been working great for my needs. I just wanted to share some knowledge just in case others could benefit on the macro.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2019 14:50:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8753037#M142293</guid>
      <dc:creator>noah.holweck</dc:creator>
      <dc:date>2019-04-25T14:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to turn all OSNAPS to ON</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8753399#M142294</link>
      <description>&lt;P&gt;Rather than adding up the 2-to-the-nth code for the osnap options (e.g., END&amp;nbsp; = 1, MID = 2, CEN = 4, etc.) just turn on and set the osnaps the way you want and then type:&lt;/P&gt;
&lt;P&gt;(getvar "osmode")&lt;/P&gt;
&lt;P&gt;this will yield the number you want to use for turning on osnap to the desired configuration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if you have END and CEN set and osnap is ON then typing&amp;nbsp;&amp;nbsp;(getvar "osmode") will output 5.&amp;nbsp; The command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;(setvar "osmode" 5)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will turn on osnap with the settings END and CEN.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2019 16:49:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8753399#M142294</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2019-04-25T16:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to turn all OSNAPS to ON</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8754102#M142295</link>
      <description>As an extension to Lee's suggestion - find your "magic number".&lt;BR /&gt;&lt;BR /&gt;From there are several ways to create and access:&lt;BR /&gt;&lt;BR /&gt;Create a command in the CUI - ^C^COSMODE;687; and populate one of the UI areas.&lt;BR /&gt;If toolbar or ribbon, assign an image.&lt;BR /&gt;&lt;BR /&gt;Write a single line in the ACADDOC.lsp, acad.lsp or MyMenu.MNL -&lt;BR /&gt;(defun c:MyUserInitials () (setvar 'OSMODE 687)(princ))&lt;BR /&gt;&lt;BR /&gt;While in the LSP/MNL file:&lt;BR /&gt;(setvar 'MODEMACRO "osm:$(getvar,osmode)")&lt;BR /&gt;to keep tract of what the current setting is.&lt;BR /&gt;&lt;BR /&gt;???&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Apr 2019 22:21:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/macro-to-turn-all-osnaps-to-on/m-p/8754102#M142295</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2019-04-25T22:21:25Z</dc:date>
    </item>
  </channel>
</rss>

