Jump to content

How do I (De)Activate OSNAP or ORTHO from script?


Recommended Posts

Posted

The question says it all:

 

How do I (De)Activate OSNAP or ORTHO from script?

 

I don't find a "written" way to toggle the OSNAP button, because "-osnap" only access the snapping options, but doesn't toggle it.

 

Also, If I click it manually, in the command bar I can see , but if I write this line, it doesn't seem to work.

 

Anybody?

 

You know, I have pretty much worked a Scripting database with my last 10 threads, all referring to scripting. There's a lot of unknown dark areas in this topic.

Posted

F3 - Toggle OSnaps

F8 - Toggle OrthoMode

 

Also, holding the Shift key down will temporarily toggle OrthoMode.

Posted

Thank you for your answer but it isn't quite what I need. Of course, that's well known the F3 and F8, but i need a way to do it through the command bar, so that i can run it from a script.

Posted

TOGGLE:

(setvar 'orthomode (abs (1- (getvar 'orthomode))))

OFF:

 (setvar 'orthomode 0)

Posted

You can de-activate OSNAP by setting OSMODE to 0 at the command line.

 

But because OSNAP can be set to differing modes, you would have to check what value OSMODE was set to, so you could set it back afterwards.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...