SketchUp C API

- Main Page
- Related Pages
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SURenderingOptionsRef Struct Reference

Used to get and set values in a rendering options object. More...

`#include <SketchUpAPI/model/rendering_options.h>`

## Related Functions
(Note that these are not member functions.)
enum SUResult | SURenderingOptionsGetNumKeys (SURenderingOptionsRef rendering_options, size_t *count)
| Gets the number of available rendering options keys. More...
enum SUResult | SURenderingOptionsGetKeys (SURenderingOptionsRef rendering_options, size_t len, SUStringRef keys[], size_t *count)
| Retrieves keys associated with the rendering options object. More...
enum SUResult | SURenderingOptionsSetValue (SURenderingOptionsRef rendering_options, const char *key, SUTypedValueRef value_in)
| Sets values in a rendering options object. More...
enum SUResult | SURenderingOptionsGetValue (SURenderingOptionsRef rendering_options, const char *key, SUTypedValueRef *value_out)
| Retrieves the value of a given rendering option. More...

## Detailed Description

Used to get and set values in a rendering options object.

## Friends And Related Function Documentation

enum SUResult SURenderingOptionsGetKeys | ( | SURenderingOptionsRef | rendering_options,
|  | size_t | len,
|  | SUStringRef | keys[],
|  | size_t * | count
| ) |  |
| related

Retrieves keys associated with the rendering options object.

Since
  SketchUp 2017, API 5.0

Parameters

  [in] | rendering_options | The rendering options object.
  [in] | len | The number of keys to retrieve.
  [out] | keys | The keys retrieved.
  [out] | count | The number of keys retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if rendering_options is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if keys or count is NULL
  - SU_ERROR_INVALID_OUTPUT if any of the strings in the keys array are invalid.

enum SUResult SURenderingOptionsGetNumKeys | ( | SURenderingOptionsRef | rendering_options,
|  | size_t * | count
| ) |  |
| related

Gets the number of available rendering options keys.

Since
  SketchUp 2017, API 5.0

Parameters

  [in] | rendering_options | The rendering options object.
  [out] | count | The number of keys available.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if rendering_options is not valid
  - SU_ERROR_NULL_POINTER_OUTPUT if count is NULL

enum SUResult SURenderingOptionsGetValue | ( | SURenderingOptionsRef | rendering_options,
|  | const char * | key,
|  | SUTypedValueRef * | value_out
| ) |  |
| related

Retrieves the value of a given rendering option.

Parameters

  [in] | rendering_options | The rendering options object.
  [in] | key | The key. Assumed to be UTF-8 encoded.
  [out] | value_out | The value retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if rendering_options is an invalid object
  - SU_ERROR_NULL_POINTER_INPUT if key is NULL
  - SU_ERROR_INVALID_OUTPUT if value_out is an invalid object
  - SU_ERROR_NULL_POINTER_OUTPUT if value_out is NULL

The breakdown of rendering options and value types is shown in the table below.

Rendering Option | Value Type | Since
--- | --- | ---
`"BackgroundColor"` | SUTypedValueType_Color |
`"BandColor"` | SUTypedValueType_Color |
`"ConstructionColor"` | SUTypedValueType_Color |
`"DepthQueWidth"` | SUTypedValueType_Int32 |
`"DisplayColorByLayer"` | SUTypedValueType_Bool |
`"DisplayDims"` | SUTypedValueType_Bool |
`"DisplayFog"` | SUTypedValueType_Bool |
`"DisplayInstanceAxes"` | SUTypedValueType_Bool |
`"DisplaySectionPlanes"` | SUTypedValueType_Bool | SketchUp 2014, API 2.0
`"DisplaySectionCuts"` | SUTypedValueType_Bool | SketchUp 2015, API 3.0
`"DisplaySketchAxes"` | SUTypedValueType_Bool |
`"DisplayText"` | SUTypedValueType_Bool |
`"DisplayWatermarks"` | SUTypedValueType_Bool |
`"DrawBackEdges"` | SUTypedValueType_Bool | SketchUp 2015, API 3.0
`"DrawDepthQue"` | SUTypedValueType_Bool |
`"DrawGround"` | SUTypedValueType_Bool |
`"DrawHidden"` | SUTypedValueType_Bool |
`"DrawHiddenGeometry"` | SUTypedValueType_Bool | SketchUp 2020, API 8.0
`"DrawHiddenObjects"` | SUTypedValueType_Bool | SketchUp 2020, API 8.0
`"DrawHorizon"` | SUTypedValueType_Bool |
`"DrawLineEnds"` | SUTypedValueType_Bool |
`"DrawProfilesOnly"` | SUTypedValueType_Bool |
`"DrawSilhouettes"` | SUTypedValueType_Bool |
`"DrawUnderground"` | SUTypedValueType_Bool |
`"EdgeColorMode"` | SUTypedValueType_Int32 |
`"EdgeDisplayMode"` | SUTypedValueType_Int32 |
`"EdgeType"` | SUTypedValueType_Int32 |
`"ExtendLines"` | SUTypedValueType_Bool |
`"FaceBackColor"` | SUTypedValueType_Color |
`"FaceFrontColor"` | SUTypedValueType_Color |
`"FogColor"` | SUTypedValueType_Color |
`"FogEndDist"` | SUTypedValueType_Double |
`"FogStartDist"` | SUTypedValueType_Double |
`"FogUseBkColor"` | SUTypedValueType_Bool |
`"ForegroundColor"` | SUTypedValueType_Color |
`"GroundColor"` | SUTypedValueType_Color |
`"GroundTransparency"` | SUTypedValueType_Int32 |
`"HideConstructionGeometry"` | SUTypedValueType_Bool |
`"HighlightColor"` | SUTypedValueType_Color |
`"HorizonColor"` | SUTypedValueType_Color |
`"InactiveFade"` | SUTypedValueType_Double |
`"InactiveHidden"` | SUTypedValueType_Bool |
`"InstanceFade"` | SUTypedValueType_Double |
`"InstanceHidden"` | SUTypedValueType_Bool |
`"JitterEdges"` | SUTypedValueType_Bool |
`"LineEndWidth"` | SUTypedValueType_Int32 |
`"LineExtension"` | SUTypedValueType_Int32 |
`"LockedColor"` | SUTypedValueType_Color |
`"MaterialTransparency"` | SUTypedValueType_Bool |
`"ModelTransparency"` | SUTypedValueType_Bool |
`"RenderMode"` | SUTypedValueType_Int32 |
`"SectionActiveColor"` | SUTypedValueType_Color |
`"SectionCutDrawEdges"` | SUTypedValueType_Bool | SketchUp 2015, API 3.0
`"SectionCutFilled"` | SUTypedValueType_Bool | SketchUp 2018, API 6.0
`"SectionCutWidth"` | SUTypedValueType_Int32 |
`"SectionDefaultCutColor"` | SUTypedValueType_Color |
`"SectionDefaultFillColor"` | SUTypedValueType_Color | SketchUp 2018, API 6.0
`"SectionInactiveColor"` | SUTypedValueType_Color |
`"ShowViewName"` | SUTypedValueType_Bool |
`"SilhouetteWidth"` | SUTypedValueType_Int32 |
`"SkyColor"` | SUTypedValueType_Color |
`"Texture"` | SUTypedValueType_Bool |
`"TransparencySort"` | SUTypedValueType_Int32 |

Some of the options map to enumerated values, as shown in the table below.

Option | Value | Meaning | Since
--- | --- | --- | ---
EdgeColorMode | `0` | ObjectColor |
| `1` | ForegroundColor |
| `2` | DirectionColor |
EdgeDisplayMode | `0` | EdgeDisplayNone |
| `1` | EdgeDisplayAll |
| `2` | EdgeDisplayStandalone |
RenderMode | `0` | RenderWireframe |
| `1` | RenderHidden |
| `2` | RenderFlat |
| `3` | RenderSmooth |
| `4` | RenderTextureObsolete |
| `5` | RenderNoMaterials |
| `6` | RenderPhysicallyBased | SketchUp 2025.0, API 13.0
EdgeType | `0` | EdgeStandard |
| `1` | EdgeNPR |

Note
  The rendering option FaceColorMode was removed in SketchUp 2019.1.

enum SUResult SURenderingOptionsSetValue | ( | SURenderingOptionsRef | rendering_options,
|  | const char * | key,
|  | SUTypedValueRef | value_in
| ) |  |
| related

Sets values in a rendering options object.

Parameters

  [in] | rendering_options | The rendering options object.
  [in] | key | The key. Assumed to be UTF-8 encoded.
  [in] | value_in | The value used to set the option.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if rendering_options or value_in is an invalid object
  - SU_ERROR_NULL_POINTER_INPUT if key is NULL

The documentation for this struct was generated from the following files:

- SketchUpAPI/model/defs.h
- SketchUpAPI/model/rendering_options.h