OsnapMode

Returns or sets the object snap mode. Object snaps are tools for specifying points on existing objects.

Syntax

rhinoscriptsyntax.OsnapMode( mode=None )

rhinoscript.application.OsnapMode( mode=None )

Parameters

mode

Optional.  Number. The object snap mode or modes to set.  Object snap modes can be added together to set multiple modes.

Value

Description

0

None

1

Near

2

Focus

4

Center

8

Knot

16

Quadrant

32

Midpoint

64

Intersection

128

End

256

Perpendicular

512

Tangent

1024

Point

Returns

Number

If mode is not specified, then the current object snap mode or modes if successful.

Number

If mode is specified, then the previous object snap mode or modes if successful.

Example

import rhinoscriptsyntax as rs

rhOsnapModeEnd = 128

mode = rs.OsnapMode()

if not (mode & rhOSnapModeEnd):

    mode = mode + rhOsnapModeEnd

    rs.OsnapMode(mode)

Also See

Osnap

OsnapDialog

ProjectOsnaps