Creating Custom Object Snap Modes

Custom object snap modes allow the developer to set the following attributes:

For more information on setting these attributes, see the ObjectARX Reference.

A custom object snap mode is defined by registering an instance of the AcDbCustomOsnapMode class with the custom object snap manager, described in the previous section.

When a custom object snap mode is used, AutoCAD ® takes the class object returned by AcDbCustomOsnapMode::entityOsnapClass(), looks up the corresponding protocol extension object for the picked entity, and invokes AcDbCustomOsnapInfo::getOsnapInfo() to obtain the points or lines associated with that entity and object snap mode. If the final candidate point is associated with that object snap mode, AutoCAD displays the glyph object from the instance returned by AcDbCustomOsnapMode::glyph() and the ToolTip string returned by AcDbCustomOsnapMode::tooltipString().