×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

?about OSNAP settings?

?about OSNAP settings?

?about OSNAP settings?

(OP)
there was a Post here in this forum a while back that i just thought about and if the one who wrote it could give me an idea of how he did it it would be a nice little tip for us all
had some thing to do with or equal to OSNAP States

which means say you have certain OSNAPS that you use often and turned on when you do certain funtions in autocad but instead of going into drafting settings you just click a button and then they are all preset so take for example

i use the following OSNAPS often enough to warent this
NODE
End
MID
INT
PERP
so if in 1 button i want to use this "OSNAP State"
how would i do so  

if everyone helps everybody the world will be a better place

RE: ?about OSNAP settings?

Not sure if it is the same (assuming that it is) for all recent versions of  AutoCAD, there are 2 ways to do it.

1:  Modify the existing osnap button that is on a standard Autocad toolbar (SNAPS toobar, in LT2000) (preferred if you are the only one that uses that machine)

or

2:  Create a new button, and place it on the toolbar of your choice, usually a custom toolbar. (preferred if multiple users are on one machine)

(the following applies for sure to LT2000, and should be reasonably close to other releases, I think)

To modify the existing button, right click on it, and hit customize, then right click on it again, and hit properties
for your application, the command line should read
'-osnap_node,end,mid,int,perp_
where the underscores are spaces.  Then click apply and close.

To create a new button, right click on any button and hit customize.  Go to user commands, and drag the blank button to the toolbar desired, then right click on the button and hit properties.  enter the command line above, and label the button as desired, with the icon desired, and hit apply.

I hope this info helps, and again, please let me know if I missed something in it and it gives you problems

RE: ?about OSNAP settings?

I don't know if this will help, but this is how I use OSNAP in AutoCAD LT97:

I press (F3) to turn it on, and (F3) again to turn it off.
While on, pressing (Shift + right-clicking) brings up the OSNAP menu.

Hope it helps,
andyd211

RE: ?about OSNAP settings?

I use the "osmode" system variable to accomplish this.  
Osmode sets running object snap modes using the following bit-codes:

0    NONe
1    ENDpoint
2    MIDpoint
4    CENter
8    NODe
16    QUAdrant
32    INTersection
64    INSertion
128    PERpendicular
256    TANgent
512    NEArest
1024    QUIck
2048    APParent Intersection

To specify more than one object snap, enter the sum of their values. In your case, setting the button macro to '_osmode;171; will give the osnap settings you want.

RE: ?about OSNAP settings?

(OP)
ok Well with knowing this has anyone thought of making a lisp routine that saves these settings to a text file and is able to recall them later??

Like So

1 you set the running osnaps in the Drafting settings dialog
2 run the routine it reads this saves it out to a text file in the same location as the lsp file and names this set of osnaps 1st setting and then if the configureation changes it does it again
3 then when you want to recall those settings all you do is run the routine with the # of the setting list that you want restored.

And there you would have osnap states

if everyone helps everybody the world will be a better place

RE: ?about OSNAP settings?

The best place for these settings is in your acad.lsp file (or acadr14.lsp) if using R14. The syntax is (defun C:XX()command "OSMODE" "nn")), where XX is the keyboard shortcut you want to use and nn is the osmode value you want to set.  For example, to assign the keyboard shortcut xs to the snap state you mentioned in your first post you would enter (defun C:xs() (command "OSMODE" "171")) in your acad.lsp file.  Then any time you type in xs at the command prompt the snaps will be set.  I would recommend also having a line (defun C:N()  (command "OSMODE" "0")) so that you can also remove all snap settings easily.  If you want to customize a toolbar button for this snap setting add a new button to a toolbar, right click on the button and enter '_osmode;171; in the button macro.     

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources