SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Enumerations
component_definition_snap_to_behavior_private.h File Reference

Definition for SUSnapToBehavior. Don't include directly. More...

Enumerations

enum  SUSnapToBehavior {
  SUSnapToBehavior_None, SUSnapToBehavior_Any, SUSnapToBehavior_Horizontal, SUSnapToBehavior_Vertical,
  SUSnapToBehavior_Sloped
}
 Describes how the component instance can be placed when a user adds it to a model. More...
 

Detailed Description

Definition for SUSnapToBehavior. Don't include directly.

Warning
Do not include this header directly. This file is part of a compatibility shim. Instead include SketchUpAPI/model/component_definition.h.

Enumeration Type Documentation

Describes how the component instance can be placed when a user adds it to a model.

For example a window component instance should snap to a vertical plane.

See Also
SUComponentBehavior
Bug:
This enum was incorrectly defined inside the SUComponentBehavior struct. This is not valid C. As of SketchUp 2025.0 (API 13.0), this enum is conditionally defined outside of the struct when the header is consumed by a C compiler.
// Usage from a C compiler:
SUComponentDefinitionSetBehavior(component_definition, &behavior);
if (behavior.component_snap == SUSnapToBehavior_Vertical) {
// ...
}
// Usage from a C++ compiler:
SUComponentDefinitionSetBehavior(component_definition, &behavior);
if (behavior.component_snap == SUComponentBehavior::SUSnapToBehavior_Vertical) {
// ...
}