You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

scriptup

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scriptup - rubygems Package Compare versions

Comparing version
2026.0.0
to
2026.0.1
sketchup-sdk-mac/S...ns/A/Frameworks/libCommonGeometry.dylib

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

+46
/**
* @file
* @brief Definition for \ref 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`.
*/
/**
@enum SUSnapToBehavior
@headerfile <SketchUpAPI/model/component_definition.h>
@brief 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 SUComponentBehavior
@bug This enum was incorrectly defined inside the \ref 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.
@code
// Usage from a C compiler:
SUSnapToBehavior behavior;
SUComponentDefinitionSetBehavior(component_definition, &behavior);
if (behavior.component_snap == SUSnapToBehavior_Vertical) {
// ...
}
@endcode
@code
// Usage from a C++ compiler:
SUSnapToBehavior behavior;
SUComponentDefinitionSetBehavior(component_definition, &behavior);
if (behavior.component_snap == SUComponentBehavior::SUSnapToBehavior_Vertical) {
// ...
}
@endcode
*/
enum SUSnapToBehavior {
SUSnapToBehavior_None = 0,
SUSnapToBehavior_Any,
SUSnapToBehavior_Horizontal,
SUSnapToBehavior_Vertical,
SUSnapToBehavior_Sloped
};
// Copyright 2024-2025 Trimble Inc. All Rights Reserved.
/**
* @file
* @brief Interfaces for SUEnvironmentRef.
*/
#ifndef SKETCHUP_MODEL_ENVIRONMENT_H_
#define SKETCHUP_MODEL_ENVIRONMENT_H_
#include <SketchUpAPI/common.h>
#include <SketchUpAPI/model/defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
@struct SUEnvironmentRef
@brief References an environment, which enables sky boxes and image-based lighting.
@since SketchUp 2025.0, API 13.0
*/
/**
@brief Converts from an \ref SUEnvironmentRef to an \ref SUEntityRef.
This is essentially an upcast operation.
@since SketchUp 2025.0, API 13.0
@param[in] environment The given environment reference.
@related SUEnvironmentRef
@return
- The converted \ref SUEntityRef if \p environment is a valid object
- If not, the returned reference will be invalid
*/
SU_EXPORT SUEntityRef SUEnvironmentToEntity(SUEnvironmentRef environment);
/**
@brief Converts from an \ref SUEntityRef to an SUEnvironmentRef.
This is essentially a downcast operation so the given \ref SUEntityRef
must be convertible to an \ref SUEnvironmentRef.
@since SketchUp 2025.0, API 13.0
@param[in] entity The given entity reference.
@related SUEnvironmentRef
@return
- The converted \ref SUEnvironmentRef if the downcast operation succeeds
- If not, the returned reference will be invalid
*/
SU_EXPORT SUEnvironmentRef SUEnvironmentFromEntity(SUEntityRef entity);
/**
* @brief Creates an environment object from an SKE, HDR, or EXR file.
* The image or SKE file will be loaded into the environment's skydome as a cubemap.
* @since SketchUp 2025.0, API 13.0
* @param[out] environment The created environment object.
* @param[in] file_path The path to the SKE, HDR, or EXR file.
* @param[in] name The name of the environment. If empty, the name will default to the name
* stored in the SKE file (if available), or to the file name.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_OVERWRITE_VALID if \p environment already references a valid object
* - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path , \p name , or \p environment is `NULL`
* - \ref SU_ERROR_INVALID_ARGUMENT if \p file_path is an empty string
* - \ref SU_ERROR_SERIALIZATION if the \p environment could not be created from the file at \p
* file_path
*
*/
SU_RESULT SUEnvironmentCreateFromFile(
SUEnvironmentRef* environment, const char* file_path, const char* name);
/**
* @brief Writes an environment to an SKE file.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object to write to file.
* @param[in] file_path The location to save the environment to. Assumed to be UTF-8 encoded.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path , \p name , or \p environment is `NULL`
* - \ref SU_ERROR_INVALID_ARGUMENT if \p file_path or \p name is an empty string
* - \ref SU_ERROR_SERIALIZATION if the \p environment could not be written to \p file_path
*
*/
SU_RESULT SUEnvironmentWriteToFile(SUEnvironmentRef environment, const char* file_path);
/**
@brief Releases an environment object and its associated objects.
@note An environment object retrieved through \p SUEnvironmentsRef methods should not be released as
it is owned by the model.
@since SketchUp 2025.0, API 13.0
@param[in,out] environment The environment object.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_NULL_POINTER_INPUT if \p environment is `NULL`
- \ref SU_ERROR_INVALID_INPUT if \p environment does not reference a valid object
*/
SU_RESULT SUEnvironmentRelease(SUEnvironmentRef* environment);
/**
@brief Sets the name of a environment object.
@since SketchUp 2025.0, API 13.0
@param[in] environment The environment object.
@param[in] name The name string to set the environment object.
Assumed to be UTF-8 encoded.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p name is `NULL`
- \ref SU_ERROR_INVALID_ARGUMENT if \p name is an empty string or if no manager is associated with
the environment
- \ref SU_ERROR_DUPLICATE if \p name is a duplicate of another environment
*/
SU_RESULT SUEnvironmentSetName(SUEnvironmentRef environment, const char* name);
/**
@brief Retrieves the name of a environment object.
@since SketchUp 2025.0, API 13.0
@param[in] environment The environment object.
@param[out] name The name retrieved.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p name is `NULL`
- \ref SU_ERROR_INVALID_OUTPUT if \p name does not point to a valid \ref
SUStringRef object
*/
SU_RESULT SUEnvironmentGetName(SUEnvironmentRef environment, SUStringRef* name);
/**
@brief Sets the description of a environment object.
@since SketchUp 2025, API 13.0
@param[in] environment The environment object.
@param[in] desc The description to be set.
Assumed to be UTF-8 encoded.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p desc is `NULL`
*/
SU_RESULT SUEnvironmentSetDescription(SUEnvironmentRef environment, const char* desc);
/**
@brief Retrieves the description of a environment object.
@since SketchUp 2025.0, API 13.0
@param[in] environment The environment object.
@param[out] desc The description retrieved.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p desc is `NULL`
- \ref SU_ERROR_INVALID_OUTPUT if \p desc does not point to a valid \ref SUStringRef object
*/
SU_RESULT SUEnvironmentGetDescription(SUEnvironmentRef environment, SUStringRef* desc);
/**
* @brief Sets the the environment to be used as a skydome.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] skydome The flag to set on the environment object.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
*/
SU_RESULT SUEnvironmentSetUseAsSkydome(SUEnvironmentRef environment, bool skydome);
/**
* @brief Retrieves whether the environment is used as a skydome.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] skydome The flag retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if skydome is `NULL`
*/
SU_RESULT SUEnvironmentGetUseAsSkydome(SUEnvironmentRef environment, bool* skydome);
/**
* @brief Sets the the environment to be used for reflections.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] reflections The flag to set the environment object.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
*/
SU_RESULT SUEnvironmentSetUseForReflections(SUEnvironmentRef environment, bool reflections);
/**
* @brief Retrieves whether the environment is used for reflections.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] reflections The flag retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p reflections is `NULL`
*/
SU_RESULT SUEnvironmentGetUseForReflections(SUEnvironmentRef environment, bool* reflections);
/**
* @brief Sets the the environment image vertical rotation angle in degrees.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] angle The angle to set the environment object, within the range `[0.0, 360.0)`
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_OUT_OF_RANGE if \p angle is not within the range `[0.0, 360.0)`
*/
SU_RESULT SUEnvironmentSetRotation(SUEnvironmentRef environment, double angle);
/**
* @brief Retrieves the environment image rotation in degrees.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] angle The angle retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p angle is `NULL`
*/
SU_RESULT SUEnvironmentGetRotation(SUEnvironmentRef environment, double* angle);
/**
* @brief Sets the skydome exposure to compensate for variations in HDR image exposure.
* The unaltered exposure level is `1.0`.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] exposure The exposure to set the environment object, within the range [0.0, 20.0].
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_OUT_OF_RANGE if \p exposure is not within the range [0.0, 20.0]
*/
SU_RESULT SUEnvironmentSetSkydomeExposure(SUEnvironmentRef environment, double exposure);
/**
* @brief Retrieves the skydome exposure of the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] exposure The exposure retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p exposure is `NULL`
*/
SU_RESULT SUEnvironmentGetSkydomeExposure(SUEnvironmentRef environment, double* exposure);
/**
* @brief Sets the reflection exposure of the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] exposure The exposure to set the environment object, within the range [0.0, 10.0].
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_OUT_OF_RANGE if \p exposure is not within the range [0.0, 10.0]
*/
SU_RESULT SUEnvironmentSetReflectionExposure(SUEnvironmentRef environment, double exposure);
/**
* @brief Retrieves the reflection exposure of the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] exposure The exposure retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p exposure is `NULL`
*/
SU_RESULT SUEnvironmentGetReflectionExposure(SUEnvironmentRef environment, double* exposure);
/**
* @brief Sets the linked sun flag of the environment, enabling the shadow-casting light.
* Corresponding to "Set Sun Location" in the SketchUp UI.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] linked_sun The flag to set the environment object.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
*/
SU_RESULT SUEnvironmentSetLinkedSun(SUEnvironmentRef environment, bool linked_sun);
/**
* @brief Retrieves whether the environment is linked sun is enabled.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] linked_sun The flag retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p linked_sun is `NULL`
*/
SU_RESULT SUEnvironmentGetLinkedSun(SUEnvironmentRef environment, bool* linked_sun);
/**
* @brief Sets the linked sun position in the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] position The position to set the environment object.
* `x` corresponds to longitude with the range `[0.0, 1.0]`,
* `y` corresponds to latitude with the range `[-1.0, 1.0]`.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_INPUT if \p position is `NULL`
* - \ref SU_ERROR_OUT_OF_RANGE if \p position has invalid x or y values
*/
SU_RESULT SUEnvironmentSetLinkedSunPosition(
SUEnvironmentRef environment, const struct SUPoint2D* position);
/**
* @brief Retrieves the linked sun position in the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] position The position retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p position is `NULL`
*/
SU_RESULT SUEnvironmentGetLinkedSunPosition(
SUEnvironmentRef environment, struct SUPoint2D* position);
/**
* @brief Retrieves the thumbnail preview image for the given environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] image The thumbnail to be retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p image is NULL
* - \ref SU_ERROR_INVALID_OUTPUT if \p image does not point to a valid \ref
SUImageRepRef object
* - \ref SU_ERROR_NO_DATA if the thumbnail can not be retrieved
*/
SU_RESULT SUEnvironmentGetThumbnail(SUEnvironmentRef environment, SUImageRepRef* image);
/**
* @brief Writes the HDR image of the environment to a file in its original file type.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] dir_path The directory path to save the HDR image to.
* @param[out] full_path_written The full path of the written file.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_INPUT if \p dir_path or \p full_path_written is `NULL`
* - \ref SU_ERROR_INVALID_ARGUMENT if \p dir_path is an empty string
* - \ref SU_ERROR_SERIALIZATION if the HDR image could not be written to \p dir_path
*/
SU_RESULT SUEnvironmentWriteHDRImageToFile(
SUEnvironmentRef environment, const char* dir_path, SUStringRef* full_path_written);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // SKETCHUP_MODEL_ENVIRONMENT_H_
// Copyright 2024-2025 Trimble Inc. All Rights Reserved.
/**
* @file
* @brief Interfaces for SUEnvironmentsRef.
*/
#ifndef SKETCHUP_MODEL_ENVIRONMENTS_H_
#define SKETCHUP_MODEL_ENVIRONMENTS_H_
#include <SketchUpAPI/common.h>
#include <SketchUpAPI/model/defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
@struct SUEnvironmentsRef
@brief References a container object for all environments in a model.
@since SketchUp 2025.0, API 13.0
*/
/**
* @brief Retrieves the number of environment objects in an environments object.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[out] count The number of environments.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is `NULL`
*/
SU_RESULT SUEnvironmentsGetCount(SUEnvironmentsRef environments, size_t* count);
/**
* @brief Retrieves every environment associated with an environments object.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] len The number of environments to retrieve.
* @param[out] items The environments retrieved.
* @param[out] count The number of environments retrieved.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p items or \p count is `NULL`
*/
SU_RESULT SUEnvironmentsGetAll(
SUEnvironmentsRef environments, size_t len, SUEnvironmentRef items[], size_t* count);
/**
* @brief Retrieves the currently selected environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[out] environment The selected environment object.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
* - \ref SU_ERROR_NO_DATA if no environment is currently selected
*/
SU_RESULT SUEnvironmentsGetSelectedEnvironment(
SUEnvironmentsRef environments, SUEnvironmentRef* environment);
/**
* @brief Retrieves an environment by persistent ID.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] pid The PID of the environment object to retrieve.
* @param[out] environment The environment object with the given PID.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
* - \ref SU_ERROR_NO_DATA if no environment can be found with the given PID
*/
SU_RESULT SUEnvironmentsGetEnvironmentByPersistentID(
SUEnvironmentsRef environments, uint64_t pid, SUEnvironmentRef* environment);
/**
* @brief Retrieves an environment by name.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] name The name of the environment object to retrieve.
* @param[out] environment The environment object with the given name.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
* - \ref SU_ERROR_NO_DATA if no environment can be found with the given name
*/
SU_RESULT SUEnvironmentsGetEnvironmentByName(
SUEnvironmentsRef environments, const char* name, SUEnvironmentRef* environment);
/**
* @brief Adds an environment to an environments object.
* @note This method transfers ownership of the \p environment to the model. Do not call
* \p SUEnvironmentRelease on \p environment after calling this method.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] environment The environment object to add.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment or \p environments is not a valid object
* - \ref SU_ERROR_DUPLICATE if the \p environment is already part of the environments
* object
* - \ref SU_ERROR_INVALID_ARGUMENT if the environment name is already in use
*/
SU_RESULT SUEnvironmentsAdd(SUEnvironmentsRef environments, SUEnvironmentRef environment);
/**
* @brief Removes an environment from an environments object.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] environment The environment object to remove.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment or \p environments is not a valid object
* - \ref SU_ERROR_INVALID_OPERATION if \p environment is not part of the \p environments object
*/
SU_RESULT SUEnvironmentsRemove(SUEnvironmentsRef environments, SUEnvironmentRef environment);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // SKETCHUP_SLAPI_PUBLIC_MODEL_ENVIRONMENTS_H_
/**
* @file
* @brief Definition for \ref SUEntityType. Don't include directly.
*
* @warning Do not include this header directly. This file is part of a
* compatibility shim. Instead include `SketchUpAPI/model.h`.
*/
/**
@enum SUEntityType
@headerfile <SketchUpAPI/model.h>
@brief Types of \ref SUEntityRef objects.
@see SUModelStatistics
@bug This enum was incorrectly defined inside the \ref SUModelStatistics 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.
@code
// Usage from a C compiler:
SUModelStatistics statistics;
SUModelGetStatistics(model, &statistics);
std::cout << "Faces: " << statistics.entity_counts[SUEntityType_Face] << "\n";
@endcode
@code
// Usage from a C++ compiler:
SUModelStatistics statistics;
SUModelGetStatistics(model, &statistics);
std::cout << "Faces: " << statistics.entity_counts[SUModelStatistics::SUEntityType_Face] << "\n";
@endcode
*/
enum SUEntityType {
SUEntityType_Edge = 0, ///< SUEdgeRef entities
SUEntityType_Face, ///< SUFaceRef entities
SUEntityType_ComponentInstance, ///< SUComponentInstanceRef entities
SUEntityType_Group, ///< SUGroupRef entities
SUEntityType_Image, ///< SUImageRef entities
SUEntityType_ComponentDefinition, ///< SUComponentDefinitionRef entities
SUEntityType_Layer, ///< SULayerRef entities
SUEntityType_Material, ///< SUMaterialRef entities
SUNumEntityTypes ///< Number of entity types
};
// Copyright 2024 Trimble Inc. All Rights Reserved.
/**
* @file
* @brief Interfaces for SUSnapRef.
*/
#ifndef SKETCHUP_MODEL_SNAP_H_
#define SKETCHUP_MODEL_SNAP_H_
#include <SketchUpAPI/common.h>
#include <SketchUpAPI/geometry.h>
#include <SketchUpAPI/model/defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
@struct SUSnapRef
@extends SUDrawingElementRef
@brief References a snap.
@since SketchUp 2025.0, API 13.0
A Snap is a custom grip used by SketchUp's Move tool. Snaps can be added at strategic places such
as connectors to help assembling objects.
\image html snaps.png
SUSnapGetDirection() is the direction a snap is "pointing". This can be thought of as the normal
direction of the snap. It can also be thought of as the direction you move an object when plugging
it into another object, e.g. inserting a power coord.
SUSnapGetUp() controls the rotation around the Snap's axis.
When two objects are snapped together, the Snaps have opposite SUSnapGetDirection() vectors but
matching SUSnapGetUp() vectors.
*/
/**
@brief Converts from an \ref SUSnapRef to an \ref SUEntityRef.
This is essentially an upcast operation.
@since SketchUp 2025.0, API 13.0
@param[in] snap The given snap reference.
@related SUSnapRef
@return
- The converted SUEntityRef if \p snap is a valid snap.
- If not, the returned reference will be invalid.
*/
SU_EXPORT SUEntityRef SUSnapToEntity(SUSnapRef snap);
/**
@brief Converts from an \ref SUEntityRef to an \ref SUSnapRef.
This is essentially a downcast operation so the given entity must be
convertible to an \ref SUSnapRef.
@since SketchUp 2025.0, API 13.0
@param[in] entity The given entity reference.
@related SUSnapRef
@return
- The converted SUSnapRef if the downcast operation succeeds
- If not, the returned reference will be invalid
*/
SU_EXPORT SUSnapRef SUSnapFromEntity(SUEntityRef entity);
/**
@brief Converts from an \ref SUSnapRef to an \ref SUDrawingElementRef.
This is essentially an upcast operation.
@since SketchUp 2025.0, API 13.0
@param[in] snap The given snap reference.
@related SUSnapRef
@return
- The converted \ref SUEntityRef if \p snap is a valid snap.
- If not, the returned reference will be invalid.
*/
SU_EXPORT SUDrawingElementRef SUSnapToDrawingElement(SUSnapRef snap);
/**
@brief Converts from an \ref SUDrawingElementRef to an \ref SUSnapRef.
This is essentially a downcast operation so the given element must be
convertible to an SUSnapRef.
@since SketchUp 2025.0, API 13.0
@param[in] drawing_elem The given element reference.
@related SUSnapRef
@return
- The converted \ref SUSnapRef if the downcast operation succeeds
- If not, the returned reference will be invalid
*/
SU_EXPORT SUSnapRef SUSnapFromDrawingElement(SUDrawingElementRef drawing_elem);
/**
@brief Creates a snap at the given position and orientation.
@since SketchUp 2025.0, API 13.0
@param[out] snap The snap object created.
@param[in] position The position of the snap.
@param[in] direction The orientation of the snap. Pass `NULL` to use the default orientation.
@param[in] up The up vector controls the rotation around the \p orientation of the snap.
Pass `NULL` to use the default up vector.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_ARGUMENT if \p direction an \p up are parallel.
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p snap is `NULL`
- \ref SU_ERROR_OVERWRITE_VALID if \p snap already refers to a valid object
*/
SU_RESULT SUSnapCreate(
SUSnapRef* snap, const struct SUPoint3D position, const struct SUVector3D* direction,
const struct SUVector3D* up);
/**
@brief Releases a snap object and its associated resources.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_NULL_POINTER_INPUT if \p snap points to an `NULL`
- \ref SU_ERROR_INVALID_INPUT if the \p snap object is not a valid object.
*/
SU_RESULT SUSnapRelease(SUSnapRef* snap);
/**
@brief Retrieves the position of a snap.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@param[out] position The position retrieved.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p snap point is an invalid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if position is `NULL`
*/
SU_RESULT SUSnapGetPosition(SUSnapRef snap, struct SUPoint3D* position);
/**
@brief Retrieves the orientation of a snap.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@param[out] direction The direction of the snap.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p snap point is an invalid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if direction is `NULL`
*/
SU_RESULT SUSnapGetDirection(SUSnapRef snap, struct SUVector3D* direction);
/**
@brief Retrieves the up vector of a snap.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@param[out] up The up vector of the snap.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p snap point is an invalid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if up is `NULL`
*/
SU_RESULT SUSnapGetUp(SUSnapRef snap, struct SUVector3D* up);
/**
@brief Sets the position, direction and up vector of the snap.
If only \p position is provided then \p direction and \p up remains unchanged.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@param[in] position The position of the snap.
@param[in] direction The orientation of the snap. Pass `NULL` to use the default orientation.
@param[in] up The up vector of the snap. Pass `NULL` to use the default up vector.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_ARGUMENT if \p direction an \p up are parallel.
- \ref SU_ERROR_NULL_POINTER_INPUT if \p snap is `NULL`
*/
SU_RESULT SUSnapSet(
SUSnapRef snap, const struct SUPoint3D position, const struct SUVector3D* direction,
const struct SUVector3D* up);
#ifdef __cplusplus
}
#endif
#endif // SKETCHUP_MODEL_SNAP_H_
// Copyright 2024 Trimble Inc. All Rights Reserved.
/**
* @file
* @brief Interfaces for SUSpaceRef.
For internal use only at this time. APIs may change.
*/
#ifndef SKETCHUP_MODEL_SPACE_H_
#define SKETCHUP_MODEL_SPACE_H_
#include <SketchUpAPI/common.h>
#include <SketchUpAPI/geometry.h>
#include <SketchUpAPI/model/defs.h>
// Forward declarations
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} // extern "C" {
#endif
#endif // SKETCHUP_MODEL_SPACE_H_

Sorry, the diff of this file is not supported yet

/**
* @file
* @brief Definition for \ref 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`.
*/
/**
@enum SUSnapToBehavior
@headerfile <SketchUpAPI/model/component_definition.h>
@brief 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 SUComponentBehavior
@bug This enum was incorrectly defined inside the \ref 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.
@code
// Usage from a C compiler:
SUSnapToBehavior behavior;
SUComponentDefinitionSetBehavior(component_definition, &behavior);
if (behavior.component_snap == SUSnapToBehavior_Vertical) {
// ...
}
@endcode
@code
// Usage from a C++ compiler:
SUSnapToBehavior behavior;
SUComponentDefinitionSetBehavior(component_definition, &behavior);
if (behavior.component_snap == SUComponentBehavior::SUSnapToBehavior_Vertical) {
// ...
}
@endcode
*/
enum SUSnapToBehavior {
SUSnapToBehavior_None = 0,
SUSnapToBehavior_Any,
SUSnapToBehavior_Horizontal,
SUSnapToBehavior_Vertical,
SUSnapToBehavior_Sloped
};
// Copyright 2024-2025 Trimble Inc. All Rights Reserved.
/**
* @file
* @brief Interfaces for SUEnvironmentRef.
*/
#ifndef SKETCHUP_MODEL_ENVIRONMENT_H_
#define SKETCHUP_MODEL_ENVIRONMENT_H_
#include <SketchUpAPI/common.h>
#include <SketchUpAPI/model/defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
@struct SUEnvironmentRef
@brief References an environment, which enables sky boxes and image-based lighting.
@since SketchUp 2025.0, API 13.0
*/
/**
@brief Converts from an \ref SUEnvironmentRef to an \ref SUEntityRef.
This is essentially an upcast operation.
@since SketchUp 2025.0, API 13.0
@param[in] environment The given environment reference.
@related SUEnvironmentRef
@return
- The converted \ref SUEntityRef if \p environment is a valid object
- If not, the returned reference will be invalid
*/
SU_EXPORT SUEntityRef SUEnvironmentToEntity(SUEnvironmentRef environment);
/**
@brief Converts from an \ref SUEntityRef to an SUEnvironmentRef.
This is essentially a downcast operation so the given \ref SUEntityRef
must be convertible to an \ref SUEnvironmentRef.
@since SketchUp 2025.0, API 13.0
@param[in] entity The given entity reference.
@related SUEnvironmentRef
@return
- The converted \ref SUEnvironmentRef if the downcast operation succeeds
- If not, the returned reference will be invalid
*/
SU_EXPORT SUEnvironmentRef SUEnvironmentFromEntity(SUEntityRef entity);
/**
* @brief Creates an environment object from an SKE, HDR, or EXR file.
* The image or SKE file will be loaded into the environment's skydome as a cubemap.
* @since SketchUp 2025.0, API 13.0
* @param[out] environment The created environment object.
* @param[in] file_path The path to the SKE, HDR, or EXR file.
* @param[in] name The name of the environment. If empty, the name will default to the name
* stored in the SKE file (if available), or to the file name.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_OVERWRITE_VALID if \p environment already references a valid object
* - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path , \p name , or \p environment is `NULL`
* - \ref SU_ERROR_INVALID_ARGUMENT if \p file_path is an empty string
* - \ref SU_ERROR_SERIALIZATION if the \p environment could not be created from the file at \p
* file_path
*
*/
SU_RESULT SUEnvironmentCreateFromFile(
SUEnvironmentRef* environment, const char* file_path, const char* name);
/**
* @brief Writes an environment to an SKE file.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object to write to file.
* @param[in] file_path The location to save the environment to. Assumed to be UTF-8 encoded.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path , \p name , or \p environment is `NULL`
* - \ref SU_ERROR_INVALID_ARGUMENT if \p file_path or \p name is an empty string
* - \ref SU_ERROR_SERIALIZATION if the \p environment could not be written to \p file_path
*
*/
SU_RESULT SUEnvironmentWriteToFile(SUEnvironmentRef environment, const char* file_path);
/**
@brief Releases an environment object and its associated objects.
@note An environment object retrieved through \p SUEnvironmentsRef methods should not be released as
it is owned by the model.
@since SketchUp 2025.0, API 13.0
@param[in,out] environment The environment object.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_NULL_POINTER_INPUT if \p environment is `NULL`
- \ref SU_ERROR_INVALID_INPUT if \p environment does not reference a valid object
*/
SU_RESULT SUEnvironmentRelease(SUEnvironmentRef* environment);
/**
@brief Sets the name of a environment object.
@since SketchUp 2025.0, API 13.0
@param[in] environment The environment object.
@param[in] name The name string to set the environment object.
Assumed to be UTF-8 encoded.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p name is `NULL`
- \ref SU_ERROR_INVALID_ARGUMENT if \p name is an empty string or if no manager is associated with
the environment
- \ref SU_ERROR_DUPLICATE if \p name is a duplicate of another environment
*/
SU_RESULT SUEnvironmentSetName(SUEnvironmentRef environment, const char* name);
/**
@brief Retrieves the name of a environment object.
@since SketchUp 2025.0, API 13.0
@param[in] environment The environment object.
@param[out] name The name retrieved.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p name is `NULL`
- \ref SU_ERROR_INVALID_OUTPUT if \p name does not point to a valid \ref
SUStringRef object
*/
SU_RESULT SUEnvironmentGetName(SUEnvironmentRef environment, SUStringRef* name);
/**
@brief Sets the description of a environment object.
@since SketchUp 2025, API 13.0
@param[in] environment The environment object.
@param[in] desc The description to be set.
Assumed to be UTF-8 encoded.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p desc is `NULL`
*/
SU_RESULT SUEnvironmentSetDescription(SUEnvironmentRef environment, const char* desc);
/**
@brief Retrieves the description of a environment object.
@since SketchUp 2025.0, API 13.0
@param[in] environment The environment object.
@param[out] desc The description retrieved.
@related SUEnvironmentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p desc is `NULL`
- \ref SU_ERROR_INVALID_OUTPUT if \p desc does not point to a valid \ref SUStringRef object
*/
SU_RESULT SUEnvironmentGetDescription(SUEnvironmentRef environment, SUStringRef* desc);
/**
* @brief Sets the the environment to be used as a skydome.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] skydome The flag to set on the environment object.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
*/
SU_RESULT SUEnvironmentSetUseAsSkydome(SUEnvironmentRef environment, bool skydome);
/**
* @brief Retrieves whether the environment is used as a skydome.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] skydome The flag retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if skydome is `NULL`
*/
SU_RESULT SUEnvironmentGetUseAsSkydome(SUEnvironmentRef environment, bool* skydome);
/**
* @brief Sets the the environment to be used for reflections.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] reflections The flag to set the environment object.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
*/
SU_RESULT SUEnvironmentSetUseForReflections(SUEnvironmentRef environment, bool reflections);
/**
* @brief Retrieves whether the environment is used for reflections.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] reflections The flag retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p reflections is `NULL`
*/
SU_RESULT SUEnvironmentGetUseForReflections(SUEnvironmentRef environment, bool* reflections);
/**
* @brief Sets the the environment image vertical rotation angle in degrees.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] angle The angle to set the environment object, within the range `[0.0, 360.0)`
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_OUT_OF_RANGE if \p angle is not within the range `[0.0, 360.0)`
*/
SU_RESULT SUEnvironmentSetRotation(SUEnvironmentRef environment, double angle);
/**
* @brief Retrieves the environment image rotation in degrees.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] angle The angle retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p angle is `NULL`
*/
SU_RESULT SUEnvironmentGetRotation(SUEnvironmentRef environment, double* angle);
/**
* @brief Sets the skydome exposure to compensate for variations in HDR image exposure.
* The unaltered exposure level is `1.0`.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] exposure The exposure to set the environment object, within the range [0.0, 20.0].
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_OUT_OF_RANGE if \p exposure is not within the range [0.0, 20.0]
*/
SU_RESULT SUEnvironmentSetSkydomeExposure(SUEnvironmentRef environment, double exposure);
/**
* @brief Retrieves the skydome exposure of the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] exposure The exposure retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p exposure is `NULL`
*/
SU_RESULT SUEnvironmentGetSkydomeExposure(SUEnvironmentRef environment, double* exposure);
/**
* @brief Sets the reflection exposure of the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] exposure The exposure to set the environment object, within the range [0.0, 10.0].
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_OUT_OF_RANGE if \p exposure is not within the range [0.0, 10.0]
*/
SU_RESULT SUEnvironmentSetReflectionExposure(SUEnvironmentRef environment, double exposure);
/**
* @brief Retrieves the reflection exposure of the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] exposure The exposure retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p exposure is `NULL`
*/
SU_RESULT SUEnvironmentGetReflectionExposure(SUEnvironmentRef environment, double* exposure);
/**
* @brief Sets the linked sun flag of the environment, enabling the shadow-casting light.
* Corresponding to "Set Sun Location" in the SketchUp UI.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] linked_sun The flag to set the environment object.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
*/
SU_RESULT SUEnvironmentSetLinkedSun(SUEnvironmentRef environment, bool linked_sun);
/**
* @brief Retrieves whether the environment is linked sun is enabled.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] linked_sun The flag retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p linked_sun is `NULL`
*/
SU_RESULT SUEnvironmentGetLinkedSun(SUEnvironmentRef environment, bool* linked_sun);
/**
* @brief Sets the linked sun position in the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] position The position to set the environment object.
* `x` corresponds to longitude with the range `[0.0, 1.0]`,
* `y` corresponds to latitude with the range `[-1.0, 1.0]`.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_INPUT if \p position is `NULL`
* - \ref SU_ERROR_OUT_OF_RANGE if \p position has invalid x or y values
*/
SU_RESULT SUEnvironmentSetLinkedSunPosition(
SUEnvironmentRef environment, const struct SUPoint2D* position);
/**
* @brief Retrieves the linked sun position in the environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] position The position retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p position is `NULL`
*/
SU_RESULT SUEnvironmentGetLinkedSunPosition(
SUEnvironmentRef environment, struct SUPoint2D* position);
/**
* @brief Retrieves the thumbnail preview image for the given environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[out] image The thumbnail to be retrieved.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p image is NULL
* - \ref SU_ERROR_INVALID_OUTPUT if \p image does not point to a valid \ref
SUImageRepRef object
* - \ref SU_ERROR_NO_DATA if the thumbnail can not be retrieved
*/
SU_RESULT SUEnvironmentGetThumbnail(SUEnvironmentRef environment, SUImageRepRef* image);
/**
* @brief Writes the HDR image of the environment to a file in its original file type.
* @since SketchUp 2025.0, API 13.0
* @param[in] environment The environment object.
* @param[in] dir_path The directory path to save the HDR image to.
* @param[out] full_path_written The full path of the written file.
* @related SUEnvironmentRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
* - \ref SU_ERROR_NULL_POINTER_INPUT if \p dir_path or \p full_path_written is `NULL`
* - \ref SU_ERROR_INVALID_ARGUMENT if \p dir_path is an empty string
* - \ref SU_ERROR_SERIALIZATION if the HDR image could not be written to \p dir_path
*/
SU_RESULT SUEnvironmentWriteHDRImageToFile(
SUEnvironmentRef environment, const char* dir_path, SUStringRef* full_path_written);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // SKETCHUP_MODEL_ENVIRONMENT_H_
// Copyright 2024-2025 Trimble Inc. All Rights Reserved.
/**
* @file
* @brief Interfaces for SUEnvironmentsRef.
*/
#ifndef SKETCHUP_MODEL_ENVIRONMENTS_H_
#define SKETCHUP_MODEL_ENVIRONMENTS_H_
#include <SketchUpAPI/common.h>
#include <SketchUpAPI/model/defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
@struct SUEnvironmentsRef
@brief References a container object for all environments in a model.
@since SketchUp 2025.0, API 13.0
*/
/**
* @brief Retrieves the number of environment objects in an environments object.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[out] count The number of environments.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is `NULL`
*/
SU_RESULT SUEnvironmentsGetCount(SUEnvironmentsRef environments, size_t* count);
/**
* @brief Retrieves every environment associated with an environments object.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] len The number of environments to retrieve.
* @param[out] items The environments retrieved.
* @param[out] count The number of environments retrieved.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p items or \p count is `NULL`
*/
SU_RESULT SUEnvironmentsGetAll(
SUEnvironmentsRef environments, size_t len, SUEnvironmentRef items[], size_t* count);
/**
* @brief Retrieves the currently selected environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[out] environment The selected environment object.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
* - \ref SU_ERROR_NO_DATA if no environment is currently selected
*/
SU_RESULT SUEnvironmentsGetSelectedEnvironment(
SUEnvironmentsRef environments, SUEnvironmentRef* environment);
/**
* @brief Retrieves an environment by persistent ID.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] pid The PID of the environment object to retrieve.
* @param[out] environment The environment object with the given PID.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
* - \ref SU_ERROR_NO_DATA if no environment can be found with the given PID
*/
SU_RESULT SUEnvironmentsGetEnvironmentByPersistentID(
SUEnvironmentsRef environments, uint64_t pid, SUEnvironmentRef* environment);
/**
* @brief Retrieves an environment by name.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] name The name of the environment object to retrieve.
* @param[out] environment The environment object with the given name.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
* - \ref SU_ERROR_NO_DATA if no environment can be found with the given name
*/
SU_RESULT SUEnvironmentsGetEnvironmentByName(
SUEnvironmentsRef environments, const char* name, SUEnvironmentRef* environment);
/**
* @brief Adds an environment to an environments object.
* @note This method transfers ownership of the \p environment to the model. Do not call
* \p SUEnvironmentRelease on \p environment after calling this method.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] environment The environment object to add.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment or \p environments is not a valid object
* - \ref SU_ERROR_DUPLICATE if the \p environment is already part of the environments
* object
* - \ref SU_ERROR_INVALID_ARGUMENT if the environment name is already in use
*/
SU_RESULT SUEnvironmentsAdd(SUEnvironmentsRef environments, SUEnvironmentRef environment);
/**
* @brief Removes an environment from an environments object.
* @since SketchUp 2025.0, API 13.0
* @param[in] environments The environments object.
* @param[in] environment The environment object to remove.
* @related SUEnvironmentsRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p environment or \p environments is not a valid object
* - \ref SU_ERROR_INVALID_OPERATION if \p environment is not part of the \p environments object
*/
SU_RESULT SUEnvironmentsRemove(SUEnvironmentsRef environments, SUEnvironmentRef environment);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // SKETCHUP_SLAPI_PUBLIC_MODEL_ENVIRONMENTS_H_
/**
* @file
* @brief Definition for \ref SUEntityType. Don't include directly.
*
* @warning Do not include this header directly. This file is part of a
* compatibility shim. Instead include `SketchUpAPI/model.h`.
*/
/**
@enum SUEntityType
@headerfile <SketchUpAPI/model.h>
@brief Types of \ref SUEntityRef objects.
@see SUModelStatistics
@bug This enum was incorrectly defined inside the \ref SUModelStatistics 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.
@code
// Usage from a C compiler:
SUModelStatistics statistics;
SUModelGetStatistics(model, &statistics);
std::cout << "Faces: " << statistics.entity_counts[SUEntityType_Face] << "\n";
@endcode
@code
// Usage from a C++ compiler:
SUModelStatistics statistics;
SUModelGetStatistics(model, &statistics);
std::cout << "Faces: " << statistics.entity_counts[SUModelStatistics::SUEntityType_Face] << "\n";
@endcode
*/
enum SUEntityType {
SUEntityType_Edge = 0, ///< SUEdgeRef entities
SUEntityType_Face, ///< SUFaceRef entities
SUEntityType_ComponentInstance, ///< SUComponentInstanceRef entities
SUEntityType_Group, ///< SUGroupRef entities
SUEntityType_Image, ///< SUImageRef entities
SUEntityType_ComponentDefinition, ///< SUComponentDefinitionRef entities
SUEntityType_Layer, ///< SULayerRef entities
SUEntityType_Material, ///< SUMaterialRef entities
SUNumEntityTypes ///< Number of entity types
};
// Copyright 2024 Trimble Inc. All Rights Reserved.
/**
* @file
* @brief Interfaces for SUSnapRef.
*/
#ifndef SKETCHUP_MODEL_SNAP_H_
#define SKETCHUP_MODEL_SNAP_H_
#include <SketchUpAPI/common.h>
#include <SketchUpAPI/geometry.h>
#include <SketchUpAPI/model/defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
@struct SUSnapRef
@extends SUDrawingElementRef
@brief References a snap.
@since SketchUp 2025.0, API 13.0
A Snap is a custom grip used by SketchUp's Move tool. Snaps can be added at strategic places such
as connectors to help assembling objects.
\image html snaps.png
SUSnapGetDirection() is the direction a snap is "pointing". This can be thought of as the normal
direction of the snap. It can also be thought of as the direction you move an object when plugging
it into another object, e.g. inserting a power coord.
SUSnapGetUp() controls the rotation around the Snap's axis.
When two objects are snapped together, the Snaps have opposite SUSnapGetDirection() vectors but
matching SUSnapGetUp() vectors.
*/
/**
@brief Converts from an \ref SUSnapRef to an \ref SUEntityRef.
This is essentially an upcast operation.
@since SketchUp 2025.0, API 13.0
@param[in] snap The given snap reference.
@related SUSnapRef
@return
- The converted SUEntityRef if \p snap is a valid snap.
- If not, the returned reference will be invalid.
*/
SU_EXPORT SUEntityRef SUSnapToEntity(SUSnapRef snap);
/**
@brief Converts from an \ref SUEntityRef to an \ref SUSnapRef.
This is essentially a downcast operation so the given entity must be
convertible to an \ref SUSnapRef.
@since SketchUp 2025.0, API 13.0
@param[in] entity The given entity reference.
@related SUSnapRef
@return
- The converted SUSnapRef if the downcast operation succeeds
- If not, the returned reference will be invalid
*/
SU_EXPORT SUSnapRef SUSnapFromEntity(SUEntityRef entity);
/**
@brief Converts from an \ref SUSnapRef to an \ref SUDrawingElementRef.
This is essentially an upcast operation.
@since SketchUp 2025.0, API 13.0
@param[in] snap The given snap reference.
@related SUSnapRef
@return
- The converted \ref SUEntityRef if \p snap is a valid snap.
- If not, the returned reference will be invalid.
*/
SU_EXPORT SUDrawingElementRef SUSnapToDrawingElement(SUSnapRef snap);
/**
@brief Converts from an \ref SUDrawingElementRef to an \ref SUSnapRef.
This is essentially a downcast operation so the given element must be
convertible to an SUSnapRef.
@since SketchUp 2025.0, API 13.0
@param[in] drawing_elem The given element reference.
@related SUSnapRef
@return
- The converted \ref SUSnapRef if the downcast operation succeeds
- If not, the returned reference will be invalid
*/
SU_EXPORT SUSnapRef SUSnapFromDrawingElement(SUDrawingElementRef drawing_elem);
/**
@brief Creates a snap at the given position and orientation.
@since SketchUp 2025.0, API 13.0
@param[out] snap The snap object created.
@param[in] position The position of the snap.
@param[in] direction The orientation of the snap. Pass `NULL` to use the default orientation.
@param[in] up The up vector controls the rotation around the \p orientation of the snap.
Pass `NULL` to use the default up vector.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_ARGUMENT if \p direction an \p up are parallel.
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p snap is `NULL`
- \ref SU_ERROR_OVERWRITE_VALID if \p snap already refers to a valid object
*/
SU_RESULT SUSnapCreate(
SUSnapRef* snap, const struct SUPoint3D position, const struct SUVector3D* direction,
const struct SUVector3D* up);
/**
@brief Releases a snap object and its associated resources.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_NULL_POINTER_INPUT if \p snap points to an `NULL`
- \ref SU_ERROR_INVALID_INPUT if the \p snap object is not a valid object.
*/
SU_RESULT SUSnapRelease(SUSnapRef* snap);
/**
@brief Retrieves the position of a snap.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@param[out] position The position retrieved.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p snap point is an invalid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if position is `NULL`
*/
SU_RESULT SUSnapGetPosition(SUSnapRef snap, struct SUPoint3D* position);
/**
@brief Retrieves the orientation of a snap.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@param[out] direction The direction of the snap.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p snap point is an invalid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if direction is `NULL`
*/
SU_RESULT SUSnapGetDirection(SUSnapRef snap, struct SUVector3D* direction);
/**
@brief Retrieves the up vector of a snap.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@param[out] up The up vector of the snap.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p snap point is an invalid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if up is `NULL`
*/
SU_RESULT SUSnapGetUp(SUSnapRef snap, struct SUVector3D* up);
/**
@brief Sets the position, direction and up vector of the snap.
If only \p position is provided then \p direction and \p up remains unchanged.
@since SketchUp 2025.0, API 13.0
@param[in] snap The snap object.
@param[in] position The position of the snap.
@param[in] direction The orientation of the snap. Pass `NULL` to use the default orientation.
@param[in] up The up vector of the snap. Pass `NULL` to use the default up vector.
@related SUSnapRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_ARGUMENT if \p direction an \p up are parallel.
- \ref SU_ERROR_NULL_POINTER_INPUT if \p snap is `NULL`
*/
SU_RESULT SUSnapSet(
SUSnapRef snap, const struct SUPoint3D position, const struct SUVector3D* direction,
const struct SUVector3D* up);
#ifdef __cplusplus
}
#endif
#endif // SKETCHUP_MODEL_SNAP_H_
// Copyright 2024 Trimble Inc. All Rights Reserved.
/**
* @file
* @brief Interfaces for SUSpaceRef.
For internal use only at this time. APIs may change.
*/
#ifndef SKETCHUP_MODEL_SPACE_H_
#define SKETCHUP_MODEL_SPACE_H_
#include <SketchUpAPI/common.h>
#include <SketchUpAPI/geometry.h>
#include <SketchUpAPI/model/defs.h>
// Forward declarations
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} // extern "C" {
#endif
#endif // SKETCHUP_MODEL_SPACE_H_
+3
-0

@@ -82,2 +82,5 @@ #include <stdbool.h>

case SURefType_LayerFolder: return rb_str_new2("LayerFolder");
case SURefType_Environment: return rb_str_new2("Environment");
case SURefType_Environments: return rb_str_new2("Environments");
case SURefType_Snap: return rb_str_new2("Snap");
}

@@ -84,0 +87,0 @@ }

+4
-4

@@ -32,4 +32,4 @@ // Copyright 2023 Trimble Inc. All Rights Reserved.

- \ref SU_ERROR_DUPLICATE if the given SUOverlayCreateInfo::id already exists in the model
@relatedalso SUModelRef
@relatedalso SUOverlayRef
@related SUModelRef
@see SUOverlayRef
*/

@@ -49,4 +49,4 @@ SU_RESULT SUModelCreateOverlay(

- \ref SU_ERROR_NO_DATA if \p overlay could be found in the model
@relatedalso SUModelRef
@relatedalso SUOverlayRef
@related SUModelRef
@see SUOverlayRef
*/

@@ -53,0 +53,0 @@ SU_RESULT SUModelReleaseOverlay(SUModelRef model, SUOverlayRef* overlay);

@@ -61,14 +61,21 @@ // Copyright 2023 Trimble Inc. All Rights Reserved.

double far_clipping_distance; ///< Distance to far clipping plane from the camera
double projection_matrix[16]; ///< Projection Matrix.
double view_matrix[16]; ///< View Matrix
double projection_matrix[16]; ///< Projection Matrix, stored in row major order.
double view_matrix[16]; ///< View Matrix, stored in row major order.
double viewport_width; ///< Viewport width
double viewport_height; ///< Viewport height
double fov; ///< Field of view of the perspective camera (in degrees). Valid only when
///< is_perspective is true.
/**
* Field of view of the perspective camera (in degrees). Valid only when
* is_perspective is true.
*/
double fov;
double height; ///< Parallel projection frustum height. Valid only when is_perspective is false.
bool is_perspective; ///< Whether the camera is perspective or orthographic.
void* reserved; ///< Reserved for internal use. This will be set to NULL by SketchUp and should
///< not be modified.
/**
* Reserved for internal use. This will be set to NULL by SketchUp and should
* not be modified.
*/
void* reserved;
};

@@ -130,2 +137,3 @@

rendering.
@attention color and depth buffers must be valid until the end_frame callback is called.
@related SUOverlayRef

@@ -142,5 +150,7 @@ */

/// Color buffer info. ptr points to a uint8_t buffer with 4 channels.
/// The buffer pointed to by color must be valid until the end_frame callback is called.
struct SUDrawFrameMemoryBuffer color;
/// Depth buffer info. ptr points to a float buffer.
/// The buffer pointed to by color must be valid until the end_frame callback is called.
struct SUDrawFrameMemoryBuffer depth;

@@ -160,2 +170,4 @@

@brief Signature for SUOverlayCreateInfo::end_frame callback
@attention SUOverlayDrawFrameInfo::color and SUOverlayDrawFrameInfo::depth buffers must be valid
until the end_frame callback is called.
@related SUOverlayRef

@@ -231,2 +243,4 @@ */

/// needed.
/// SUOverlayDrawFrameInfo::color and SUOverlayDrawFrameInfo::depth buffers must be valid until
/// the end_frame callback is called.
SUOverlayEndFrameFuncT end_frame;

@@ -233,0 +247,0 @@ };

@@ -1,2 +0,2 @@

// Copyright 2015 Trimble Inc., All rights reserved.
// Copyright 2015-2024 Trimble Inc. All rights reserved.
// This file is intended for public distribution.

@@ -93,9 +93,5 @@

#if defined __APPLE__
#if defined __APPLE__ && !defined GSLAPI_NO_EXPORTS
#undef SU_EXPORT
#ifdef GSLAPI_API_EXPORTS
#define SU_EXPORT __attribute__((visibility("default")))
#else
#define SU_EXPORT __attribute__((visibility("hidden")))
#endif
#define SU_EXPORT __attribute__((visibility("default")))
#endif // #if defined __APPLE__

@@ -108,4 +104,2 @@

// #define SU_RESULT SU_EXPORT enum SUResult
#endif // DOXYGEN_SHOULD_SKIP_THIS

@@ -163,2 +157,8 @@

#ifndef __cplusplus
// C compilers need this header for the bool type.
// This header maps bool to C99's _Bool type.
#include <stdbool.h>
#endif
/**

@@ -165,0 +165,0 @@ @brief This macro is used to indicate if functions are intended to be

@@ -45,3 +45,11 @@ // Copyright 2014 Trimble Inc., All rights reserved.

/**
@brief Acquires a license for a given extension.
@brief Gets a license for a given extension.
Starting in SketchUp 2025.0 (API 13.0), this function automatically tries to fetch a license from
Extension Warehouse if the extension doesn't have a license on the current device. This only works
if the user is signed in. In earlier SketchUp versions, the user has to go to Extension Manager,
expand the extension in question and press Update License if the license is missing. (For
performance reasons this automatic fetching is skipped during SketchUp startup. Make sure to do a
license check when the user interacts with the extension).
@param[in] extension_id The Extension Warehouse UUID for the extension.

@@ -48,0 +56,0 @@ @param[out] out_license the licensing retrieved.

@@ -21,3 +21,3 @@ // Copyright 2013 Trimble Inc., All rights reserved.

@struct SUPoint2D
@brief Represents a point in 2-dimensional space.
@brief Represents a point in 2-dimensional space. The coordinates are represented in inches.
*/

@@ -31,3 +31,3 @@ struct SUPoint2D {

@struct SUVector2D
@brief Represents a vector in 2-dimensional space.
@brief Represents a vector in 2-dimensional space. The magnitudes are represented in inches.
*/

@@ -41,3 +41,3 @@ struct SUVector2D {

@struct SUPoint3D
@brief Represents a point in 3-dimensional space.
@brief Represents a point in 3-dimensional space. The coordinates are represented in inches.
*/

@@ -52,3 +52,3 @@ struct SUPoint3D {

@struct SUVector3D
@brief Represents a vector in 3-dimensional space.
@brief Represents a vector in 3-dimensional space. The magnitudes are represented in inches.
*/

@@ -77,3 +77,4 @@ struct SUVector3D {

@brief Represents a 3D axis-aligned bounding box represented by the extreme
diagonal corner points with minimum and maximum x,y,z coordinates.
diagonal corner points with minimum and maximum x,y,z coordinates. The coordinates of the
points are in inches.
*/

@@ -90,3 +91,3 @@ struct SUBoundingBox3D {

@brief Represents a 2D rectangle that is aligned with the X and Y axis of the
coordinate system.
coordinate system. The coordinates of the points of the rectangle are in inches.
*/

@@ -100,3 +101,4 @@ struct SUAxisAlignedRect2D {

@struct SURay3D
@brief Represents a 3D ray defined by a point and normal vector.
@brief Represents a 3D ray defined by a point and normal vector. The coordinates of the point are
represented in inches.
@since SketchUp 2018, API 6.0

@@ -103,0 +105,0 @@ */

@@ -65,7 +65,7 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

/**
@brief Gets the distance between two point objects.
@brief Gets the distance between two point objects, in inches.
@since SketchUp 2017, API 5.0
@param[in] point1 The first point object.
@param[in] point2 The second point object.
@param[out] distance The distance between the two points.
@param[out] distance The distance between the two points, in inches.
@related SUPoint2D

@@ -72,0 +72,0 @@ @return

@@ -66,7 +66,7 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

/**
@brief Gets the distance between two point objects.
@brief Gets the distance between two point objects, in inches.
@since SketchUp 2018 M0, API 6.0
@param[in] point1 The first point object.
@param[in] point2 The second point object.
@param[out] distance The distance between the two points.
@param[out] distance The distance between the two points, in inches.
@related SUPoint3D

@@ -73,0 +73,0 @@ @return

@@ -65,3 +65,3 @@ // Copyright 2017 Trimble Inc., All rights reserved.

@param[in] point The point specifying the translation component of the
transformation.
transformation. The coordinates of the point are in inches.
@param[in] scale The scale value for the transformation.

@@ -82,3 +82,3 @@ @related SUTransformation2D

@param[in] point The point specifying the translation component of the
transformation.
transformation. The coordinates of the point should be expressed in inches.
@param[in] x_scale The x-axis scale value for the transformation.

@@ -101,3 +101,3 @@ @param[in] y_scale The y-axis scale value for the transformation.

@param[in] point The point specifying the translation component of the
transformation.
transformation. The coordinates of the point should be expressed in inches.
@param[in] angle The rotation in radians for the transformation.

@@ -104,0 +104,0 @@ @related SUTransformation2D

@@ -124,3 +124,3 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

@since SketchUp 2017, API 5.0
@param[in] vector The vector object.
@param[in,out] vector The vector object.
@related SUVector2D

@@ -177,6 +177,6 @@ @return

/**
@brief Gets the length of a vector.
@brief Gets the length of a vector, in inches.
@since SketchUp 2017, API 5.0
@param[in] vector The vector object.
@param[out] length The length of the vector.
@param[out] length The length of the vector, in inches.
@related SUVector2D

@@ -191,6 +191,6 @@ @return

/**
@brief Sets the length of a vector.
@brief Sets the length of a vector, in inches.
@since SketchUp 2017, API 5.0
@param[in,out] vector The vector object.
@param[in] length The new length the vector should be.
@param[in] length The new length the vector should be, in inches.
@related SUVector2D

@@ -197,0 +197,0 @@ @return

@@ -190,6 +190,6 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

/**
@brief Gets the length of a vector.
@brief Gets the length of a vector, in inches.
@since SketchUp 2018, API 6.0
@param[in] vector The vector object.
@param[out] length The length of the vector.
@param[out] length The length of the vector, in inches.
@related SUVector3D

@@ -204,6 +204,6 @@ @return

/**
@brief Sets the length of a vector.
@brief Sets the length of a vector, in inches.
@since SketchUp 2018, API 6.0
@param[in,out] vector The vector object.
@param[in] length The new length the vector should be.
@param[in] length The new length the vector should be, in inches.
@related SUVector3D

@@ -210,0 +210,0 @@ @return

@@ -21,3 +21,3 @@ // Copyright 2012-2020 Trimble, Inc. All Rights Reserved.

/** Return type of GetImporterBehavior(). */
/** @brief Return type of GetImporterBehavior(). */
enum SketchUpModelImporterBehavior {

@@ -127,3 +127,3 @@ IMPORT_MODEL_AT_ORIGIN = 0, ///< Preserves coordinates of the imported

ShowOptionsDialog method. The output file is then inserted into
the current model using rules defined by the GetImporterBehavior
the current model using rules defined by the GetImporterBehavior()
method.

@@ -148,11 +148,15 @@ @param[in] input The user selected input file. The file

SketchUpPluginProgressCallback* progress, void* reserved) = 0;
/**
@brief Displays a modal dialog showing an optional summary of the import
process. The default does nothing. Note that Ruby scripting often
disables this dialog.
process.
The default does nothing.
*/
virtual void ShowSummaryDialog() {
}
/**
@brief Defines the method SketchUp uses when placing the imported model.
@return The import behavior SketchUp should use when importing the model.
*/

@@ -159,0 +163,0 @@ virtual SketchUpModelImporterBehavior GetImporterBehavior() const {

@@ -95,6 +95,6 @@ // Copyright 2013-2020 Trimble Inc. All Rights Reserved

@brief Inserts a key-value pair into an attribute dictionary object.
@param[in] dictionary The attribute dictionary object.
@param[in] key The key of the key-value pair. Assumed to be UTF-8
encoded.
@param[in] value_in The value of the key-value pair.
@param[in,out] dictionary The attribute dictionary object.
@param[in] key The key of the key-value pair. Assumed to be UTF-8
encoded.
@param[in] value_in The value of the key-value pair.
@related SUAttributeDictionaryRef

@@ -101,0 +101,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2013-2020 Trimble Inc. All Rights Reserved.
// Copyright 2013-2024 Trimble Inc. All Rights Reserved.

@@ -37,20 +37,26 @@ /**

// The SUSnapToBehavior enum was originally defined incorrectly in this struct.
// This is not valid C. To correct this we conditionally include it in here for
// C compilers, while leaving the original definition inside the struct for C++
// compilers.
#ifndef __cplusplus
#include <SketchUpAPI/model/component_definition_snap_to_behavior_private.h>
#endif
/**
@struct SUComponentBehavior
@brief Describes how the component behaves in a SketchUp model, e.g. how it glues to surfaces.
@note See \ref SUSnapToBehavior for examples on how it is defined depending on
whether the code is compiled as C or C++. (Related to a bug in the original implementation).
@see SUSnapToBehavior
@see SUComponentDefinitionGetBehavior
@see SUComponentDefinitionSetBehavior
*/
struct SUComponentBehavior {
/**
@enum SUSnapToBehavior
@brief 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.
*/
enum SUSnapToBehavior {
SUSnapToBehavior_None = 0,
SUSnapToBehavior_Any,
SUSnapToBehavior_Horizontal,
SUSnapToBehavior_Vertical,
SUSnapToBehavior_Sloped
};
#ifdef __cplusplus
// See the note above for why this is included here.
#include <SketchUpAPI/model/component_definition_snap_to_behavior_private.h>
#endif

@@ -171,3 +177,3 @@ /**

instances.
@param[in] comp_def The component definition object.
@param[in,out] comp_def The component definition object.
@related SUComponentDefinitionRef

@@ -201,6 +207,6 @@ @return

@param[in] comp_def The component definition object.
@param[in] name The name of the component definition. Assumed to be UTF-8
encoded. If the requested name already belongs to another definition in the model,
a unique name will be generated based on this name.
@param[in,out] comp_def The component definition object.
@param[in] name The name of the component definition. Assumed to be UTF-8
encoded. If the requested name already belongs to another definition in the
model, a unique name will be generated based on this name.
@related SUComponentDefinitionRef

@@ -237,4 +243,4 @@ @return

@brief Retrieves the entities of the component definition.
@param[in] comp_def The component definition object.
@param[out] entities The entities retrieved.
@param[in,out] comp_def The component definition object.
@param[out] entities The entities retrieved.
@related SUComponentDefinitionRef

@@ -265,4 +271,4 @@ @return

@brief Sets the description of the component definition.
@param[in] comp_def The component definition object.
@param[in] desc The description to be set. Assumed to be UTF-8 encoded.
@param[in,out] comp_def The component definition object.
@param[in] desc The description to be set. Assumed to be UTF-8 encoded.
@related SUComponentDefinitionRef

@@ -355,2 +361,6 @@ @return

@brief Retrieves the behavior of a component definition.
@note See \ref SUSnapToBehavior for examples on how it is defined depending on
whether the code is compiled as C or C++. (Related to a bug in the original implementation).
@param[in] comp_def The component definition object.

@@ -362,2 +372,7 @@ @param[out] behavior The behavior retrieved.

- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
@see SUSnapToBehavior
@see SUComponentBehavior
@see SUComponentDefinitionGetBehavior
@see SUComponentDefinitionSetBehavior
*/

@@ -369,4 +384,8 @@ SU_RESULT SUComponentDefinitionGetBehavior(

@brief Sets the component behavior of a component definition.
@param[in] comp_def The component definition object.
@param[in] behavior The behavior to set.
@note See \ref SUSnapToBehavior for examples on how it is defined depending on
whether the code is compiled as C or C++. (Related to a bug in the original implementation).
@param[in,out] comp_def The component definition object.
@param[in] behavior The behavior to set.
@related SUComponentDefinitionRef

@@ -377,2 +396,7 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if behavior is NULL
@see SUSnapToBehavior
@see SUComponentBehavior
@see SUComponentDefinitionGetBehavior
@see SUComponentDefinitionSetBehavior
*/

@@ -384,5 +408,5 @@ SU_RESULT SUComponentDefinitionSetBehavior(

@brief Applies a schema type from a schema to a component definition.
@param[in] comp_def The component definition object.
@param[in] schema_ref The schema that owns the schema type to apply.
@param[in] schema_type_ref The schema type to apply.
@param[in,out] comp_def The component definition object.
@param[in] schema_ref The schema that owns the schema type to apply.
@param[in] schema_type_ref The schema type to apply.
@related SUComponentDefinitionRef

@@ -476,2 +500,6 @@ @return

@since SketchUp 2016, API 4.0
@deprecated Starting with SketchUp 2020.0, this function returns the default origin `[0, 0, 0]`, as
the insertion point can no longer be changed.
@param[in] comp_def The component definition object.

@@ -507,3 +535,3 @@ @param[out] point The insertion point retrieved.

@since SketchUp 2016, API 4.0
@param[in] comp_def The component definition object.
@param[in,out] comp_def The component definition object.
@related SUComponentDefinitionRef

@@ -529,4 +557,4 @@ @return

@param[in] comp_def The component definition object.
@param[in] point The \ref SUPoint3D to use.
@param[in,out] comp_def The component definition object.
@param[in] point The \ref SUPoint3D to use.
@related SUComponentDefinitionRef

@@ -543,4 +571,4 @@ @return

@since SketchUp 2016, API 4.0
@param[in] comp_def The component definition object.
@param[in] axes The \ref SUAxesRef to use.
@param[in,out] comp_def The component definition object.
@param[in] axes The \ref SUAxesRef to use.
@related SUComponentDefinitionRef

@@ -592,2 +620,15 @@ @return

/**
* @brief Retrieves the flag indicating whether the component definition is manifold.
* @since SketchUp 2025.0, API 13.0
* @param[in] comp_def The component definition object.
* @param[out] is_manifold The bool value retrieved.
* @related SUComponentDefinitionRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p comp_def is invalid
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p is_manifold is NULL
*/
SU_RESULT SUComponentDefinitionIsManifold(SUComponentDefinitionRef comp_def, bool* is_manifold);
#ifdef __cplusplus

@@ -594,0 +635,0 @@ } // extern "C"

@@ -75,5 +75,5 @@ // Copyright 2013-2020 Trimble Inc. All Rights Reserved.

@brief Sets the name of a component instance object.
@param[in] instance The component instance object.
@param[in] name The name string to set the component instance object.
Assumed to be UTF-8 encoded.
@param[in,out] instance The component instance object.
@param[in] name The name string to set the component instance object.
Assumed to be UTF-8 encoded.
@related SUComponentInstanceRef

@@ -90,3 +90,3 @@ @return

SUComponentDefinitionCreateInstance().
@param[in] instance The component instance object.
@param[in,out] instance The component instance object.
@related SUComponentInstanceRef

@@ -116,4 +116,4 @@ @return

@since SketchUp 2015, API 3.0
@param[in] instance The component instance object.
@param[in] guid The utf-8 formatted guid string.
@param[in,out] instance The component instance object.
@param[in] guid The utf-8 formatted guid string.
@related SUComponentInstanceRef

@@ -147,8 +147,8 @@ @return

coordinates.
@param[in] instance The component instance object.
@param[in] transform The affine transform to set.
@param[in,out] instance The component instance object.
@param[in] transform The affine transform to set.
@related SUComponentInstanceRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if instance is not a valid object
- \ref SU_ERROR_INVALID_INPUT if instance is not a valid object or transform is non invertible
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL

@@ -191,4 +191,4 @@ */

@since SketchUp 2016, API 4.0
@param[in] instance The instance object.
@param[in] lock if true lock the instance, otherwise unlock it.
@param[in,out] instance The instance object.
@param[in] lock if true lock the instance, otherwise unlock it.
@related SUComponentInstanceRef

@@ -195,0 +195,0 @@ @return

@@ -59,5 +59,5 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

created curve object and must not be deallocated via SUEdgeRelease().
@param curve The curve object created.
@param edges The array of edge objects.
@param len The number of edge objects in the array.
@param[out] curve The curve object created.
@param[in] edges The array of edge objects.
@param[in] len The number of edge objects in the array.
@related SUCurveRef

@@ -78,3 +78,3 @@ @return

@brief Releases a curve object and its associated edge objects.
@param curve The curve object.
@param[in,out] curve The curve object.
@related SUCurveRef

@@ -81,0 +81,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2013-2020 Trimble Inc. All Rights Reserved.
// Copyright 2012-2024 Trimble Inc. All Rights Reserved.

@@ -37,2 +37,4 @@ /**

DEFINE_SU_TYPE(SUEntityRef)
DEFINE_SU_TYPE(SUEnvironmentRef)
DEFINE_SU_TYPE(SUEnvironmentsRef)
DEFINE_SU_TYPE(SUFaceRef)

@@ -69,2 +71,3 @@ DEFINE_SU_TYPE(SUFontRef)

DEFINE_SU_TYPE(SUShadowInfoRef)
DEFINE_SU_TYPE(SUSnapRef)
DEFINE_SU_TYPE(SUStyleRef)

@@ -92,2 +95,4 @@ DEFINE_SU_TYPE(SUStylesRef)

SURefType_EdgeUse, ///< SUEdgeUseRef type
SURefType_Environment, ///< SUEnvironment type
SURefType_Environments, ///< SUEnvironments type
SURefType_Entities, ///< SUEntitiesRef type

@@ -140,3 +145,3 @@ SURefType_Face, ///< SUFaceRef type

SURefType_LayerFolder, ///< SULayerFolderRef type
SURefType_Snap, ///< SUSnapRef type
};

@@ -143,0 +148,0 @@

@@ -194,2 +194,4 @@ // Copyright 2016 Trimble Inc. All Rights Reserved.

@brief Get the dimension's font reference.
@note The returned font reference may become invalid if another font is
assigned to this dimension object later.
@since SketchUp 2019, API 7.0

@@ -196,0 +198,0 @@ @param[in] dimension The dimension object.

@@ -91,5 +91,5 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

the drawing element.
@param[in] elem The drawing element.
@param[in] material The material object to set. If an invalid reference is
given, then the material of the element will be removed.
@param[in,out] elem The drawing element.
@param[in] material The material object to set. If an invalid reference is
given, then the material of the element will be removed.
@related SUDrawingElementRef

@@ -117,4 +117,4 @@ @return

@brief Sets the layer object to be associated with a drawing element.
@param[in] elem The drawing element.
@param[in] layer The layer object to set.
@param[in,out] elem The drawing element.
@param[in] layer The layer object to set.
@related SUDrawingElementRef

@@ -129,4 +129,4 @@ @return

@brief Sets the hide flag of a drawing element.
@param[in] elem The drawing element.
@param[in] hide_flag The hide flag to set.
@param[in,out] elem The drawing element.
@param[in] hide_flag The hide flag to set.
@related SUDrawingElementRef

@@ -153,4 +153,4 @@ @return

@brief Sets the casts shadows flag of a drawing element.
@param[in] elem The drawing element.
@param[in] casts_shadows_flag The casts shadows flag to set.
@param[in,out] elem The drawing element.
@param[in] casts_shadows_flag The casts shadows flag to set.
@related SUDrawingElementRef

@@ -177,4 +177,4 @@ @return

@brief Sets the receives shadows flag of a drawing element.
@param[in] elem The drawing element.
@param[in] receives_shadows_flag The casts shadows flag to set.
@param[in,out] elem The drawing element.
@param[in] receives_shadows_flag The casts shadows flag to set.
@related SUDrawingElementRef

@@ -181,0 +181,0 @@ @return

@@ -95,3 +95,3 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

subsequently associated with a parent object (e.g. SUEntitiesAddEdges()).
@param[in] edge The edge object.
@param[in,out] edge The edge object.
@related SUEdgeRef

@@ -144,4 +144,4 @@ @return

@brief Sets the soft flag of an edge object.
@param[in] edge The edge object.
@param[in] soft_flag The soft flag to set.
@param[in,out] edge The edge object.
@param[in] soft_flag The soft flag to set.
@related SUEdgeRef

@@ -168,4 +168,4 @@ @return

@brief Sets the smooth flag of an edge object.
@param[in] edge The edge object.
@param[in] smooth_flag The smooth flag to set.
@param[in,out] edge The edge object.
@param[in] smooth_flag The smooth flag to set.
@related SUEdgeRef

@@ -244,4 +244,4 @@ @return

@brief Sets the color of an edge object.
@param[in] edge The edge object.
@param[in] color The color object to set.
@param[in,out] edge The edge object.
@param[in] color The color object to set.
@related SUEdgeRef

@@ -248,0 +248,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2013-2020 Trimble Inc. All Rights Reserved.
// Copyright 2013-2025 Trimble Inc. All Rights Reserved.

@@ -30,3 +30,3 @@ /**

@since SketchUp 2019, API 7.0
@param[in] entities The entities to clear.
@param[in,out] entities The entities to clear.
@related SUEntitiesRef

@@ -56,3 +56,3 @@ @return

@param[in] entities The entities to populate. Must be an empty entities
@param[in,out] entities The entities to populate. Must be an empty entities
object.

@@ -84,9 +84,8 @@ @param[in] geom_input The geometry input that the entities object is to be

box of the given entities object.
Note that the altitude is calculated based on the model origin, Example:
If an entities object has a bounding box with the following values
{{100,100,100}, {200,200,200}} the result will be something like the
following: {{Latitude, Longitude, 100/METERS_TO_INCHES},
{Latitude, Longitude, 200/METERS_TO_INCHES}} where Latitude and Longitude
are the geographical coordinates and altitude is just a conversion from
inches to meters.
@note Note that the altitude is calculated based on the model origin. Example: If an entities object
has a bounding box with the following values `{100,100,100}`, `{200,200,200}` the result will be
something like the following: `{Latitude, Longitude, 100/METERS_TO_INCHES}`, `{Latitude,
Longitude, 200/METERS_TO_INCHES}` where Latitude and Longitude are the geographical coordinates
and altitude is just a conversion from inches to meters.
@since SketchUp 2018 M0, API 6.0

@@ -101,2 +100,25 @@ @param[in] entities The entities object.

- \ref SU_ERROR_NULL_POINTER_OUTPUT if bbox is NULL
@code
SUModelRef model = SU_INVALID;
SUModelLoadStatus status;
SUResult res = SUModelCreateFromFileWithStatus(&model, "path/to/face.skp", &status);
if (res != SU_ERROR_NONE) {
// Handle error
return 1;
}
// Get the entity container of the model
SUEntitiesRef entities = SU_INVALID;
SUModelGetEntities(model, &entities);
// Retrieve the bounding box in LLA coordinates
SUBoundingBox3D box_lla;
res = SUEntitiesGetBoundingBoxLLA(entities, &box_lla);
if (res == SU_ERROR_NONE) {
// Process box_lla
}
SUModelRelease(&model);
@endcode
*/

@@ -314,5 +336,5 @@ SU_RESULT SUEntitiesGetBoundingBoxLLA(SUEntitiesRef entities, struct SUBoundingBox3D* bbox);

@param[in] entities The entities object.
@param[in] len The length of the array of face objects.
@param[in] faces The array of face objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of face objects.
@param[in] faces The array of face objects to add.
@related SUEntitiesRef

@@ -323,2 +345,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if faces is NULL
@own{faces}
*/

@@ -334,5 +358,5 @@ SU_RESULT SUEntitiesAddFaces(SUEntitiesRef entities, size_t len, const SUFaceRef faces[]);

@param[in] entities The entities object.
@param[in] len The length of the array of edge objects.
@param[in] edges The array of edge objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of edge objects.
@param[in] edges The array of edge objects to add.
@related SUEntitiesRef

@@ -343,2 +367,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if edges is NULL
@own{edges}
*/

@@ -354,5 +380,5 @@ SU_RESULT SUEntitiesAddEdges(SUEntitiesRef entities, size_t len, const SUEdgeRef edges[]);

@param[in] entities The entities object.
@param[in] len The length of the array of curve objects.
@param[in] curves The array of curve objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of curve objects.
@param[in] curves The array of curve objects to add.
@related SUEntitiesRef

@@ -363,2 +389,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if curves is NULL
@own{curves}
*/

@@ -375,5 +403,5 @@ SU_RESULT SUEntitiesAddCurves(SUEntitiesRef entities, size_t len, const SUCurveRef curves[]);

@param[in] entities The entities object.
@param[in] len The length of the array of curve objects.
@param[in] curves The array of arccurve objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of curve objects.
@param[in] curves The array of arccurve objects to add.
@related SUEntitiesRef

@@ -384,2 +412,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if curves is NULL
@own{curves}
*/

@@ -391,5 +421,5 @@ SU_RESULT SUEntitiesAddArcCurves(SUEntitiesRef entities, size_t len, const SUArcCurveRef curves[]);

@since SketchUp 2014 M1, API 2.1
@param[in] entities The entities object.
@param[in] len The length of the array of guide point objects.
@param[in] guide_points The array of guide point objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of guide point objects.
@param[in] guide_points The array of guide point objects to add.
@related SUEntitiesRef

@@ -400,2 +430,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if guide_points is NULL
@own{guide_points}
*/

@@ -408,5 +440,5 @@ SU_RESULT SUEntitiesAddGuidePoints(

@since SketchUp 2016, API 4.0
@param[in] entities The entities object.
@param[in] len The length of the array of guide line objects.
@param[in] guide_lines The array of guide line objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of guide line objects.
@param[in] guide_lines The array of guide line objects to add.
@related SUEntitiesRef

@@ -417,2 +449,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if guide_lines is NULL
@own{guild_lines}
*/

@@ -424,4 +458,4 @@ SU_RESULT SUEntitiesAddGuideLines(

@brief Adds a group object to an entities object.
@param[in] entities The entities object.
@param[in] group The group object to add.
@param[in,out] entities The entities object.
@param[in] group The group object to add.
@related SUEntitiesRef

@@ -431,2 +465,4 @@ @return

- \ref SU_ERROR_INVALID_INPUT if entities or group is not a valid object
@own{group}
*/

@@ -437,4 +473,4 @@ SU_RESULT SUEntitiesAddGroup(SUEntitiesRef entities, SUGroupRef group);

@brief Adds an image object to an entities object.
@param[in] entities The entities object.
@param[in] image The image object to add.
@param[in,out] entities The entities object.
@param[in] image The image object to add.
@related SUEntitiesRef

@@ -444,2 +480,4 @@ @return

- \ref SU_ERROR_INVALID_INPUT if entities or image is not a valid object
@own{image}
*/

@@ -450,7 +488,7 @@ SU_RESULT SUEntitiesAddImage(SUEntitiesRef entities, SUImageRef image);

@brief Adds a component instance object to the entities.
@param[in] entities The entities object.
@param[in] instance The component instance object to add.
@param[out] name The unique name that is assigned to definition of the
component instance. This can be NULL in which case the
caller does not need to retrieve the assigned name.
@param[in,out] entities The entities object.
@param[in] instance The component instance object to add.
@param[out] name The unique name that is assigned to definition of the
component instance. This can be NULL in which case the
caller does not need to retrieve the assigned name.
@related SUEntitiesRef

@@ -462,2 +500,4 @@ @return

\ref SUStringRef object
@own{instance}
*/

@@ -470,5 +510,5 @@ SU_RESULT SUEntitiesAddInstance(

@since SketchUp 2016, API 4.0
@param[in] entities The entities object.
@param[in] len The length of the array of section planes objects.
@param[in] section_planes The array of section planes objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of section planes objects.
@param[in] section_planes The array of section planes objects to add.
@related SUEntitiesRef

@@ -479,2 +519,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if section_planes is NULL
@own{section_planes}
*/

@@ -487,5 +529,5 @@ SU_RESULT SUEntitiesAddSectionPlanes(

@since SketchUp 2018, API 6.0
@param[in] entities The entities object.
@param[in] len The length of the array of text objects.
@param[in] texts The array of text objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of text objects.
@param[in] texts The array of text objects to add.
@related SUEntitiesRef

@@ -496,2 +538,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if texts is NULL
@own{texts}
*/

@@ -650,3 +694,3 @@ SU_RESULT SUEntitiesAddTexts(SUEntitiesRef entities, size_t len, const SUTextRef texts[]);

SU_RESULT SUEntitiesGetDimensions(
SUEntitiesRef entities, size_t len, SUDimensionRef* dimensions, size_t* count);
SUEntitiesRef entities, size_t len, SUDimensionRef dimensions[], size_t* count);

@@ -671,6 +715,6 @@ /**

@since SketchUp 2017, API 5.0
@param[in] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be transformed.
@param[in] trans The transform to be applied.
@param[in,out] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be transformed.
@param[in] trans The transform to be applied.
@related SUEntitiesRef

@@ -694,6 +738,6 @@ @return

@since SketchUp 2017, API 5.0
@param[in] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be transformed.
@param[in] tranforms The transformations to be applied.
@param[in,out] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be transformed.
@param[in] tranforms The transformations to be applied.
@related SUEntitiesRef

@@ -717,5 +761,5 @@ @return

@since SketchUp 2017, API 5.0
@param[in] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be destroyed.
@param[in,out] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be destroyed.
@related SUEntitiesRef

@@ -786,6 +830,6 @@ @return

@since SketchUp 2020.1, API 8.1
@param[in] entities The entities object to be queried.
@param[in] num_edges The length of the array of edge objects.
@param[in] edges The array of edge objects to weld.
@param[out] list The list object to be filled with \ref SUCurveRef objects.
@param[in,out] entities The entities object to be queried.
@param[in] num_edges The length of the array of edge objects.
@param[in] edges The array of edge objects to weld.
@param[out] list The list object to be filled with \ref SUCurveRef objects.
@related SUEntitiesRef

@@ -850,4 +894,5 @@ @see SUArcCurveRef

\p section_plane value and would have returned SU_ERROR_INVALID_INPUT instead
@param[in] entities
@param[in] section_plane The section plane to activate or \p SU_INVALID if none should be active.
@param[in,out] entities
@param[in] section_plane The section plane to activate or \p SU_INVALID if none should be
active.
@related SUEntitiesRef

@@ -854,0 +899,0 @@ @return

@@ -50,2 +50,4 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

SketchUp 2025.0
- SUEnvironmentRef
SketchUp 2020.1

@@ -85,2 +87,3 @@ - SUComponentDefinitionRef

/**

@@ -123,6 +126,6 @@ @brief Retrieves the number of attribute dictionaries of an entity.

@since SketchUp 2018 M0, API 6.0
@param[in] entity The entity.
@param[in] dictionary The dictionary object to be added. If the function is
successful, don't call SUAttributeDictionaryRelease on the
dictionary because the new entity will take ownership.
@param[in,out] entity The entity.
@param[in] dictionary The dictionary object to be added. If the function is
successful, don't call SUAttributeDictionaryRelease on the
dictionary because the new entity will take ownership.
@related SUEntityRef

@@ -129,0 +132,0 @@ @return

@@ -81,8 +81,8 @@ // Copyright 2013-2021 Trimble Inc. All Rights Reserved.

@param[out] face The face object created.
@param[in] vertices3d The array of vertices that make the face.
@param[in] outer_loop The loop input that describes the outer loop of the face.
If the function is successful, the new face will take
ownership of the loop and this reference will be
invalidated.
@param[out] face The face object created.
@param[in] vertices3d The array of vertices that make the face.
@param[in,out] outer_loop The loop input that describes the outer loop of the face.
If the function is successful, the new face will take
ownership of the loop and this reference will be
invalidated.
@related SUFaceRef

@@ -136,3 +136,3 @@ @return

@brief Releases a face object and its associated resources.
@param[in] face The face object.
@param[in,out] face The face object.
@related SUFaceRef

@@ -280,8 +280,8 @@ @return

component.
@param[in] face The face object.
@param[in] vertices3d The array of vertices references by the added loop.
@param[in] loop The loop input that describes the inner loop.
If the function is successful, the new face will take
ownership of the loop and this reference will be
invalidated.
@param[in,out] face The face object.
@param[in] vertices3d The array of vertices references by the added loop.
@param[in,out] loop The loop input that describes the inner loop.
If the function is successful, the new face will take
ownership of the loop and this reference will be
invalidated.
@related SUFaceRef

@@ -340,5 +340,5 @@ @return

@brief Sets the front material of a face object.
@param[in] face The face object.
@param[in] material The material object to set. If invalid, this will set the
material to the default material.
@param[in,out] face The face object.
@param[in] material The material object to set. If invalid, this will set the
material to the default material.
@related SUFaceRef

@@ -367,5 +367,5 @@ @return

@brief Sets the back material of a face object.
@param[in] face The face object.
@param[in] material The material object to set. If invalid, this will set the
material to the default material.
@param[in,out] face The face object.
@param[in] material The material object to set. If invalid, this will set the
material to the default material.
@related SUFaceRef

@@ -527,3 +527,3 @@ @return

@since SketchUp 2016, API 4.0
@param[in] face The face object.
@param[in,out] face The face object.
@related SUFaceRef

@@ -599,4 +599,4 @@ @return

@param[in] face
@param[in] front Flag indicating whether to clear the front or back side of the face.
@param[in,out] face
@param[in] front Flag indicating whether to clear the front or back side of the face.
@related SUFaceRef

@@ -656,4 +656,4 @@ @return

@param[in] face
@param[in] front Flag indicating whether to clear the front or back side of the face.
@param[in,out] face
@param[in] front Flag indicating whether to clear the front or back side of the face.
@related SUFaceRef

@@ -675,5 +675,5 @@ @return

@param[in] face
@param[in] front Flag indicating whether to use the front or back side of the face.
@param[in] mapping
@param[in,out] face
@param[in] front Flag indicating whether to use the front or back side of the face.
@param[in] mapping
@related SUFaceRef

@@ -691,2 +691,18 @@ @return

/**
@brief Retrieves a flag indicating whether \p face is coplanar with \p other_face.
@since SketchUp 2025.0, API 13.0
@param[in] face The \p face object.
@param[in] other_face The \p other_face object.
@param[out] is_coplanar The flag retrieved.
@related SUFaceRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p face or \p other_face is not a valid face object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p is_coplanar is NULL
*/
SU_RESULT SUFaceCoplanarWith(SUFaceRef face, SUFaceRef other_face, bool* is_coplanar);
#ifdef __cplusplus

@@ -693,0 +709,0 @@ } // extern "C" {

@@ -105,3 +105,3 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

@brief Deallocates a geometry input object.
@param[in] geom_input The object to deallocate.
@param[in,out] geom_input The object to deallocate.
@related SUGeometryInputRef

@@ -117,4 +117,4 @@ @return

@brief Adds a vertex to a geometry input object.
@param[in] geom_input The geometry input object.
@param[in] point The location of the vertex to be added.
@param[in,out] geom_input The geometry input object.
@param[in] point The location of the vertex to be added.
@related SUGeometryInputRef

@@ -131,5 +131,5 @@ @return

be overridden.
@param[in] geom_input The geometry input object.
@param[in] num_vertices The number of vertices in the given point array.
@param[in] points The points array containing the location of vertices.
@param[in,out] geom_input The geometry input object.
@param[in] num_vertices The number of vertices in the given point array.
@param[in] points The points array containing the location of vertices.
@related SUGeometryInputRef

@@ -149,7 +149,7 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] vertex0_index The vertex index of the edge's first vertex.
@param[in] vertex1_index The vertex index of the edge's last vertex.
@param[out] added_edge_index (optional) If not NULL, returns the index of the
added edge.
@param[in,out] geom_input The geometry input object.
@param[in] vertex0_index The vertex index of the edge's first vertex.
@param[in] vertex1_index The vertex index of the edge's last vertex.
@param[out] added_edge_index (optional) If not NULL, returns the index of the
added edge.
@related SUGeometryInputRef

@@ -171,6 +171,6 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] hidden The flag to set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] hidden The flag to set.
@related SUGeometryInputRef

@@ -190,6 +190,6 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] soft The flag to set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] soft The flag to set.
@related SUGeometryInputRef

@@ -208,6 +208,6 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] smooth The flag to set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] smooth The flag to set.
@related SUGeometryInputRef

@@ -226,5 +226,5 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index Index of the edge to set the material.
@param[in] material The material to be set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index Index of the edge to set the material.
@param[in] material The material to be set.
@related SUGeometryInputRef

@@ -244,5 +244,5 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index Index of the edge to set the layer.
@param[in] layer The layer to be set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index Index of the edge to set the layer.
@param[in] layer The layer to be set.
@related SUGeometryInputRef

@@ -263,7 +263,7 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] num_edges The number of edges to be used in the curve.
@param[in] edge_indices The edge indices to be used in defining the curve.
@param[out] added_curve_index (optional) If not NULL, returns the index of the
added curve.
@param[in,out] geom_input The geometry input object.
@param[in] num_edges The number of edges to be used in the curve.
@param[in] edge_indices The edge indices to be used in defining the curve.
@param[out] added_curve_index (optional) If not NULL, returns the index of the
added curve.
@related SUGeometryInputRef

@@ -288,15 +288,15 @@ @return

include an arccurve in a loop the user only needs add the arccurve's
points to a loop using \ref SULoopInputAddVertexIndex().
points to a loop using SULoopInputAddVertexIndex().
@since SketchUp 2017 M2, API 5.2
@param[in] geom_input The geometry input object.
@param[in] start_point The index of the vertex at the start of the arc.
@param[in] end_point The index of the vertex at the end of the arc.
@param[in] center The center point of the arc's circle.
@param[in] normal The normal vector of the arc plane.
@param[in] num_segments The number of edges for the arc.
@param[out] added_curve_index (optional) If not NULL, returns the index of the
added curve.
@param[out] control_edge_index (optional) If not NULL, returns the index of the
the arc's control edge which can be used to set
the arc's edge properties.
@param[in,out] geom_input The geometry input object.
@param[in] start_point The index of the vertex at the start of the arc.
@param[in] end_point The index of the vertex at the end of the arc.
@param[in] center The center point of the arc's circle.
@param[in] normal The normal vector of the arc plane.
@param[in] num_segments The number of edges for the arc.
@param[out] added_curve_index (optional) If not NULL, returns the index of the
added curve.
@param[out] control_edge_index (optional) If not NULL, returns the index of the
the arc's control edge which can be used to set
the arc's edge properties.
@related SUGeometryInputRef

@@ -319,3 +319,4 @@ @return

@param[out] loop_input The object created.
@related SUGeometryInputRef
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -330,4 +331,5 @@ - \ref SU_ERROR_NONE on success

@brief Deallocates a loop input object.
@param[in] loop_input The object to deallocate.
@related SUGeometryInputRef
@param[in,out] loop_input The object to deallocate.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -350,4 +352,4 @@ - \ref SU_ERROR_NONE on success

loop, or by adding a curve to the loop which connects the loop's start
and end points using \ref SULoopInputAddCurve(). If a loop was not
previously closed and \ref SULoopInputAddVertexIndex() is used to add
and end points using SULoopInputAddCurve(). If a loop was not
previously closed and SULoopInputAddVertexIndex() is used to add
the loop's start vertex, the loop will be closed and \ref SU_ERROR_NONE

@@ -359,7 +361,8 @@ will be returned. If attempts are made to add vertices after a loop has

@param[in] loop_input The loop input object.
@param[in] vertex_index The vertex index to add. This references a vertex within
the parent geometry input's vertex collection (as a
zero- based index).
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] vertex_index The vertex index to add. This references a vertex within
the parent geometry input's vertex collection (as a
zero- based index).
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -376,6 +379,7 @@ - \ref SU_ERROR_NONE on success

@brief Sets the hidden flag of an edge in a loop input object.
@param[in] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] hidden The flag to set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] hidden The flag to set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -391,6 +395,7 @@ - \ref SU_ERROR_NONE on success

@brief Sets the soft flag of an edge in a loop input object.
@param[in] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] soft The flag to set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] soft The flag to set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -406,6 +411,7 @@ - \ref SU_ERROR_NONE on success

@brief Sets the smooth flag of an edge in a loop input object.
@param[in] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] smooth The flag to set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] smooth The flag to set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -422,6 +428,7 @@ - \ref SU_ERROR_NONE on success

@since SketchUp 2017, API 5.0
@param[in] loop_input The loop input object.
@param[in] edge_index Index of the edge to set the material.
@param[in] material The material to be set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index Index of the edge to set the material.
@param[in] material The material to be set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -440,6 +447,7 @@ - \ref SU_ERROR_NONE on success

@since SketchUp 2017, API 5.0
@param[in] loop_input The loop input object.
@param[in] edge_index Index of the edge to set the layer.
@param[in] layer The layer to be set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index Index of the edge to set the layer.
@param[in] layer The layer to be set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -455,6 +463,7 @@ - \ref SU_ERROR_NONE on success

@brief Adds a simple curve to a loop input object.
@param[in] loop_input The loop input object.
@param[in] first_edge_index First edge index to be associated with the curve.
@param[in] last_edge_index Last edge index to be associated with the curve.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] first_edge_index First edge index to be associated with the curve.
@param[in] last_edge_index Last edge index to be associated with the curve.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -471,9 +480,10 @@ - \ref SU_ERROR_NONE on success

@brief Retrieves whether the loop input is closed. A loop input can be closed
either by re-adding the start vertex to the end of the loop using \ref
SULoopInputAddVertexIndex or by adding a curve to the loop input which
connects the loop's start and end points using \ref SULoopInputAddCurve().
either by re-adding the start vertex to the end of the loop using
SULoopInputAddVertexIndex() or by adding a curve to the loop input which
connects the loop's start and end points using SULoopInputAddCurve().
@since SketchUp 2017 M2, API 5.2
@param[in] loop_input The loop input object.
@param[out] is_closed The flag retrieved (true if the loop is closed).
@related SUGeometryInputRef
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -496,8 +506,8 @@ - \ref SU_ERROR_NONE on success

@param[in] geom_input The geometry input object.
@param[in] outer_loop The outer loop to be set for the face. If the
function succeeds (i.e. returns SU_ERROR_NONE),
this loop will be deallocated.
@param[out] added_face_index (optional) If not NULL, returns the index of the
added face.
@param[in,out] geom_input The geometry input object.
@param[in,out] outer_loop The outer loop to be set for the face. If the
function succeeds (i.e. returns \ref SU_ERROR_NONE),
this loop will be deallocated.
@param[out] added_face_index (optional) If not NULL, returns the index of the
added face.
@related SUGeometryInputRef

@@ -516,5 +526,5 @@ @return

reversing the orientations of all of its loops.
@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to be reversed.
@param[in] reverse The given reverse flag.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to be reversed.
@param[in] reverse The given reverse flag.
@related SUGeometryInputRef

@@ -532,5 +542,5 @@ @return

@brief Sets the layer of a face in the geometry input.
@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to be reversed.
@param[in] layer The layer to be set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to be reversed.
@param[in] layer The layer to be set.
@related SUGeometryInputRef

@@ -554,7 +564,7 @@ @return

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the inner loop.
@param[in] loop_input The inner loop to be added. If the function succeeds
(i.e. returns SU_ERROR_NONE), this loop will be
deallocated.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the inner loop.
@param[in,out] loop_input The inner loop to be added. If the function succeeds
(i.e. returns \ref SU_ERROR_NONE), this loop will be
deallocated.
@related SUGeometryInputRef

@@ -581,5 +591,5 @@ @return

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.

@@ -608,5 +618,5 @@ @related SUGeometryInputRef

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.

@@ -629,5 +639,5 @@ @related SUGeometryInputRef

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.

@@ -653,5 +663,5 @@ @related SUGeometryInputRef

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.

@@ -678,5 +688,5 @@ @related SUGeometryInputRef

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to be hidden.
@param[in] hidden The given hidden flag.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to be hidden.
@param[in] hidden The given hidden flag.
@related SUGeometryInputRef

@@ -683,0 +693,0 @@ @return

@@ -112,5 +112,5 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

@brief Sets the name of a group object.
@param[in] group The group object.
@param[in] name The name string to set the group object.
Assumed to be UTF-8 encoded.
@param[in,out] group The group object.
@param[in] name The name string to set the group object.
Assumed to be UTF-8 encoded.
@related SUGroupRef

@@ -156,4 +156,4 @@ @return

@since SketchUp 2015, API 3.0
@param[in] group The group object.
@param[in] guid_str The utf-8 formatted guid string.
@param[in,out] group The group object.
@param[in] guid_str The utf-8 formatted guid string.
@related SUGroupRef

@@ -173,8 +173,9 @@ @return

coordinates.
@param[in] group The group object.
@param[in] transform The affine transform to set.
@param[in,out] group The group object.
@param[in] transform The affine transform to set.
@related SUGroupRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if group is not a valid object.
- \ref SU_ERROR_INVALID_INPUT if group is not a valid object or if the transform is not
invertible
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL.

@@ -181,0 +182,0 @@ */

@@ -146,4 +146,4 @@ // Copyright 2013 Trimble Inc. All Rights Reserved

@brief Sets the name of an image object.
@param[in] image The image object.
@param[in] name The name to set. Assumed to be UTF-8 encoded.
@param[in,out] image The image object.
@param[in] name The name to set. Assumed to be UTF-8 encoded.
@related SUImageRef

@@ -175,8 +175,9 @@ @deprecated This function sets a property that should not exist.

@brief Sets the 3-dimensional homogeneous transform of an image object.
@param[in] image The image object.
@param[in] transform The affine transform to set.
@param[in,out] image The image object.
@param[in] transform The affine transform to set.
@related SUImageRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if image is not a valid object
- \ref SU_ERROR_INVALID_INPUT if image is not a valid object or if the transform is not
invertible
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL

@@ -183,0 +184,0 @@ */

@@ -28,3 +28,3 @@ // Copyright 2013-2019 Trimble, Inc. All Rights Reserved.

@brief Indicates whether to set the layer visible by default. Used for
\ref SULayerGetSceneBehavior() and \ref SULayerSetSceneBehavior().
SULayerGetSceneBehavior() and SULayerSetSceneBehavior().
*/

@@ -39,3 +39,3 @@ enum SULayerVisibilityDefaultType {

@brief Indicates whether to set the layer visible on new scenes. Used for
\ref SULayerGetSceneBehavior() and \ref SULayerSetSceneBehavior().
SULayerGetSceneBehavior() and SULayerSetSceneBehavior().
*/

@@ -89,3 +89,3 @@ enum SULayerVisibilityNewSceneType {

The layer object to be deallocated must not be associated with a SketchUp model.
@param[in] layer The layer object.
@param[in,out] layer The layer object.
@related SULayerRef

@@ -92,0 +92,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2013 Trimble Inc. All Rights Reserved.
// Copyright 2012-2024 Trimble Inc. All Rights Reserved.

@@ -25,3 +25,2 @@ /**

/**

@@ -60,2 +59,22 @@ @enum SUMaterialType

/**
@enum SUMaterialWorkflow
@brief Indicates the workflow being used to represent materials
@since SketchUp 2025.0, API 13.0
*/
enum SUMaterialWorkflow {
SUMaterialWorkflow_Classic = 0, ///< Classic material workflow
SUMaterialWorkflow_PBRMetallicRoughness ///< PBR metallic/roughness material workflow
};
/**
@enum SUMaterialNormalMapStyle
@brief Indicates the normal mapping convention used by the material.
@since SketchUp 2025.0, API 13.0
*/
enum SUMaterialNormalMapStyle {
SUMaterialNormalMapStyle_OpenGL = 0, ///< OpenGL style
SUMaterialNormalMapStyle_DirectX, ///< DirectX style
};
/**
@brief Converts from an \ref SUMaterialRef to an \ref SUEntityRef.

@@ -100,3 +119,3 @@ This is essentially an upcast operation.

The material must not be associated with a parent object such as a face.
@param[in] material The material to be released.
@param[in,out] material The material to be released.
@related SUMaterialRef

@@ -118,5 +137,5 @@ @return

@param[in] material The material object.
@param[in] name The name to set the material name. Assumed to be UTF-8
encoded.
@param[in,out] material The material object.
@param[in] name The name to set the material name. Assumed to be UTF-8
encoded.
@related SUMaterialRef

@@ -175,4 +194,4 @@ @return

@brief Sets the color of a material object.
@param[in] material The material object.
@param[in] color The color value to set the material color.
@param[in,out] material The material object.
@param[in] color The color value to set the material color.
@related SUMaterialRef

@@ -199,12 +218,12 @@ @return

/**
@brief Sets the texture of a material object. Materials take ownership of their
assigned textures, so textures should not be shared accross different
materials.
@param[in] material The material object.
@param[in] texture The texture object to set the material texture.
@brief Sets the texture of a material object.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@param[in,out] material The material object.
@param[in] texture The texture object to set the material texture.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if material or texture is not a valid object
- \ref SU_ERROR_GENERIC if texture contains invalid image data
- \ref SU_ERROR_INVALID_INPUT if \p material or \p texture is not a valid object
- \ref SU_ERROR_GENERIC if \p texture contains invalid image data
*/

@@ -216,3 +235,4 @@ SU_RESULT SUMaterialSetTexture(SUMaterialRef material, SUTextureRef texture);

@param[in] material The material object.
@param[out] texture The texture object retrieved.
@param[out] texture The texture object retrieved. This texture should not be released
via SUTextureRelease() since it is owned by the material.
@related SUMaterialRef

@@ -223,3 +243,2 @@ @return

- \ref SU_ERROR_NULL_POINTER_OUTPUT if texture is NULL
- \ref SU_ERROR_INVALID_OUTPUT if texture is not a valid object
- \ref SU_ERROR_NO_DATA if the material object does not have a texture

@@ -243,4 +262,4 @@ */

@brief Sets the alpha value of a material object.
@param[in] material The material object.
@param[in] alpha The alpha value to set. Must be within range [0.0, 1.0].
@param[in,out] material The material object.
@param[in] alpha The alpha value to set. Must be within range [0.0, 1.0].
@related SUMaterialRef

@@ -270,4 +289,4 @@ @return

object.
@param[in] material The material object.
@param[in] use_opacity The flag boolean value to set.
@param[in,out] material The material object.
@param[in] use_opacity The flag boolean value to set.
@related SUMaterialRef

@@ -282,4 +301,4 @@ @return

@brief Sets the type of a material object.
@param[in] material The material object.
@param[in] type The type to set.
@param[in,out] material The material object.
@param[in] type The type to set.
@related SUMaterialRef

@@ -340,4 +359,4 @@ @return

@since SketchUp 2019.2, API 7.1
@param[in] material The material object.
@param[in] type The type to set.
@param[in,out] material The material object.
@param[in] type The type to set.
@related SUMaterialRef

@@ -381,2 +400,3 @@ @return

SUMaterialRef material, double* hue, double* saturation, double* lightness);
/**

@@ -398,3 +418,390 @@ @brief Writes a material to a SKM file.

/** @name PBR Metallic Roughness Workflow
*/
///@{
/**
@brief Queries the workflow type of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] workflow The returned workflow type.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p workflow is NULL
*/
SU_RESULT SUMaterialGetWorkflow(SUMaterialRef material, enum SUMaterialWorkflow* workflow);
/**
@brief Enables metalness properties for the material.
@note After this is enabled, a metallic texture and/or a metallic factor can be set.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] enable Whether to enable or disable.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
*/
SU_RESULT SUMaterialSetMetalnessEnabled(SUMaterialRef material, bool enable);
/**
@brief Queries whether metalness properties are enabled for the material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] enabled Whether metalness is enabled or not.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
*/
SU_RESULT SUMaterialIsMetalnessEnabled(SUMaterialRef material, bool* enabled);
/**
@brief Sets the metallic texture of a PBR material.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] texture The texture containing the metalness information. Should be an 8 bit per
pixel (single channel) image. If an invalid texture reference is given (i.e.
\ref SU_INVALID), then any existing metallic texture will be removed from
the material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid metalness data
*/
SU_RESULT SUMaterialSetMetallicTexture(SUMaterialRef material, SUTextureRef texture);
/**
@brief Retrieves the metallic texture of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] texture The texture containing the metalness information, if one exists. This texture
should not be released via SUTextureRelease() since it is owned by the
material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
- \ref SU_ERROR_NO_DATA if \p material does not have a metalness texture
*/
SU_RESULT SUMaterialGetMetallicTexture(SUMaterialRef material, SUTextureRef* texture);
/**
@brief Sets the metallic factor of a material.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] factor Metallic factor to set. The valid range is [0.0, 1.0].
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p factor is not within the valid range
*/
SU_RESULT SUMaterialSetMetallicFactor(SUMaterialRef material, double factor);
/**
@brief Retrieves the metallic factor of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] factor The factor returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p factor is NULL
*/
SU_RESULT SUMaterialGetMetallicFactor(SUMaterialRef material, double* factor);
/**
@brief Enables roughness properties for the material.
@note After this is enabled, a roughness texture and/or a roughness factor can be set.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] enable Whether to enable or disable.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
*/
SU_RESULT SUMaterialSetRoughnessEnabled(SUMaterialRef material, bool enable);
/**
@brief Queries whether roughness properties are enabled for the material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] enabled Whether roughness is enabled or not.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
*/
SU_RESULT SUMaterialIsRoughnessEnabled(SUMaterialRef material, bool* enabled);
/**
@brief Sets the roughness texture of a PBR material.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] texture The texture containing the roughness information. Should be an 8 bit per
pixel (single channel) image. If an invalid texture reference is given (i.e.
\ref SU_INVALID), then any existing metallic texture will be removed from
the material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid roughness data
*/
SU_RESULT SUMaterialSetRoughnessTexture(SUMaterialRef material, SUTextureRef texture);
/**
@brief Retrieves the roughness texture of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] texture The texture containing the roughness information, if one exists. This texture
should not be released via SUTextureRelease() since it is owned by the
material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
- \ref SU_ERROR_NO_DATA if \p material does not have a roughness texture
*/
SU_RESULT SUMaterialGetRoughnessTexture(SUMaterialRef material, SUTextureRef* texture);
/**
@brief Sets the roughness factor of a material.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] factor Roughness factor to set. The valid range is [0.0, 1.0].
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p factor is not within the valid range
*/
SU_RESULT SUMaterialSetRoughnessFactor(SUMaterialRef material, double factor);
/**
@brief Retrieves the roughness factor of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] factor The factor returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p factor is NULL
*/
SU_RESULT SUMaterialGetRoughnessFactor(SUMaterialRef material, double* factor);
/**
@brief Enables normal map for the material.
@note A normal map texture must be set before enabling it.
@since SketchUp 2025.0.2, API 13.1
@param[in,out] material The material object.
@param[in] enable Whether to enable or disable.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_ARGUMENT if a normal map texture was not set before enabling.
*/
SU_RESULT SUMaterialSetNormalEnabled(SUMaterialRef material, bool enable);
/**
@brief Queries whether normal mapping is enabled for the material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] enabled Whether normal mapping is enabled or not.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
*/
SU_RESULT SUMaterialIsNormalEnabled(SUMaterialRef material, bool* enabled);
/**
@brief Sets the normal texture of a PBR material.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] texture The texture containing the normal information. Should be an 24 bit per pixel
(3 channel) image. If an invalid texture reference is given (i.e. \ref
SU_INVALID), then any existing normal texture will be removed from the
material, which will effectively disable normal mapping.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid normal data
*/
SU_RESULT SUMaterialSetNormalTexture(SUMaterialRef material, SUTextureRef texture);
/**
@brief Retrieves the normal texture of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] texture The texture containing the normal information, if one exists. This texture
should not be released via SUTextureRelease() since it is owned by the
material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
- \ref SU_ERROR_NO_DATA if \p material does not have a normal texture
*/
SU_RESULT SUMaterialGetNormalTexture(SUMaterialRef material, SUTextureRef* texture);
/**
@brief Sets the normal scale of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[in] scale Normal scale to set. Should be >= 0.0
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p scale is not valid
*/
SU_RESULT SUMaterialSetNormalScale(SUMaterialRef material, double scale);
/**
@brief Retrieves the normal scale of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] scale Normal scale returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p scale is NULL
*/
SU_RESULT SUMaterialGetNormalScale(SUMaterialRef material, double* scale);
/**
@brief Sets the normal mapping style of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[in] style Normal style to set.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
*/
SU_RESULT SUMaterialSetNormalStyle(SUMaterialRef material, enum SUMaterialNormalMapStyle style);
/**
@brief Retrieves the normal mapping style of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] style Normal style returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
*/
SU_RESULT SUMaterialGetNormalStyle(SUMaterialRef material, enum SUMaterialNormalMapStyle* style);
/**
@brief Enables ambient occlusion map for the material.
@note An ambient occlusion map texture must be set before enabling it.
@since SketchUp 2025.0.2, API 13.1
@param[in,out] material The material object.
@param[in] enable Whether to enable or disable.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_ARGUMENT if an ambient occlusion map texture was not set before enabling.
*/
SU_RESULT SUMaterialSetAOEnabled(SUMaterialRef material, bool enable);
/**
@brief Queries whether ambient occlusion mapping is enabled for the material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] enabled Whether occlusion mapping is enabled or not.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
*/
SU_RESULT SUMaterialIsAOEnabled(SUMaterialRef material, bool* enabled);
/**
@brief Sets the ambient occlusion texture of a PBR material.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[in] texture The texture containing the occlusion information. Should be an 8 bit per pixel
(single channel) image. If an invalid texture reference is given (i.e. \ref
SU_INVALID), then any existing AO texture will be removed from the material,
which will effectively disable AO mapping.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid occlusion data
*/
SU_RESULT SUMaterialSetAOTexture(SUMaterialRef material, SUTextureRef texture);
/**
@brief Retrieves the ambient occlusion texture of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] texture The texture containing the occlusion information, if one exists. This texture
should not be released via SUTextureRelease() since it is owned by the
material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
- \ref SU_ERROR_NO_DATA if \p material does not have an AO texture
*/
SU_RESULT SUMaterialGetAOTexture(SUMaterialRef material, SUTextureRef* texture);
/**
@brief Sets the ambient occlusion strength of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[in] strength Strength to set. The valid range is [0.0, 1.0].
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p strength is not within the valid range
*/
SU_RESULT SUMaterialSetAOStrength(SUMaterialRef material, double strength);
/**
@brief Retrieves the ambient occlusion strength of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] strength Occlusion strength returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p strength is NULL
*/
SU_RESULT SUMaterialGetAOStrength(SUMaterialRef material, double* strength);
// End of PBR grouping:
///@}
#ifdef __cplusplus

@@ -401,0 +808,0 @@ } // extern "C"

@@ -85,86 +85,87 @@ // Copyright 2013 Trimble Inc. All rights reserved.

Rendering Option | Value Type
------------------------ | ----------------------
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 (since SketchUp 2014, API 2.0) | SUTypedValueType_Bool
DisplaySectionCuts (since SketchUp 2015, API 3.0) | SUTypedValueType_Bool
DisplaySketchAxes | SUTypedValueType_Bool
DisplayText | SUTypedValueType_Bool
DisplayWatermarks | SUTypedValueType_Bool
DrawBackEdges (since SketchUp 2015, API 3.0) | SUTypedValueType_Bool
DrawDepthQue | SUTypedValueType_Bool
DrawGround | SUTypedValueType_Bool
DrawHidden | SUTypedValueType_Bool
DrawHiddenGeometry (since SketchUp 2020, API 8.0) | SUTypedValueType_Bool
DrawHiddenObjects (since SketchUp 2020, API 8.0) | SUTypedValueType_Bool
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 (since SketchUp 2015, API 3.0) | SUTypedValueType_Bool
SectionCutFilled (since SketchUp 2018, API 6.0) | SUTypedValueType_Bool
SectionCutWidth | SUTypedValueType_Int32
SectionDefaultCutColor | SUTypedValueType_Color
SectionDefaultFillColor (since SketchUp 2018, API 6.0) | SUTypedValueType_Color
SectionInactiveColor | SUTypedValueType_Color
ShowViewName | SUTypedValueType_Bool
SilhouetteWidth | SUTypedValueType_Int32
SkyColor | SUTypedValueType_Color
Texture | SUTypedValueType_Bool
TransparencySort | SUTypedValueType_Int32
Rendering Option | Value Type | Since
---------------------------- | ---------------------------- | -------------------------
`"BackgroundColor"` | \ref SUTypedValueType_Color | &nbsp;
`"BandColor"` | \ref SUTypedValueType_Color | &nbsp;
`"ConstructionColor"` | \ref SUTypedValueType_Color | &nbsp;
`"DepthQueWidth"` | \ref SUTypedValueType_Int32 | &nbsp;
`"DisplayColorByLayer"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayDims"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayFog"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayInstanceAxes"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplaySectionPlanes"` | \ref SUTypedValueType_Bool | SketchUp 2014, API 2.0
`"DisplaySectionCuts"` | \ref SUTypedValueType_Bool | SketchUp 2015, API 3.0
`"DisplaySketchAxes"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayText"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayWatermarks"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawBackEdges"` | \ref SUTypedValueType_Bool | SketchUp 2015, API 3.0
`"DrawDepthQue"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawGround"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawHidden"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawHiddenGeometry"` | \ref SUTypedValueType_Bool | SketchUp 2020, API 8.0
`"DrawHiddenObjects"` | \ref SUTypedValueType_Bool | SketchUp 2020, API 8.0
`"DrawHorizon"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawLineEnds"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawProfilesOnly"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawSilhouettes"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawUnderground"` | \ref SUTypedValueType_Bool | &nbsp;
`"EdgeColorMode"` | \ref SUTypedValueType_Int32 | &nbsp;
`"EdgeDisplayMode"` | \ref SUTypedValueType_Int32 | &nbsp;
`"EdgeType"` | \ref SUTypedValueType_Int32 | &nbsp;
`"ExtendLines"` | \ref SUTypedValueType_Bool | &nbsp;
`"FaceBackColor"` | \ref SUTypedValueType_Color | &nbsp;
`"FaceFrontColor"` | \ref SUTypedValueType_Color | &nbsp;
`"FogColor"` | \ref SUTypedValueType_Color | &nbsp;
`"FogEndDist"` | \ref SUTypedValueType_Double | &nbsp;
`"FogStartDist"` | \ref SUTypedValueType_Double | &nbsp;
`"FogUseBkColor"` | \ref SUTypedValueType_Bool | &nbsp;
`"ForegroundColor"` | \ref SUTypedValueType_Color | &nbsp;
`"GroundColor"` | \ref SUTypedValueType_Color | &nbsp;
`"GroundTransparency"` | \ref SUTypedValueType_Int32 | &nbsp;
`"HideConstructionGeometry"` | \ref SUTypedValueType_Bool | &nbsp;
`"HighlightColor"` | \ref SUTypedValueType_Color | &nbsp;
`"HorizonColor"` | \ref SUTypedValueType_Color | &nbsp;
`"InactiveFade"` | \ref SUTypedValueType_Double | &nbsp;
`"InactiveHidden"` | \ref SUTypedValueType_Bool | &nbsp;
`"InstanceFade"` | \ref SUTypedValueType_Double | &nbsp;
`"InstanceHidden"` | \ref SUTypedValueType_Bool | &nbsp;
`"JitterEdges"` | \ref SUTypedValueType_Bool | &nbsp;
`"LineEndWidth"` | \ref SUTypedValueType_Int32 | &nbsp;
`"LineExtension"` | \ref SUTypedValueType_Int32 | &nbsp;
`"LockedColor"` | \ref SUTypedValueType_Color | &nbsp;
`"MaterialTransparency"` | \ref SUTypedValueType_Bool | &nbsp;
`"ModelTransparency"` | \ref SUTypedValueType_Bool | &nbsp;
`"RenderMode"` | \ref SUTypedValueType_Int32 | &nbsp;
`"SectionActiveColor"` | \ref SUTypedValueType_Color | &nbsp;
`"SectionCutDrawEdges"` | \ref SUTypedValueType_Bool | SketchUp 2015, API 3.0
`"SectionCutFilled"` | \ref SUTypedValueType_Bool | SketchUp 2018, API 6.0
`"SectionCutWidth"` | \ref SUTypedValueType_Int32 | &nbsp;
`"SectionDefaultCutColor"` | \ref SUTypedValueType_Color | &nbsp;
`"SectionDefaultFillColor"` | \ref SUTypedValueType_Color | SketchUp 2018, API 6.0
`"SectionInactiveColor"` | \ref SUTypedValueType_Color | &nbsp;
`"ShowViewName"` | \ref SUTypedValueType_Bool | &nbsp;
`"SilhouetteWidth"` | \ref SUTypedValueType_Int32 | &nbsp;
`"SkyColor"` | \ref SUTypedValueType_Color | &nbsp;
`"Texture"` | \ref SUTypedValueType_Bool | &nbsp;
`"TransparencySort"` | \ref SUTypedValueType_Int32 | &nbsp;
Some of the options map to enumerated values, as shown in the table below.
Option | Value | Meaning
--------------- | ----- | -------
EdgeColorMode | 0: | ObjectColor
&nbsp; | 1: | ForegroundColor
&nbsp; | 2: | DirectionColor
EdgeDisplayMode | 0: | EdgeDisplayNone
&nbsp; | 1: | EdgeDisplayAll
&nbsp; | 2: | EdgeDisplayStandalone
RenderMode | 0: | RenderWireframe
&nbsp; | 1: | RenderHidden
&nbsp; | 2: | RenderFlat
&nbsp; | 3: | RenderSmooth
&nbsp; | 4: | RenderTextureObsolete
&nbsp; | 5: | RenderNoMaterials
EdgeType | 0: | EdgeStandard
&nbsp; | 1: | EdgeNPR
Option | Value | Meaning | Since
------------------ | ----- | --------------------- | --------------------------
\b EdgeColorMode | `0` | ObjectColor | &nbsp;
&nbsp; | `1` | ForegroundColor | &nbsp;
&nbsp; | `2` | DirectionColor | &nbsp;
\b EdgeDisplayMode | `0` | EdgeDisplayNone | &nbsp;
&nbsp; | `1` | EdgeDisplayAll | &nbsp;
&nbsp; | `2` | EdgeDisplayStandalone | &nbsp;
\b RenderMode | `0` | RenderWireframe | &nbsp;
&nbsp; | `1` | RenderHidden | &nbsp;
&nbsp; | `2` | RenderFlat | &nbsp;
&nbsp; | `3` | RenderSmooth | &nbsp;
&nbsp; | `4` | RenderTextureObsolete | &nbsp;
&nbsp; | `5` | RenderNoMaterials | &nbsp;
&nbsp; | `6` | RenderPhysicallyBased | SketchUp 2025.0, API 13.0
\b EdgeType | `0` | EdgeStandard | &nbsp;
&nbsp; | `1` | EdgeNPR | &nbsp;

@@ -171,0 +172,0 @@ @note The rendering option FaceColorMode was removed in SketchUp 2019.1.

@@ -1,2 +0,2 @@

// Copyright 2013 Trimble Inc. All Rights Reserved.
// Copyright 2013-2025 Trimble Inc. All Rights Reserved.

@@ -23,2 +23,5 @@ /**

object.
@note Add the scene to the model before setting its properties, except for the name which should
be set before adding it.
*/

@@ -34,14 +37,19 @@

*/
#define FLAG_USE_CAMERA 0x0001
#define FLAG_USE_RENDERING_OPTIONS 0x0002
#define FLAG_USE_SHADOWINFO 0x0004
#define FLAG_USE_AXES 0x0008
#define FLAG_USE_CAMERA 0x0001 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_RENDERING_OPTIONS 0x0002 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_SHADOWINFO 0x0004 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_AXES 0x0008 ///< @since SketchUp 2017, API 5.0
/// @deprecated Obsolete since SketchUp 2020.1, API 8.1. Instead, use
/// \ref FLAG_USE_HIDDEN_GEOMETRY and \ref FLAG_USE_HIDDEN_OBJECTS.
///
/// @since SketchUp 2017, API 5.0
#define FLAG_USE_HIDDEN 0x0010
#define FLAG_USE_LAYER_VISIBILITY 0x0020
#define FLAG_USE_SECTION_PLANES 0x0040
#define FLAG_USE_HIDDEN_GEOMETRY 0x0080
#define FLAG_USE_HIDDEN_OBJECTS 0x0100
#define FLAG_USE_LAYER_VISIBILITY 0x0020 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_SECTION_PLANES 0x0040 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_HIDDEN_GEOMETRY 0x0080 ///< @since SketchUp 2020.1, API 8.1
#define FLAG_USE_HIDDEN_OBJECTS 0x0100 ///< @since SketchUp 2020.1, API 8.1
#define FLAG_USE_ENVIRONMENT 0x0200 ///< @since SketchUp 2025.0, API 13.0
#define FLAG_USE_ALL 0x0fff
#define FLAG_NO_CAMERA 0x0ffe
#define FLAG_USE_ALL 0x0fff ///< @since SketchUp 2017, API 5.0
#define FLAG_NO_CAMERA 0x0ffe ///< @since SketchUp 2017, API 5.0
/**@}*/

@@ -74,2 +82,6 @@

@brief Creates an empty scene object.
@note The created scene will not save any scene properties until
the \ref SUSceneFlags bits are set.
@param[out] scene The scene object created.

@@ -81,2 +93,17 @@ @related SUSceneRef

- \ref SU_ERROR_OVERWRITE_VALID if face already refers to a valid object
@see SUSceneSetFlags
@see SUModelAddScenes
@code
SUScene scene = SU_INVALID;
SUSceneCreate(&scene);
SUSceneSetName(scene, "Example"); // Must be unique.
SUSceneSetFlags(scene, FLAG_USE_ALL); // Set the properties to remember.
SUModelAddScenes(model, 1, &scene); // This will also update the scene based on the flags set.
// Set scene properties after adding it to the model.
// ...
SUSceneSetCamera(scene, eye, target, up);
@endcode
*/

@@ -122,5 +149,7 @@ SU_RESULT SUSceneCreate(SUSceneRef* scene);

/**
@brief Retrieves the camera of a scene object. The returned camera object
points to scene's internal camera. So the camera must not be released
via SUCameraRelease().
@brief Retrieves the camera of a scene object.
@note The returned camera object points to scene's internal camera. So the
camera must not be released via SUCameraRelease().
@param[in] scene The scene object.

@@ -137,6 +166,8 @@ @param[out] camera The camera object retrieved.

/**
@brief Sets a given scene's camera object. The scene does not take ownership
of the provided camera, it just copies the properties to the scene's
owned camera. If the input camera was created using SUCameraCreate()
it must be released using SUCameraRelease().
@brief Sets a given scene's camera object.
@note The scene does not take ownership of the provided camera, it just copies
the properties to the scene's owned camera. If the input camera was created
using SUCameraCreate() it must be released using SUCameraRelease().
@since SketchUp 2016, API 4.0

@@ -197,3 +228,3 @@ @param[in] scene The scene object.

@warning Breaking Change: The behavior of SUSceneSetName changed in
SketchUp SDK 2018 API 6.0 to return SU_ERROR_INVALID_ARGUMENT if the
SketchUp 2018, API 6.0 to return \ref SU_ERROR_INVALID_ARGUMENT if the
given name already exists in the scene's model.

@@ -303,2 +334,4 @@

@related SUSceneRef
@see SUSceneGetUseHiddenGeometry
@see SUSceneGetUseHiddenObjects
@return

@@ -320,2 +353,4 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneSetUseHiddenGeometry
@see SUSceneSetUseHiddenObjects
@return

@@ -334,2 +369,5 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneSetUseHiddenGeometry
@see SUSceneGetUseHiddenObjects
@see SUSceneSetUseHiddenObjects
@return

@@ -349,2 +387,5 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneGetUseHiddenGeometry
@see SUSceneGetUseHiddenObjects
@see SUSceneSetUseHiddenObjects
@return

@@ -363,2 +404,5 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneGetUseHiddenGeometry
@see SUSceneSetUseHiddenGeometry
@see SUSceneSetUseHiddenObjects
@return

@@ -378,2 +422,5 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneGetUseHiddenGeometry
@see SUSceneSetUseHiddenGeometry
@see SUSceneGetUseHiddenObjects
@return

@@ -470,7 +517,9 @@ - \ref SU_ERROR_NONE on success

Adding a layer to a scene will flag the layer to be the opposite of its
default scene visibility. See \ref SULayerVisibilityDefaultType. This
function does not take ownership of the specified layer.
@note Adding a layer to a scene will flag the layer to be the opposite of its
default scene visibility. See \ref SULayerVisibilityDefaultType. This
function does not take ownership of the specified layer.
@note Prior to SketchUp 2020.0, API 8.0 this function did not return
SU_ERROR_INVALID_ARGUMENT.
\ref SU_ERROR_INVALID_ARGUMENT.
@since SketchUp 2016, API 4.0

@@ -492,7 +541,9 @@ @param[in] scene The scene object.

Removing a layer from a scene will flag the layer to use its default
scene visibility. See \ref SULayerVisibilityDefaultType. Scenes do not
own their layers so removing them doesn't release them.
@note Removing a layer from a scene will flag the layer to use its default
scene visibility. See \ref SULayerVisibilityDefaultType. Scenes do not
own their layers so removing them doesn't release them.
@note Prior to SketchUp 2020.0, API 8.0 this function did not return
SU_ERROR_INVALID_ARGUMENT.
\ref SU_ERROR_INVALID_ARGUMENT.
@since SketchUp 2016, API 4.0

@@ -553,7 +604,8 @@ @param[in] scene The scene object.

Adding a layer folder to a scene will cause that layer folder to be
flagged as HIDDEN for the specified scene. Any layers or layer folders
within that layer folder will also be hidden, and therefore don't need to
be added to the scene. This function does not take ownership of the
specified layer folder.
@note Adding a layer folder to a scene will cause that layer folder to be
flagged as HIDDEN for the specified scene. Any layers or layer folders
within that layer folder will also be hidden, and therefore don't need to
be added to the scene. This function does not take ownership of the
specified layer folder.
@since SketchUp 2021.0, API 9.0

@@ -575,5 +627,6 @@ @param[in] scene The scene object.

Removing a layer folder from a scene will cause that layer folder to be
flagged as VISIBLE for the specified scene. Scenes do not own their layer
folders so removing them doesn't release them.
@note Removing a layer folder from a scene will cause that layer folder to be
flagged as VISIBLE for the specified scene. Scenes do not own their layer
folders so removing them doesn't release them.
@since SketchUp 2021.0, API 9.0

@@ -672,7 +725,13 @@ @param[in] scene The scene object.

See \ref SUSceneFlags "Scene Flags" for available flags that can be combined bitwise.
@note If this function is called after the scene has been added to the model the API user *must*
call SUSceneUpdate(). Otherwise it can lead to a crash while interacting with the model.
In general it is recommended to use the separate `SUSceneSetUse*` setters after the scene has
been added to the model.
@note \ref FLAG_USE_HIDDEN is deprecated and the bits for \ref FLAG_USE_HIDDEN_GEOMETRY and
\ref FLAG_USE_HIDDEN_OBJECTS will take precedence.
@since SketchUp 2017, API 5.0
@param[in] scene The scene object.
@param[in] flags The flags to be set.
@param[in] flags A bitwise combination of \ref SUSceneFlags.
@related SUSceneRef

@@ -682,2 +741,6 @@ @return

- \ref SU_ERROR_INVALID_INPUT if scene is not a valid object
@see SUSceneFlags
@see SUSceneGetFlags
@see SUSceneUpdate
*/

@@ -689,7 +752,5 @@ SU_RESULT SUSceneSetFlags(SUSceneRef scene, uint32_t flags);

See \ref SUSceneFlags "Scene Flags" for available flags that can be combined bitwise.
@since SketchUp 2017, API 5.0
@param[in] scene The scene object.
@param[out] flags The flags.
@param[out] flags A bitwise combination of \ref SUSceneFlags.
@related SUSceneRef

@@ -700,2 +761,6 @@ @return

- \ref SU_ERROR_NULL_POINTER_OUTPUT if flags is NULL
@see SUSceneFlags
@see SUSceneSetFlags
*/

@@ -795,3 +860,3 @@ SU_RESULT SUSceneGetFlags(SUSceneRef scene, uint32_t* flags);

@note Only drawing elements at the root of the model, or nested instances of
components, groups, and images are controlled by scene visibility.
components, groups, and images are controlled by scene visibility.
@param[in] scene The scene object.

@@ -854,2 +919,117 @@ @param[in] drawing_element The drawing element object.

/**
* @brief Enables the use of an environment for a scene.
* @since SketchUp 2025.0, API 13.0
* @param[in] scene The scene object.
* @param[in] use_environment The setting whether a scene should use an environment.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
*/
SU_RESULT SUSceneSetUseEnvironment(SUSceneRef scene, bool use_environment);
/**
* @brief Retrieves the setting whether a scene uses an environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] scene The scene object.
* @param[out] use_environment The setting whether a scene should use an environment.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p use_environment is `NULL`
*/
SU_RESULT SUSceneGetUseEnvironment(SUSceneRef scene, bool* use_environment);
/**
* @brief Sets the environment for a scene.
* @since SketchUp 2025.0, API 13.0
* @param[in] scene The scene object.
* @param[in] environment The environment object to be set.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
*/
SU_RESULT SUSceneSetEnvironment(SUSceneRef scene, SUEnvironmentRef environment);
/**
* @brief Retrieves the environment of a scene.
* @since SketchUp 2025.0, API 13.0
* @param[in] scene The scene object.
* @param[out] environment The environment object to be retrieved.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
* - \ref SU_ERROR_NO_DATA if the scene does not have an environment
*/
SU_RESULT SUSceneGetEnvironment(SUSceneRef scene, SUEnvironmentRef* environment);
/**
* @brief Retrieves the number of section planes that will be activated when the scene is activated.
* @since SketchUp 2025.1, API 13.1
* @param[in] scene The scene object.
* @param[out] count The number of section planes.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is `NULL`
*/
SU_RESULT SUSceneGetNumActiveSectionPlanes(SUSceneRef scene, size_t* count);
/**
* @brief Retrieves the section planes that will be activated when the scene is activated.
* @since SketchUp 2025.1, API 13.1
* @param[in] scene The scene object.
* @param[in] len The number of section planes to retrieve.
* @param[out] active_section_planes The section planes retrieved.
* @param[out] count The number of section planes retrieved.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p active_section_planes or \p count is `NULL`
*/
SU_RESULT SUSceneGetActiveSectionPlanes(
SUSceneRef scene, size_t len, SUSectionPlaneRef active_section_planes[], size_t* count);
/**
* @brief Performs an update on the scene properties based on the current view that the use has.
*
* What properties of the Scene get updated are controlled via an integer whose bits corresponds to
* different properties. These flags can be used individually or combined using bitwise OR.
*
* @note The properties updated is determined by the AND operation of the passed in \p flags and
* the flags on the scene set by SUSceneSetFlags() or the separate `SUSceneSetUse*` setters.
*
* @since SketchUp 2025.0, API 13.0
*
* @param[in] scene The \p scene object.
* @param[in] flags The bitwise OR of \ref SUSceneFlags.
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_INVALID_ARGUMENT if \p scene is not added to a model
*
* @related SUSceneRef
*
* @see \ref SUSceneFlags
* @see SUSceneSetFlags
*
* @code
* SUScene scene = SU_INVALID;
* SUSceneCreate(&scene);
* SUSceneSetName(scene, "Example");
* SUSceneSetFlags(scene, FLAG_USE_ALL); // Set the properties to remember.
* SUModelAddScenes(model, 1, &scene);
* // ...
* SUSceneUpdate(scene, FLAG_USE_CAMERA | FLAG_USE_SECTION_PLANES);
* @endcode
*/
SU_RESULT SUSceneUpdate(SUSceneRef scene, unsigned int flags);
#ifdef __cplusplus

@@ -856,0 +1036,0 @@ }

@@ -1,2 +0,2 @@

// Copyright 2015 Trimble Inc. All Rights Reserved.
// Copyright 2015-2025 Trimble Inc. All Rights Reserved.

@@ -36,5 +36,5 @@ /**

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
- \ref SU_ERROR_SERIALIZATION if style couldn't be created from the file at path
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p name is NULL
- \ref SU_ERROR_SERIALIZATION if \p style couldn't be created from the file at \p path
- \ref SU_ERROR_DUPLICATE if the name corresponds to an existing style

@@ -52,4 +52,4 @@ */

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is NULL
*/

@@ -68,4 +68,4 @@ SU_RESULT SUStylesGetNumStyles(SUStylesRef styles, size_t* count);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style_array or count is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style_array or \p count is NULL
*/

@@ -83,4 +83,4 @@ SU_RESULT SUStylesGetStyles(

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
*/

@@ -97,4 +97,4 @@ SU_RESULT SUStylesGetActiveStyle(SUStylesRef styles, SUStyleRef* style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
*/

@@ -112,5 +112,5 @@ SU_RESULT SUStylesGetSelectedStyle(SUStylesRef styles, SUStyleRef* style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if guid is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p guid is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
*/

@@ -128,6 +128,6 @@ SU_RESULT SUStylesGetStyleByGuid(SUStylesRef styles, const char* guid, SUStyleRef* style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if path is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style is NULL
- \ref SU_ERROR_NO_DATA if no style in styles matches the style at path.
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p path is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
- \ref SU_ERROR_NO_DATA if no style in \p styles matches the \p style at \p path.
*/

@@ -144,4 +144,4 @@ SU_RESULT SUStylesGetStyleByPath(SUStylesRef styles, const char* path, SUStyleRef* style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if changed is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p changed is NULL
*/

@@ -159,3 +159,3 @@ SU_RESULT SUStylesGetActiveStyleChanged(SUStylesRef styles, bool* changed);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if any of styles, style, or scene are not
- \ref SU_ERROR_INVALID_INPUT if any of \p styles, \p style, or \p scene are not
valid objects

@@ -167,2 +167,3 @@ */

@brief Sets the selected style.
@bug Prior to SketchUp 2025.0 setting the selected style to the active style would crash.
@since SketchUp 2019.2, API 7.1

@@ -174,3 +175,4 @@ @param[in] styles The styles object.

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles or style are not valid objects
- \ref SU_ERROR_INVALID_INPUT if \p styles or \p style are not valid objects
- \ref SU_ERROR_INVALID_ARGUMENT if \p style is the active style
*/

@@ -190,6 +192,6 @@ SU_RESULT SUStylesSetSelectedStyle(SUStylesRef styles, SUStyleRef style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if style is NULL
- \ref SU_ERROR_INVALID_ARGUMENT if style is not within styles
- \ref SU_ERROR_OUT_OF_RANGE if the style is the last style in the manager
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p style is NULL
- \ref SU_ERROR_INVALID_ARGUMENT if \p style is not within styles
- \ref SU_ERROR_OUT_OF_RANGE if the \p style is the last style in the manager
*/

@@ -196,0 +198,0 @@ SU_RESULT SUStylesRemoveStyle(SUStylesRef styles, SUStyleRef* style);

@@ -158,3 +158,5 @@ // Copyright 2016 Trimble Inc. All Rights Reserved.

/**
@brief Retrieves the font from the text object
@brief Retrieves the font from the text object.
@note The returned font reference may become invalid if another font is
assigned to this text object later.
@since SketchUp 2018, API 6.0

@@ -278,8 +280,10 @@ @param[in] text The text object.

/**
@brief Retrieves the point associated with the text object. The given instance
path object either must have been constructed using one of the
SUInstancePathCreate* functions or it will be generated on the fly if it
is invalid. It must be released using SUInstancePathRelease() when it
is no longer needed.
@brief Retrieves the point associated with the text object.
The given instance path object either must have been constructed using one of the
+SUInstancePathCreate*+ functions or it will be generated on the fly if it
is invalid. It must be released using SUInstancePathRelease() when it is no longer needed.
@since SketchUp 2018, API 6.0
@param[in] text The text object.

@@ -289,2 +293,6 @@ @param[out] point The point retrieved.

@related SUTextRef
@see SUInstancePathCreate
@see SUInstancePathCreateCopy
@return

@@ -291,0 +299,0 @@ - \ref SU_ERROR_NONE on success

@@ -127,3 +127,3 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

@brief Retrieves the pixel width, height, and scale factors of the texture.
The s_scale and t_scale values are useful when a face doesn't have a
@note The s_scale and t_scale values are useful when a face doesn't have a
material applied directly, but instead inherit from a parent group or

@@ -133,2 +133,5 @@ component instance. Then you want use these values to multiply the

If the material is applied directly then this would not be needed.
@note For PBR textures (metallic, roughness, normal, and ambient occlusion)
the s_scale and t_scale values are only used when the PBR material
doesn't have a base texture.
@param[in] texture The texture object whose dimensions are retrieved.

@@ -152,2 +155,21 @@ @param[out] width The width in pixels.

/**
@brief Sets the scale factors of the texture.
@note For PBR textures (metallic, roughness, normal, and ambient occlusion)
the \p s_scale and \p t_scale values are only used when the PBR material
doesn't have a base texture.
@since SketchUp 2025.0, API 13.0
\param texture The texture object whose dimensions are set.
\param s_scale The s coordinate scale factor to map a pixel into model
coordinates.
\param t_scale The t coordinate scale factor to map a pixel into model
coordinates.
@related SUTextureRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p texture is an invalid object
- \ref SU_ERROR_OUT_OF_RANGE if \p s_scale, or \p t_scale is smaller or equal to 0
*/
SU_RESULT SUTextureSetDimensions(SUTextureRef texture, double s_scale, double t_scale);
/**
@brief Returns the total size and bits-per-pixel value of a texture's image

@@ -154,0 +176,0 @@ data. This function is useful to determine the size of the buffer

@@ -59,3 +59,3 @@ // Copyright 2013 Trimble Inc. All Rights Reserved

\ref SUTypedValueCreate().
@param[in] typed_value The typed value object.
@param[in,out] typed_value The typed value object.
@related SUTypedValueRef

@@ -96,4 +96,4 @@ @return

@brief Sets the byte value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] byte_value The byte value that is assigned.
@param[in,out] typed_value The typed value object.
@param[in] byte_value The byte value that is assigned.
@related SUTypedValueRef

@@ -121,4 +121,4 @@ @return

@brief Sets the int16 value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] int16_value The int16 value to set.
@param[in,out] typed_value The typed value object.
@param[in] int16_value The int16 value to set.
@related SUTypedValueRef

@@ -146,4 +146,4 @@ @return

@brief Sets the int32 value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] int32_value The int32 value to set.
@param[in,out] typed_value The typed value object.
@param[in] int32_value The int32 value to set.
@related SUTypedValueRef

@@ -171,4 +171,4 @@ @return

@brief Sets the float value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] float_value The float value to set.
@param[in,out] typed_value The typed value object.
@param[in] float_value The float value to set.
@related SUTypedValueRef

@@ -196,4 +196,4 @@ @return

@brief Sets the double value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] double_value The double value to set.
@param[in,out] typed_value The typed value object.
@param[in] double_value The double value to set.
@related SUTypedValueRef

@@ -221,4 +221,4 @@ @return

@brief Sets the boolean value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] bool_value The boolean value to set.
@param[in,out] typed_value The typed value object.
@param[in] bool_value The boolean value to set.
@related SUTypedValueRef

@@ -246,4 +246,4 @@ @return

@brief Sets the color value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] color The color value to set.
@param[in,out] typed_value The typed value object.
@param[in] color The color value to set.
@related SUTypedValueRef

@@ -274,4 +274,4 @@ @return

seconds since January 1, 1970.
@param[in] typed_value The typed value object.
@param[in] time_value The time value that is set.
@param[in,out] typed_value The typed value object.
@param[in] time_value The time value that is set.
@related SUTypedValueRef

@@ -301,4 +301,4 @@ @return

@brief Sets the string value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] string_value The string value to set. Assumed to be UTF-8 encoded.
@param[in,out] typed_value The typed value object.
@param[in] string_value The string value to set. Assumed to be UTF-8 encoded.
@related SUTypedValueRef

@@ -327,4 +327,4 @@ @return

@brief Sets the 3-element vector value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] vector3d_value The 3-element vector value to set.
@param[in,out] typed_value The typed value object.
@param[in] vector3d_value The 3-element vector value to set.
@related SUTypedValueRef

@@ -339,4 +339,4 @@ @return

@brief Sets the 3D unit vector value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] vector3d_value The 3 vector components. Magnitude is ignored.
@param[in,out] typed_value The typed value object.
@param[in] vector3d_value The 3 vector components. Magnitude is ignored.
@related SUTypedValueRef

@@ -371,5 +371,5 @@ @return

elements of the given array are copied to the type value object.
@param[in] typed_value The typed value object.
@param[in] len The number of typed value objects to set.
@param[in] values The array of typed value objects to set.
@param[in,out] typed_value The typed value object.
@param[in] len The number of typed value objects to set.
@param[in] values The array of typed value objects to set.
@related SUTypedValueRef

@@ -376,0 +376,0 @@ @return

@@ -62,4 +62,4 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

@brief Sets the position of a vertex object.
@param[in] vertex The vertex object.
@param[in] position The value used to set the vertex position.
@param[in,out] vertex The vertex object.
@param[in] position The value used to set the vertex position.
@related SUVertexRef

@@ -66,0 +66,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2015-2020 Trimble Inc., All rights reserved.
// Copyright 2015-2024 Trimble Inc., All rights reserved.
// This file is intended for public distribution.

@@ -83,2 +83,4 @@

#include <SketchUpAPI/model/entity_list_iterator.h>
#include <SketchUpAPI/model/environment.h>
#include <SketchUpAPI/model/environments.h>
#include <SketchUpAPI/model/face.h>

@@ -115,2 +117,3 @@ #include <SketchUpAPI/model/font.h>

#include <SketchUpAPI/model/shadow_info.h>
#include <SketchUpAPI/model/snap.h>
#include <SketchUpAPI/model/style.h>

@@ -117,0 +120,0 @@ #include <SketchUpAPI/model/styles.h>

@@ -42,3 +42,3 @@ // Copyright 2013 Trimble Inc., All rights reserved.

Constructs a string and initializes it to a copy of the provided string,
which is provided by a `'\0'` (`NULL`) terminated array of 8-bit characters.
which is provided by a <tt>'\0'</tt> (<tt>NULL</tt>) terminated array of 8-bit characters.
This string is interpreted as UTF-8.

@@ -134,4 +134,4 @@ You must use SUStringRelease() on this string object to free its memory.

@param[in] string_ref The string object.
@param[in] char_array The character array to be set.
@param[in,out] string_ref The string object.
@param[in] char_array The character array to be set.
@related SUStringRef

@@ -148,4 +148,4 @@ @return

@param[in] string_ref The string object.
@param[in] char_array The character array to be set.
@param[in,out] string_ref The string object.
@param[in] char_array The character array to be set.
@related SUStringRef

@@ -203,3 +203,3 @@ @return

@since SketchUp 2017, API 5.0
@param[in] string_ref The string object.
@param[in,out] string_ref The string object.
@related SUStringRef

@@ -215,3 +215,3 @@ @return

@since SketchUp 2017, API 5.0
@param[in] string_ref The string object.
@param[in,out] string_ref The string object.
@related SUStringRef

@@ -218,0 +218,0 @@ @return

@@ -6,3 +6,3 @@ <?xml version="1.0" encoding="UTF-8"?>

<key>BuildMachineOSBuild</key>
<string>23A344</string>
<string>24G90</string>
<key>CFBundleDevelopmentRegion</key>

@@ -35,18 +35,18 @@ <string>English</string>

<key>DTPlatformBuild</key>
<string></string>
<string>24C94</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>14.4</string>
<string>15.2</string>
<key>DTSDKBuild</key>
<string>23E208</string>
<string>24C94</string>
<key>DTSDKName</key>
<string>macosx14.4</string>
<string>macosx15.2</string>
<key>DTXcode</key>
<string>1530</string>
<string>1620</string>
<key>DTXcodeBuild</key>
<string>15E204a</string>
<string>16C5032a</string>
<key>LSMinimumSystemVersion</key>
<string>11.7</string>
<string>13.0</string>
</dict>
</plist>

@@ -1,2 +0,2 @@

// Copyright 2014-2022 Trimble Inc. All Rights Reserved.
// Copyright 2014-2025 Trimble Inc. All Rights Reserved.

@@ -42,7 +42,8 @@ #ifndef LAYOUT_APPLICATION_APPLICATION_H_

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if app is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if document is NULL
- \ref SU_ERROR_INVALID_INPUT if \p app is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p document is NULL
*/
LO_RESULT LOApplicationGetActiveDocument(LOApplicationRef app, LODocumentRef* document);
/**

@@ -55,4 +56,4 @@ @brief Gets the major/minor version number as a string.

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if app is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if version is NULL
- \ref SU_ERROR_INVALID_INPUT if \p app is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p version is NULL
*/

@@ -68,4 +69,4 @@ LO_RESULT LOApplicationGetVersion(LOApplicationRef app, SUStringRef* version);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if app is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if version is NULL
- \ref SU_ERROR_INVALID_INPUT if \p app is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p version is NULL
*/

@@ -81,4 +82,4 @@ LO_RESULT LOApplicationGetVersionNumber(LOApplicationRef app, unsigned int* version);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if app is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if is_online is NULL
- \ref SU_ERROR_INVALID_INPUT if \p app is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p is_online is NULL
*/

@@ -95,5 +96,5 @@ LO_RESULT LOApplicationGetOnline(LOApplicationRef app, bool* is_online);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if app is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if file_path is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if document is NULL
- \ref SU_ERROR_INVALID_INPUT if \p app is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p document is NULL
- \ref SU_ERROR_SERIALIZATION if the document fails to open

@@ -104,3 +105,2 @@ */

/**

@@ -112,3 +112,3 @@ @brief Quits the application.

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if app is not a valid object
- \ref SU_ERROR_INVALID_INPUT if \p app is not a valid object
*/

@@ -115,0 +115,0 @@ LO_RESULT LOApplicationQuit(LOApplicationRef app);

@@ -1,2 +0,2 @@

// Copyright 2015-2022 Trimble Inc. All rights reserved.
// Copyright 2015-2024 Trimble Inc. All rights reserved.
// This file is intended for public distribution.

@@ -3,0 +3,0 @@

@@ -66,3 +66,3 @@ // Copyright 2015 Trimble Navigation Ltd. All rights reserved.

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if dictionary or value is an invalid object
- \ref SU_ERROR_INVALID_INPUT if dictionary is an invalid object
- \ref SU_ERROR_NULL_POINTER_INPUT if key is NULL

@@ -69,0 +69,0 @@ */

@@ -860,2 +860,75 @@ // Copyright 2015-2023 Trimble Inc. All rights reserved.

LODocumentRef document, LOSketchUpModelRenderMode render_mode);
/**
@brief Gets a copy of an attribute dictionary with the given name from a document.
@since LayOut 2026, API 11.0
@param[in] document The document object.
@param[in] dictionary_name The name of the attribute dictionary object to retrieve.
@param[out] dictionary The attribute dictionary object.
@related LODocumentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p document does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p dictionary is NULL
- \ref SU_ERROR_NO_DATA if \p document does not have an attribute dictionary with the given name
*/
LO_RESULT LODocumentCreateAttributeDictionaryCopy(
LODocumentRef document, const char* dictionary_name, LODictionaryRef* dictionary);
/**
@brief Sets an attribute to a given dictionary belonging to a document.
@since LayOut 2026, API 11.0
@param[in] document The document object.
@param[in] dictionary_name The name of the attribute dictionary object being added to.
@param[in] key The key to use when adding to the attribute dictionary.
@param[in] value_in The value to be added to the attribute dictionary.
@related LODocumentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p document does not refer to a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p value_in contains no data
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name or \p key are NULL
- \ref SU_ERROR_UNSUPPORTED if \p dictionary_name is empty
*/
LO_RESULT LODocumentSetAttribute(
LODocumentRef document, const char* dictionary_name, const char* key, LOTypedValueRef value_in);
/**
@brief Gets an attribute from a given dictionary belonging to a document.
@since LayOut 2026, API 11.0
@param[in] document The document object.
@param[in] dictionary_name The name of the attribute dictionary object to retrieve the value from.
@param[in] key The key to use when adding to the attribute dictionary.
@param[out] value_out The value retrieved from the attribute dictionary.
@related LODocumentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p document does not refer to a valid object
- \ref SU_ERROR_INVALID_OUTPUT if \p value_out does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name or \p key are NULL
- \ref SU_ERROR_NO_DATA if no attribute dictionary exists with the given name, or if the attribute
dictionary does not contain the given key
*/
LO_RESULT LODocumentGetAttribute(
LODocumentRef document, const char* dictionary_name, const char* key,
LOTypedValueRef value_out);
/**
@brief Removes an attribute from a given dictionary belonging to a Document. If key is nullptr, then
the entire dictionary will be removed from the Document.
@since LayOut 2026, API 11.0
@param[in] document The document object.
@param[in] dictionary_name The name of the attribute dictionary object to remove.
@param[in] key The key to remove from the attribute dictionary.
@related LODocumentRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p document does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name is NULL
*/
LO_RESULT LODocumentDeleteAttribute(
LODocumentRef document, const char* dictionary_name, const char* key);
#ifdef __cplusplus

@@ -862,0 +935,0 @@ } // extern "C" {

@@ -1,2 +0,2 @@

// Copyright 2015-2023 Trimble Inc. All rights reserved.
// Copyright 2015-2024 Trimble Inc. All rights reserved.
// This file is intended for public distribution.

@@ -27,3 +27,4 @@

\ref LODocumentExportToPDF or \ref LODocumentExportToImageSet.
The value stored with this key takes precedent over `"start_page"` and `"end_page"`.
The value stored with this key takes precedent over `"start_page"`
and `"end_page"`.
@since LayOut 2024.0, API 9.0

@@ -34,2 +35,20 @@ */

/**
@brief Dictionary key to use when specifying the page range type option for
\ref LODocumentExportToPDF or \ref LODocumentExportToImageSet.
If this value is set to \ref LOExportPageRangeType_All, then
`"start_page"`, `"end_page"`, and `"page_range"` are ignored. If
not set, or set to \ref LOExportPageRangeType_Range, then those
values will be used as outlined.
@since LayOut 2025.0, API 10.0
*/
const char* const LOExportOption_PageRangeType = "page_range_type";
/**
@brief Dictionary values to use for the \ref LOExportOption_PageRangeType key.
@since LayOut 2025.0, API 10.0
*/
const int LOExportPageRangeType_All = 0;
const int LOExportPageRangeType_Range = 1;
/**
@brief Dictionary key to use when specifying the output resolution option for

@@ -36,0 +55,0 @@ \ref LODocumentExportToPDF.

@@ -327,2 +327,74 @@ // Copyright 2015-2022 Trimble Inc. All rights reserved.

/**
@brief Gets a copy of an attribute dictionary with the given name from an entity.
@since LayOut 2026, API 11.0
@param[in] entity The entity object.
@param[in] dictionary_name The name of the attribute dictionary object to retrieve.
@param[out] dictionary The attribute dictionary object.
@related LOEntityRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p entity does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p dictionary is NULL
- \ref SU_ERROR_NO_DATA if \p entity does not have an attribute dictionary with the given name
- \ref SU_ERROR_UNSUPPORTED if \p entity does not support attribute dictionaries
*/
LO_RESULT LOEntityCreateAttributeDictionaryCopy(
LOEntityRef entity, const char* dictionary_name, LODictionaryRef* dictionary);
/**
@brief Sets an attribute dictionary to a given dictionary belonging to an entity.
@since LayOut 2026, API 11.0
@param[in] entity The entity object.
@param[in] dictionary_name The name of the attribute dictionary object being added to.
@param[in] key The key to use when adding to the attribute dictionary.
@param[in] value_in The value to be added to the attribute dictionary.
@related LOEntityRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p entity does not refer to a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p value_in contains no data
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name or \p key are NULL
- \ref SU_ERROR_UNSUPPORTED if \p entity does not support attribute dictionaries or
\p dictionary_name or \p key are empty
*/
LO_RESULT LOEntitySetAttribute(
LOEntityRef entity, const char* dictionary_name, const char* key, LOTypedValueRef value_in);
/**
@brief Gets an attribute from a given dictionary belonging to an entity.
@since LayOut 2026, API 11.0
@param[in] entity The entity object.
@param[in] dictionary_name The name of the attribute dictionary object to retrieve the value from.
@param[in] key The key to use when adding to the attribute dictionary.
@param[out] value_out The value retrieved from the attribute dictionary.
@related LOEntityRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p document does not refer to a valid object
- \ref SU_ERROR_INVALID_OUTPUT if \p value_out does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name or \p key are NULL
- \ref SU_ERROR_NO_DATA if no attribute dictionary exists with the given name, or if the attribute
dictionary does not contain the given key
*/
LO_RESULT LOEntityGetAttribute(
LOEntityRef entity, const char* dictionary_name, const char* key, LOTypedValueRef value_out);
/**
@brief Removes an attribute from a given dictionary belonging to an Entity. If key is nullptr, then
the entire dictionary will be removed from the Entity.
@since LayOut 2026, API 11.0
@param[in] entity The entity object.
@param[in] dictionary_name The name of the attribute dictionary object to remove.
@param[in] key The key to remove from the attribute dictionary.
@related LOEntityRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p entity does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name or \p key are NULL
- \ref SU_ERROR_UNSUPPORTED if \p entity does not support attribute dictionaries
*/
LO_RESULT LOEntityDeleteAttribute(LOEntityRef entity, const char* dictionary_name, const char* key);
#ifdef __cplusplus

@@ -329,0 +401,0 @@ } // end extern "C"

@@ -1,2 +0,2 @@

// Copyright 2015 Trimble Navigation Ltd. All rights reserved.
// Copyright 2015-2025 Trimble Inc. All rights reserved.
// This file is intended for public distribution.

@@ -187,2 +187,3 @@

/**

@@ -189,0 +190,0 @@ @brief Returns the scale units for a group.

@@ -47,2 +47,14 @@ // Copyright 2015 Trimble Navigation Ltd. All rights reserved.

/**
@enum LOLinearDimensionAlignment
@brief Defines how the dimension line should align on the page when creating a new linear dimension.
@since LayOut 2026.0, API 11.0
*/
typedef enum {
LOLinearDimensionAlignment_Aligned = 0, /// Align the dimension line with the connection points.
LOLinearDimensionAlignment_Vertical, /// Align the dimension line vertically on the paper.
LOLinearDimensionAlignment_Horizontal, /// Align the dimension line horizontally on the paper.
LONumLinearDimensionAlignments
} LOLinearDimensionAlignment;
/**
@brief Creates a new disconnected linear dimension object.

@@ -52,4 +64,5 @@ @param[out] dimension The linear dimension object

@param[in] end_point Where the dimension should end
@param[in] height Distance from the start and end points to the dimension
line
@param[in] height Distance from the start and end points to the dimension line
@note This is equivalent to using LOLinearDimensionCreateWithAlignment with
\ref LOLinearDimensionAlignment_Aligned.
@return

@@ -67,2 +80,26 @@ - \ref SU_ERROR_NONE on success

/**
@brief Creates a new disconnected linear dimension object with a specific dimension line alignment.
@param[out] dimension The linear dimension object
@param[in] start_point Where the dimension should start
@param[in] end_point Where the dimension should end
@param[in] height Distance from the start point to the dimension line. Negative height will
create a dimension line to the left or down from the connection points
@param[in] alignment Dimension line alignment type. The dimension line can be horizontal,
vertical, or aligned with the connection points.
@since LayOut 2026.0, API 11.0
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p dimension is NULL
- \ref SU_ERROR_OVERWRITE_VALID if *dimension already refers to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p start_point is NULL
- \ref SU_ERROR_NULL_POINTER_INPUT if \p end_point is NULL
- \ref SU_ERROR_OUT_OF_RANGE if \p alignment is not a valid value
- \ref SU_ERROR_INVALID_ARGUMENT if the combination of start_point, end_point, and alignment can't
create a valid dimension.
*/
LO_RESULT LOLinearDimensionCreateWithAlignment(
LOLinearDimensionRef* dimension, const LOPoint2D* start_point, const LOPoint2D* end_point,
double height, LOLinearDimensionAlignment alignment);
/**
@brief Adds a reference to a linear dimension object.

@@ -217,2 +254,17 @@ @param[in] dimension The linear dimension object.

/**
@brief Gets whether the linear dimension's leader line is visible.
@note This will return false if the leader line type is set to hidden or the leader line's
length is zero.
@since LayOut 2026.0, API 11.0
@param[in] dimension The linear dimension object.
@param[out] leader_line_visible Whether the dimension's leader line is visible.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p dimension does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p leader_line_visible is NULL
*/
LO_RESULT LOLinearDimensionGetLeaderLineVisible(
LOLinearDimensionRef dimension, bool* leader_line_visible);
/**
@brief Gets whether or not the scale for the dimension length text is set

@@ -219,0 +271,0 @@ automatically.

@@ -257,2 +257,72 @@ // Copyright 2015 Trimble Navigation Ltd. All rights reserved.

/**
@brief Gets a copy of an attribute dictionary with the given name from a page.
@since LayOut 2026, API 11.0
@param[in] page The page object.
@param[in] dictionary_name The name of the attribute dictionary object to retrieve.
@param[out] dictionary The attribute dictionary object.
@related LOPageRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p page does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if dictionary is NULL
- \ref SU_ERROR_NO_DATA if \p page does not have an attribute dictionary with the given name
*/
LO_RESULT LOPageCreateAttributeDictionaryCopy(
LOPageRef page, const char* dictionary_name, LODictionaryRef* dictionary);
/**
@brief Sets an attribute to a given dictionary belonging to a page.
@since LayOut 2026, API 11.0
@param[in] page The page object.
@param[in] dictionary_name The name of the attribute dictionary object being added to.
@param[in] key The key to use when adding to the attribute dictionary.
@param[in] value_in The value to be added to the attribute dictionary.
@related LOPageRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p page does not refer to a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p value_in contains no data
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name or \p key are NULL
- \ref SU_ERROR_UNSUPPORTED if \p dictionary_name is empty
*/
LO_RESULT LOPageSetAttribute(
LOPageRef page, const char* dictionary_name, const char* key, LOTypedValueRef value_in);
/**
@brief Gets an attribute from a given dictionary belonging to a page.
@since LayOut 2026, API 11.0
@param[in] page The page object.
@param[in] dictionary_name The name of the attribute dictionary object to retrieve the value from.
@param[in] key The key to use when adding to the attribute dictionary.
@param[out] value_out The value retrieved from the attribute dictionary.
@related LOPageRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p page does not refer to a valid object
- \ref SU_ERROR_INVALID_OUTPUT if \p value_out does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name or \p key are NULL
- \ref SU_ERROR_NO_DATA if no attribute dictionary exists with the given name, or if the attribute
dictionary does not contain the given key
*/
LO_RESULT LOPageGetAttribute(
LOPageRef page, const char* dictionary_name, const char* key, LOTypedValueRef value_out);
/**
@brief Removes an attribute from a given dictionary belonging to a page. If key is nullptr, then
the entire dictionary will be removed from the Page.
@since LayOut 2026, API 11.0
@param[in] page The page object.
@param[in] dictionary_name The name of the attribute dictionary object to remove.
@param[in] key The key to remove from the attribute dictionary.
@related LOPageRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p page does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p dictionary_name or \p key are NULL
*/
LO_RESULT LOPageDeleteAttribute(LOPageRef page, const char* dictionary_name, const char* key);
#ifdef __cplusplus

@@ -259,0 +329,0 @@ } // end extern "C"

@@ -120,3 +120,34 @@ // Copyright 2015-2023 Trimble Inc. All rights reserved.

/**
@brief Gets the SUModelRef representation of the SketchUp model.
@brief Applies the SketchUp model viewport's overrides on the SketchUp model retrieved by
\ref LOSketchUpModelGetModel.
@note The SketchUp model must be reset back to its default state by calling
\ref LOSketchUpModelResetViewportOverridesOnModel.
@since LayOut 2026.0, API 11.0
@param[in] model The SketchUp model object.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p model does not refer to a valid object
*/
LO_RESULT LOSketchUpModelSetViewportOverridesOnModel(LOSketchUpModelRef model);
/**
@brief Resets the SketchUp model used by this viewport back to its default state.
@note This must be done after a corresponding call to
\ref LOSketchUpModelSetViewportOverridesOnModel to ensure proper behavior of the SketchUp
model when multiple viewports exist using the same SketchUp model reference.
@since LayOut 2026.0, API 11.0
@param[in] model The SketchUp model object.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p model does not refer to a valid object
*/
LO_RESULT LOSketchUpModelResetViewportOverridesOnModel(LOSketchUpModelRef model);
/**
@brief Gets the \p SUModelRef representation of the SketchUp model.
@note This \p SUModelRef is shared by all SketchUp model viewports that use the same file
reference. To apply the SketchUp model viewport's overrides to the \p SUModelRef
call \ref LOSketchUpModelSetViewportOverridesOnModel. You must reset the SketchUp model
back to its default state by calling \ref LOSketchUpModelResetViewportOverridesOnModel
once you are done.
@since LayOut 2017, API 2.0

@@ -275,2 +306,28 @@ @param[in] model The SketchUp model object.

/**
@brief Gets a SUCameraRef representing the camera for the viewport.
@since LayOut 2026.0, API 11.0
@param[in] model The SketchUp model object.
@param[out] sucamera The camera reference object.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p model does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p sucamera is NULL
- \ref SU_ERROR_INVALID_OUTPUT if \p *sucamera does not refer to a valid object
*/
LO_RESULT LOSketchUpModelGetCamera(LOSketchUpModelRef model, SUCameraRef* sucamera);
/**
@brief Sets the camera for the viewport.
@note Setting the camera will flag the viewport as having a modified camera.
@since LayOut 2026.0, API 11.0
@param[in] model The SketchUp model object.
@param[in] sucamera The camera reference object.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p model does not refer to a valid object
- \ref SU_ERROR_INVALID_INPUT if \p sucamera does not refer to a valid object
*/
LO_RESULT LOSketchUpModelSetCamera(LOSketchUpModelRef model, SUCameraRef sucamera);
/**
@brief Gets whether the SketchUp model's shadow or fog effects have been modified.

@@ -277,0 +334,0 @@ @param[in] model The SketchUp model object.

@@ -9,2 +9,4 @@ // Copyright 2015 Trimble Navigation Ltd. All rights reserved.

#include <LayOutAPI/model/defs.h>
#include <LayOutAPI/geometry/geometry.h>
#include <SketchUpAPI/color.h>

@@ -79,2 +81,13 @@ /**

/**
@enum LOTextStrikeThrough
@brief Defines strike through styles for formatted text.
@since LayOut 2026.0, API 11.0
*/
typedef enum {
LOTextStrikeThrough_None = 0, ///< No strike through.
LOTextStrikeThrough_Single, ///< Single strike through.
LONumTextStrikeThroughs
} LOTextStrikeThrough;
/**
@enum LOTextElevation

@@ -208,5 +221,2 @@ @brief Defines super/subscript options for formatted text.

#include "entity.h"
#include <SketchUpAPI/color.h>
#ifdef __cplusplus

@@ -730,2 +740,28 @@ extern "C" {

/**
@brief Gets the text strike through type for a style.
@since LayOut 2026.0, API 11.0
@param[in] style The style object.
@param[out] strikethrough_type The type of strike through for text.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p style does not refer to a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p strikethrough_type is NULL
- \ref SU_ERROR_NO_DATA if \p style doesn't specify a value for this style
attribute
*/
LO_RESULT LOStyleGetTextStrikeThrough(LOStyleRef style, LOTextStrikeThrough* strikethrough_type);
/**
@brief Sets the text strike through type of a style.
@since LayOut 2026.0, API 11.0
@param[in] style The style object.
@param[out] strikethrough_type The type of strike through to use for text.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p style does not refer to a valid object
- \ref SU_ERROR_OUT_OF_RANGE if \p strikethrough_type is not a valid strike through type
*/
LO_RESULT LOStyleSetTextStrikeThrough(LOStyleRef style, LOTextStrikeThrough strikethrough_type);
/**
@brief Gets the text elevation type (normal, superscript, or subscript) of a

@@ -732,0 +768,0 @@ style.

@@ -51,2 +51,4 @@ // Copyright 2016 Trimble Navigation Ltd., All rights reserved.

LOTableRef* table, const LOAxisAlignedRect2D* bounds, size_t rows, size_t columns);
/**

@@ -53,0 +55,0 @@ @brief Gets a table from a given entity.

@@ -30,2 +30,4 @@ // Copyright 2015 Trimble Navigation Ltd. All rights reserved.

LOTypedValueType_String,
// @since LayOut 2026.0, API 11.0
LOTypedValueType_Dictionary,
LONumTypedValueTypes

@@ -138,3 +140,3 @@ } LOTypedValueType;

- \ref SU_ERROR_INVALID_INPUT if typed_value does not refer to a valid object
- \ref SU_ERROR_NO_DATA if the typed value does not contain a string.
- \ref SU_ERROR_NO_DATA if the typed value does not contain a string
- \ref SU_ERROR_NULL_POINTER_OUTPUT if out_string is NULL

@@ -150,2 +152,3 @@ - \ref SU_ERROR_INVALID_OUTPUT if out_string does not refer to a valid object

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if string is NULL

@@ -155,2 +158,23 @@ */

/**
@brief Gets a dictionary from the typed value object.
@since LayOut 2026.0, API 11.0
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if typed_value does not refer to a valid object
- \ref SU_ERROR_NO_DATA if the typed value does not contain a dictionary
- \ref SU_ERROR_NULL_POINTER_OUTPUT if out_string is NULL
- \ref SU_ERROR_INVALID_OUTPUT if out_string does not refer to a valid object
*/
LO_RESULT LOTypedValueGetDictionary(LOTypedValueRef typed_value, LODictionaryRef* out_dictionary);
/**
@brief Sets the value of typed_value to the given dictionary.
@since LayOut 2026.0, API 11.0
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
*/
LO_RESULT LOTypedValueSetDictionary(LOTypedValueRef typed_value, LODictionaryRef dictionary);
#ifdef __cplusplus

@@ -157,0 +181,0 @@ } // end extern "C"

@@ -32,4 +32,4 @@ // Copyright 2023 Trimble Inc. All Rights Reserved.

- \ref SU_ERROR_DUPLICATE if the given SUOverlayCreateInfo::id already exists in the model
@relatedalso SUModelRef
@relatedalso SUOverlayRef
@related SUModelRef
@see SUOverlayRef
*/

@@ -49,4 +49,4 @@ SU_RESULT SUModelCreateOverlay(

- \ref SU_ERROR_NO_DATA if \p overlay could be found in the model
@relatedalso SUModelRef
@relatedalso SUOverlayRef
@related SUModelRef
@see SUOverlayRef
*/

@@ -53,0 +53,0 @@ SU_RESULT SUModelReleaseOverlay(SUModelRef model, SUOverlayRef* overlay);

@@ -61,14 +61,21 @@ // Copyright 2023 Trimble Inc. All Rights Reserved.

double far_clipping_distance; ///< Distance to far clipping plane from the camera
double projection_matrix[16]; ///< Projection Matrix.
double view_matrix[16]; ///< View Matrix
double projection_matrix[16]; ///< Projection Matrix, stored in row major order.
double view_matrix[16]; ///< View Matrix, stored in row major order.
double viewport_width; ///< Viewport width
double viewport_height; ///< Viewport height
double fov; ///< Field of view of the perspective camera (in degrees). Valid only when
///< is_perspective is true.
/**
* Field of view of the perspective camera (in degrees). Valid only when
* is_perspective is true.
*/
double fov;
double height; ///< Parallel projection frustum height. Valid only when is_perspective is false.
bool is_perspective; ///< Whether the camera is perspective or orthographic.
void* reserved; ///< Reserved for internal use. This will be set to NULL by SketchUp and should
///< not be modified.
/**
* Reserved for internal use. This will be set to NULL by SketchUp and should
* not be modified.
*/
void* reserved;
};

@@ -130,2 +137,3 @@

rendering.
@attention color and depth buffers must be valid until the end_frame callback is called.
@related SUOverlayRef

@@ -142,5 +150,7 @@ */

/// Color buffer info. ptr points to a uint8_t buffer with 4 channels.
/// The buffer pointed to by color must be valid until the end_frame callback is called.
struct SUDrawFrameMemoryBuffer color;
/// Depth buffer info. ptr points to a float buffer.
/// The buffer pointed to by color must be valid until the end_frame callback is called.
struct SUDrawFrameMemoryBuffer depth;

@@ -160,2 +170,4 @@

@brief Signature for SUOverlayCreateInfo::end_frame callback
@attention SUOverlayDrawFrameInfo::color and SUOverlayDrawFrameInfo::depth buffers must be valid
until the end_frame callback is called.
@related SUOverlayRef

@@ -231,2 +243,4 @@ */

/// needed.
/// SUOverlayDrawFrameInfo::color and SUOverlayDrawFrameInfo::depth buffers must be valid until
/// the end_frame callback is called.
SUOverlayEndFrameFuncT end_frame;

@@ -233,0 +247,0 @@ };

@@ -1,2 +0,2 @@

// Copyright 2015 Trimble Inc., All rights reserved.
// Copyright 2015-2024 Trimble Inc. All rights reserved.
// This file is intended for public distribution.

@@ -93,9 +93,5 @@

#if defined __APPLE__
#if defined __APPLE__ && !defined GSLAPI_NO_EXPORTS
#undef SU_EXPORT
#ifdef GSLAPI_API_EXPORTS
#define SU_EXPORT __attribute__((visibility("default")))
#else
#define SU_EXPORT __attribute__((visibility("hidden")))
#endif
#define SU_EXPORT __attribute__((visibility("default")))
#endif // #if defined __APPLE__

@@ -108,4 +104,2 @@

// #define SU_RESULT SU_EXPORT enum SUResult
#endif // DOXYGEN_SHOULD_SKIP_THIS

@@ -163,2 +157,8 @@

#ifndef __cplusplus
// C compilers need this header for the bool type.
// This header maps bool to C99's _Bool type.
#include <stdbool.h>
#endif
/**

@@ -165,0 +165,0 @@ @brief This macro is used to indicate if functions are intended to be

@@ -45,3 +45,11 @@ // Copyright 2014 Trimble Inc., All rights reserved.

/**
@brief Acquires a license for a given extension.
@brief Gets a license for a given extension.
Starting in SketchUp 2025.0 (API 13.0), this function automatically tries to fetch a license from
Extension Warehouse if the extension doesn't have a license on the current device. This only works
if the user is signed in. In earlier SketchUp versions, the user has to go to Extension Manager,
expand the extension in question and press Update License if the license is missing. (For
performance reasons this automatic fetching is skipped during SketchUp startup. Make sure to do a
license check when the user interacts with the extension).
@param[in] extension_id The Extension Warehouse UUID for the extension.

@@ -48,0 +56,0 @@ @param[out] out_license the licensing retrieved.

@@ -21,3 +21,3 @@ // Copyright 2013 Trimble Inc., All rights reserved.

@struct SUPoint2D
@brief Represents a point in 2-dimensional space.
@brief Represents a point in 2-dimensional space. The coordinates are represented in inches.
*/

@@ -31,3 +31,3 @@ struct SUPoint2D {

@struct SUVector2D
@brief Represents a vector in 2-dimensional space.
@brief Represents a vector in 2-dimensional space. The magnitudes are represented in inches.
*/

@@ -41,3 +41,3 @@ struct SUVector2D {

@struct SUPoint3D
@brief Represents a point in 3-dimensional space.
@brief Represents a point in 3-dimensional space. The coordinates are represented in inches.
*/

@@ -52,3 +52,3 @@ struct SUPoint3D {

@struct SUVector3D
@brief Represents a vector in 3-dimensional space.
@brief Represents a vector in 3-dimensional space. The magnitudes are represented in inches.
*/

@@ -77,3 +77,4 @@ struct SUVector3D {

@brief Represents a 3D axis-aligned bounding box represented by the extreme
diagonal corner points with minimum and maximum x,y,z coordinates.
diagonal corner points with minimum and maximum x,y,z coordinates. The coordinates of the
points are in inches.
*/

@@ -90,3 +91,3 @@ struct SUBoundingBox3D {

@brief Represents a 2D rectangle that is aligned with the X and Y axis of the
coordinate system.
coordinate system. The coordinates of the points of the rectangle are in inches.
*/

@@ -100,3 +101,4 @@ struct SUAxisAlignedRect2D {

@struct SURay3D
@brief Represents a 3D ray defined by a point and normal vector.
@brief Represents a 3D ray defined by a point and normal vector. The coordinates of the point are
represented in inches.
@since SketchUp 2018, API 6.0

@@ -103,0 +105,0 @@ */

@@ -65,7 +65,7 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

/**
@brief Gets the distance between two point objects.
@brief Gets the distance between two point objects, in inches.
@since SketchUp 2017, API 5.0
@param[in] point1 The first point object.
@param[in] point2 The second point object.
@param[out] distance The distance between the two points.
@param[out] distance The distance between the two points, in inches.
@related SUPoint2D

@@ -72,0 +72,0 @@ @return

@@ -66,7 +66,7 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

/**
@brief Gets the distance between two point objects.
@brief Gets the distance between two point objects, in inches.
@since SketchUp 2018 M0, API 6.0
@param[in] point1 The first point object.
@param[in] point2 The second point object.
@param[out] distance The distance between the two points.
@param[out] distance The distance between the two points, in inches.
@related SUPoint3D

@@ -73,0 +73,0 @@ @return

@@ -65,3 +65,3 @@ // Copyright 2017 Trimble Inc., All rights reserved.

@param[in] point The point specifying the translation component of the
transformation.
transformation. The coordinates of the point are in inches.
@param[in] scale The scale value for the transformation.

@@ -82,3 +82,3 @@ @related SUTransformation2D

@param[in] point The point specifying the translation component of the
transformation.
transformation. The coordinates of the point should be expressed in inches.
@param[in] x_scale The x-axis scale value for the transformation.

@@ -101,3 +101,3 @@ @param[in] y_scale The y-axis scale value for the transformation.

@param[in] point The point specifying the translation component of the
transformation.
transformation. The coordinates of the point should be expressed in inches.
@param[in] angle The rotation in radians for the transformation.

@@ -104,0 +104,0 @@ @related SUTransformation2D

@@ -124,3 +124,3 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

@since SketchUp 2017, API 5.0
@param[in] vector The vector object.
@param[in,out] vector The vector object.
@related SUVector2D

@@ -177,6 +177,6 @@ @return

/**
@brief Gets the length of a vector.
@brief Gets the length of a vector, in inches.
@since SketchUp 2017, API 5.0
@param[in] vector The vector object.
@param[out] length The length of the vector.
@param[out] length The length of the vector, in inches.
@related SUVector2D

@@ -191,6 +191,6 @@ @return

/**
@brief Sets the length of a vector.
@brief Sets the length of a vector, in inches.
@since SketchUp 2017, API 5.0
@param[in,out] vector The vector object.
@param[in] length The new length the vector should be.
@param[in] length The new length the vector should be, in inches.
@related SUVector2D

@@ -197,0 +197,0 @@ @return

@@ -190,6 +190,6 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

/**
@brief Gets the length of a vector.
@brief Gets the length of a vector, in inches.
@since SketchUp 2018, API 6.0
@param[in] vector The vector object.
@param[out] length The length of the vector.
@param[out] length The length of the vector, in inches.
@related SUVector3D

@@ -204,6 +204,6 @@ @return

/**
@brief Sets the length of a vector.
@brief Sets the length of a vector, in inches.
@since SketchUp 2018, API 6.0
@param[in,out] vector The vector object.
@param[in] length The new length the vector should be.
@param[in] length The new length the vector should be, in inches.
@related SUVector3D

@@ -210,0 +210,0 @@ @return

@@ -21,3 +21,3 @@ // Copyright 2012-2020 Trimble, Inc. All Rights Reserved.

/** Return type of GetImporterBehavior(). */
/** @brief Return type of GetImporterBehavior(). */
enum SketchUpModelImporterBehavior {

@@ -127,3 +127,3 @@ IMPORT_MODEL_AT_ORIGIN = 0, ///< Preserves coordinates of the imported

ShowOptionsDialog method. The output file is then inserted into
the current model using rules defined by the GetImporterBehavior
the current model using rules defined by the GetImporterBehavior()
method.

@@ -148,11 +148,15 @@ @param[in] input The user selected input file. The file

SketchUpPluginProgressCallback* progress, void* reserved) = 0;
/**
@brief Displays a modal dialog showing an optional summary of the import
process. The default does nothing. Note that Ruby scripting often
disables this dialog.
process.
The default does nothing.
*/
virtual void ShowSummaryDialog() {
}
/**
@brief Defines the method SketchUp uses when placing the imported model.
@return The import behavior SketchUp should use when importing the model.
*/

@@ -159,0 +163,0 @@ virtual SketchUpModelImporterBehavior GetImporterBehavior() const {

@@ -95,6 +95,6 @@ // Copyright 2013-2020 Trimble Inc. All Rights Reserved

@brief Inserts a key-value pair into an attribute dictionary object.
@param[in] dictionary The attribute dictionary object.
@param[in] key The key of the key-value pair. Assumed to be UTF-8
encoded.
@param[in] value_in The value of the key-value pair.
@param[in,out] dictionary The attribute dictionary object.
@param[in] key The key of the key-value pair. Assumed to be UTF-8
encoded.
@param[in] value_in The value of the key-value pair.
@related SUAttributeDictionaryRef

@@ -101,0 +101,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2013-2020 Trimble Inc. All Rights Reserved.
// Copyright 2013-2024 Trimble Inc. All Rights Reserved.

@@ -37,20 +37,26 @@ /**

// The SUSnapToBehavior enum was originally defined incorrectly in this struct.
// This is not valid C. To correct this we conditionally include it in here for
// C compilers, while leaving the original definition inside the struct for C++
// compilers.
#ifndef __cplusplus
#include <SketchUpAPI/model/component_definition_snap_to_behavior_private.h>
#endif
/**
@struct SUComponentBehavior
@brief Describes how the component behaves in a SketchUp model, e.g. how it glues to surfaces.
@note See \ref SUSnapToBehavior for examples on how it is defined depending on
whether the code is compiled as C or C++. (Related to a bug in the original implementation).
@see SUSnapToBehavior
@see SUComponentDefinitionGetBehavior
@see SUComponentDefinitionSetBehavior
*/
struct SUComponentBehavior {
/**
@enum SUSnapToBehavior
@brief 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.
*/
enum SUSnapToBehavior {
SUSnapToBehavior_None = 0,
SUSnapToBehavior_Any,
SUSnapToBehavior_Horizontal,
SUSnapToBehavior_Vertical,
SUSnapToBehavior_Sloped
};
#ifdef __cplusplus
// See the note above for why this is included here.
#include <SketchUpAPI/model/component_definition_snap_to_behavior_private.h>
#endif

@@ -171,3 +177,3 @@ /**

instances.
@param[in] comp_def The component definition object.
@param[in,out] comp_def The component definition object.
@related SUComponentDefinitionRef

@@ -201,6 +207,6 @@ @return

@param[in] comp_def The component definition object.
@param[in] name The name of the component definition. Assumed to be UTF-8
encoded. If the requested name already belongs to another definition in the model,
a unique name will be generated based on this name.
@param[in,out] comp_def The component definition object.
@param[in] name The name of the component definition. Assumed to be UTF-8
encoded. If the requested name already belongs to another definition in the
model, a unique name will be generated based on this name.
@related SUComponentDefinitionRef

@@ -237,4 +243,4 @@ @return

@brief Retrieves the entities of the component definition.
@param[in] comp_def The component definition object.
@param[out] entities The entities retrieved.
@param[in,out] comp_def The component definition object.
@param[out] entities The entities retrieved.
@related SUComponentDefinitionRef

@@ -265,4 +271,4 @@ @return

@brief Sets the description of the component definition.
@param[in] comp_def The component definition object.
@param[in] desc The description to be set. Assumed to be UTF-8 encoded.
@param[in,out] comp_def The component definition object.
@param[in] desc The description to be set. Assumed to be UTF-8 encoded.
@related SUComponentDefinitionRef

@@ -355,2 +361,6 @@ @return

@brief Retrieves the behavior of a component definition.
@note See \ref SUSnapToBehavior for examples on how it is defined depending on
whether the code is compiled as C or C++. (Related to a bug in the original implementation).
@param[in] comp_def The component definition object.

@@ -362,2 +372,7 @@ @param[out] behavior The behavior retrieved.

- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
@see SUSnapToBehavior
@see SUComponentBehavior
@see SUComponentDefinitionGetBehavior
@see SUComponentDefinitionSetBehavior
*/

@@ -369,4 +384,8 @@ SU_RESULT SUComponentDefinitionGetBehavior(

@brief Sets the component behavior of a component definition.
@param[in] comp_def The component definition object.
@param[in] behavior The behavior to set.
@note See \ref SUSnapToBehavior for examples on how it is defined depending on
whether the code is compiled as C or C++. (Related to a bug in the original implementation).
@param[in,out] comp_def The component definition object.
@param[in] behavior The behavior to set.
@related SUComponentDefinitionRef

@@ -377,2 +396,7 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if behavior is NULL
@see SUSnapToBehavior
@see SUComponentBehavior
@see SUComponentDefinitionGetBehavior
@see SUComponentDefinitionSetBehavior
*/

@@ -384,5 +408,5 @@ SU_RESULT SUComponentDefinitionSetBehavior(

@brief Applies a schema type from a schema to a component definition.
@param[in] comp_def The component definition object.
@param[in] schema_ref The schema that owns the schema type to apply.
@param[in] schema_type_ref The schema type to apply.
@param[in,out] comp_def The component definition object.
@param[in] schema_ref The schema that owns the schema type to apply.
@param[in] schema_type_ref The schema type to apply.
@related SUComponentDefinitionRef

@@ -476,2 +500,6 @@ @return

@since SketchUp 2016, API 4.0
@deprecated Starting with SketchUp 2020.0, this function returns the default origin `[0, 0, 0]`, as
the insertion point can no longer be changed.
@param[in] comp_def The component definition object.

@@ -507,3 +535,3 @@ @param[out] point The insertion point retrieved.

@since SketchUp 2016, API 4.0
@param[in] comp_def The component definition object.
@param[in,out] comp_def The component definition object.
@related SUComponentDefinitionRef

@@ -529,4 +557,4 @@ @return

@param[in] comp_def The component definition object.
@param[in] point The \ref SUPoint3D to use.
@param[in,out] comp_def The component definition object.
@param[in] point The \ref SUPoint3D to use.
@related SUComponentDefinitionRef

@@ -543,4 +571,4 @@ @return

@since SketchUp 2016, API 4.0
@param[in] comp_def The component definition object.
@param[in] axes The \ref SUAxesRef to use.
@param[in,out] comp_def The component definition object.
@param[in] axes The \ref SUAxesRef to use.
@related SUComponentDefinitionRef

@@ -592,2 +620,15 @@ @return

/**
* @brief Retrieves the flag indicating whether the component definition is manifold.
* @since SketchUp 2025.0, API 13.0
* @param[in] comp_def The component definition object.
* @param[out] is_manifold The bool value retrieved.
* @related SUComponentDefinitionRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p comp_def is invalid
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p is_manifold is NULL
*/
SU_RESULT SUComponentDefinitionIsManifold(SUComponentDefinitionRef comp_def, bool* is_manifold);
#ifdef __cplusplus

@@ -594,0 +635,0 @@ } // extern "C"

@@ -75,5 +75,5 @@ // Copyright 2013-2020 Trimble Inc. All Rights Reserved.

@brief Sets the name of a component instance object.
@param[in] instance The component instance object.
@param[in] name The name string to set the component instance object.
Assumed to be UTF-8 encoded.
@param[in,out] instance The component instance object.
@param[in] name The name string to set the component instance object.
Assumed to be UTF-8 encoded.
@related SUComponentInstanceRef

@@ -90,3 +90,3 @@ @return

SUComponentDefinitionCreateInstance().
@param[in] instance The component instance object.
@param[in,out] instance The component instance object.
@related SUComponentInstanceRef

@@ -116,4 +116,4 @@ @return

@since SketchUp 2015, API 3.0
@param[in] instance The component instance object.
@param[in] guid The utf-8 formatted guid string.
@param[in,out] instance The component instance object.
@param[in] guid The utf-8 formatted guid string.
@related SUComponentInstanceRef

@@ -147,8 +147,8 @@ @return

coordinates.
@param[in] instance The component instance object.
@param[in] transform The affine transform to set.
@param[in,out] instance The component instance object.
@param[in] transform The affine transform to set.
@related SUComponentInstanceRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if instance is not a valid object
- \ref SU_ERROR_INVALID_INPUT if instance is not a valid object or transform is non invertible
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL

@@ -191,4 +191,4 @@ */

@since SketchUp 2016, API 4.0
@param[in] instance The instance object.
@param[in] lock if true lock the instance, otherwise unlock it.
@param[in,out] instance The instance object.
@param[in] lock if true lock the instance, otherwise unlock it.
@related SUComponentInstanceRef

@@ -195,0 +195,0 @@ @return

@@ -59,5 +59,5 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

created curve object and must not be deallocated via SUEdgeRelease().
@param curve The curve object created.
@param edges The array of edge objects.
@param len The number of edge objects in the array.
@param[out] curve The curve object created.
@param[in] edges The array of edge objects.
@param[in] len The number of edge objects in the array.
@related SUCurveRef

@@ -78,3 +78,3 @@ @return

@brief Releases a curve object and its associated edge objects.
@param curve The curve object.
@param[in,out] curve The curve object.
@related SUCurveRef

@@ -81,0 +81,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2013-2020 Trimble Inc. All Rights Reserved.
// Copyright 2012-2024 Trimble Inc. All Rights Reserved.

@@ -37,2 +37,4 @@ /**

DEFINE_SU_TYPE(SUEntityRef)
DEFINE_SU_TYPE(SUEnvironmentRef)
DEFINE_SU_TYPE(SUEnvironmentsRef)
DEFINE_SU_TYPE(SUFaceRef)

@@ -69,2 +71,3 @@ DEFINE_SU_TYPE(SUFontRef)

DEFINE_SU_TYPE(SUShadowInfoRef)
DEFINE_SU_TYPE(SUSnapRef)
DEFINE_SU_TYPE(SUStyleRef)

@@ -92,2 +95,4 @@ DEFINE_SU_TYPE(SUStylesRef)

SURefType_EdgeUse, ///< SUEdgeUseRef type
SURefType_Environment, ///< SUEnvironment type
SURefType_Environments, ///< SUEnvironments type
SURefType_Entities, ///< SUEntitiesRef type

@@ -140,3 +145,3 @@ SURefType_Face, ///< SUFaceRef type

SURefType_LayerFolder, ///< SULayerFolderRef type
SURefType_Snap, ///< SUSnapRef type
};

@@ -143,0 +148,0 @@

@@ -194,2 +194,4 @@ // Copyright 2016 Trimble Inc. All Rights Reserved.

@brief Get the dimension's font reference.
@note The returned font reference may become invalid if another font is
assigned to this dimension object later.
@since SketchUp 2019, API 7.0

@@ -196,0 +198,0 @@ @param[in] dimension The dimension object.

@@ -91,5 +91,5 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

the drawing element.
@param[in] elem The drawing element.
@param[in] material The material object to set. If an invalid reference is
given, then the material of the element will be removed.
@param[in,out] elem The drawing element.
@param[in] material The material object to set. If an invalid reference is
given, then the material of the element will be removed.
@related SUDrawingElementRef

@@ -117,4 +117,4 @@ @return

@brief Sets the layer object to be associated with a drawing element.
@param[in] elem The drawing element.
@param[in] layer The layer object to set.
@param[in,out] elem The drawing element.
@param[in] layer The layer object to set.
@related SUDrawingElementRef

@@ -129,4 +129,4 @@ @return

@brief Sets the hide flag of a drawing element.
@param[in] elem The drawing element.
@param[in] hide_flag The hide flag to set.
@param[in,out] elem The drawing element.
@param[in] hide_flag The hide flag to set.
@related SUDrawingElementRef

@@ -153,4 +153,4 @@ @return

@brief Sets the casts shadows flag of a drawing element.
@param[in] elem The drawing element.
@param[in] casts_shadows_flag The casts shadows flag to set.
@param[in,out] elem The drawing element.
@param[in] casts_shadows_flag The casts shadows flag to set.
@related SUDrawingElementRef

@@ -177,4 +177,4 @@ @return

@brief Sets the receives shadows flag of a drawing element.
@param[in] elem The drawing element.
@param[in] receives_shadows_flag The casts shadows flag to set.
@param[in,out] elem The drawing element.
@param[in] receives_shadows_flag The casts shadows flag to set.
@related SUDrawingElementRef

@@ -181,0 +181,0 @@ @return

@@ -95,3 +95,3 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

subsequently associated with a parent object (e.g. SUEntitiesAddEdges()).
@param[in] edge The edge object.
@param[in,out] edge The edge object.
@related SUEdgeRef

@@ -144,4 +144,4 @@ @return

@brief Sets the soft flag of an edge object.
@param[in] edge The edge object.
@param[in] soft_flag The soft flag to set.
@param[in,out] edge The edge object.
@param[in] soft_flag The soft flag to set.
@related SUEdgeRef

@@ -168,4 +168,4 @@ @return

@brief Sets the smooth flag of an edge object.
@param[in] edge The edge object.
@param[in] smooth_flag The smooth flag to set.
@param[in,out] edge The edge object.
@param[in] smooth_flag The smooth flag to set.
@related SUEdgeRef

@@ -244,4 +244,4 @@ @return

@brief Sets the color of an edge object.
@param[in] edge The edge object.
@param[in] color The color object to set.
@param[in,out] edge The edge object.
@param[in] color The color object to set.
@related SUEdgeRef

@@ -248,0 +248,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2013-2020 Trimble Inc. All Rights Reserved.
// Copyright 2013-2025 Trimble Inc. All Rights Reserved.

@@ -30,3 +30,3 @@ /**

@since SketchUp 2019, API 7.0
@param[in] entities The entities to clear.
@param[in,out] entities The entities to clear.
@related SUEntitiesRef

@@ -56,3 +56,3 @@ @return

@param[in] entities The entities to populate. Must be an empty entities
@param[in,out] entities The entities to populate. Must be an empty entities
object.

@@ -84,9 +84,8 @@ @param[in] geom_input The geometry input that the entities object is to be

box of the given entities object.
Note that the altitude is calculated based on the model origin, Example:
If an entities object has a bounding box with the following values
{{100,100,100}, {200,200,200}} the result will be something like the
following: {{Latitude, Longitude, 100/METERS_TO_INCHES},
{Latitude, Longitude, 200/METERS_TO_INCHES}} where Latitude and Longitude
are the geographical coordinates and altitude is just a conversion from
inches to meters.
@note Note that the altitude is calculated based on the model origin. Example: If an entities object
has a bounding box with the following values `{100,100,100}`, `{200,200,200}` the result will be
something like the following: `{Latitude, Longitude, 100/METERS_TO_INCHES}`, `{Latitude,
Longitude, 200/METERS_TO_INCHES}` where Latitude and Longitude are the geographical coordinates
and altitude is just a conversion from inches to meters.
@since SketchUp 2018 M0, API 6.0

@@ -101,2 +100,25 @@ @param[in] entities The entities object.

- \ref SU_ERROR_NULL_POINTER_OUTPUT if bbox is NULL
@code
SUModelRef model = SU_INVALID;
SUModelLoadStatus status;
SUResult res = SUModelCreateFromFileWithStatus(&model, "path/to/face.skp", &status);
if (res != SU_ERROR_NONE) {
// Handle error
return 1;
}
// Get the entity container of the model
SUEntitiesRef entities = SU_INVALID;
SUModelGetEntities(model, &entities);
// Retrieve the bounding box in LLA coordinates
SUBoundingBox3D box_lla;
res = SUEntitiesGetBoundingBoxLLA(entities, &box_lla);
if (res == SU_ERROR_NONE) {
// Process box_lla
}
SUModelRelease(&model);
@endcode
*/

@@ -314,5 +336,5 @@ SU_RESULT SUEntitiesGetBoundingBoxLLA(SUEntitiesRef entities, struct SUBoundingBox3D* bbox);

@param[in] entities The entities object.
@param[in] len The length of the array of face objects.
@param[in] faces The array of face objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of face objects.
@param[in] faces The array of face objects to add.
@related SUEntitiesRef

@@ -323,2 +345,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if faces is NULL
@own{faces}
*/

@@ -334,5 +358,5 @@ SU_RESULT SUEntitiesAddFaces(SUEntitiesRef entities, size_t len, const SUFaceRef faces[]);

@param[in] entities The entities object.
@param[in] len The length of the array of edge objects.
@param[in] edges The array of edge objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of edge objects.
@param[in] edges The array of edge objects to add.
@related SUEntitiesRef

@@ -343,2 +367,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if edges is NULL
@own{edges}
*/

@@ -354,5 +380,5 @@ SU_RESULT SUEntitiesAddEdges(SUEntitiesRef entities, size_t len, const SUEdgeRef edges[]);

@param[in] entities The entities object.
@param[in] len The length of the array of curve objects.
@param[in] curves The array of curve objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of curve objects.
@param[in] curves The array of curve objects to add.
@related SUEntitiesRef

@@ -363,2 +389,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if curves is NULL
@own{curves}
*/

@@ -375,5 +403,5 @@ SU_RESULT SUEntitiesAddCurves(SUEntitiesRef entities, size_t len, const SUCurveRef curves[]);

@param[in] entities The entities object.
@param[in] len The length of the array of curve objects.
@param[in] curves The array of arccurve objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of curve objects.
@param[in] curves The array of arccurve objects to add.
@related SUEntitiesRef

@@ -384,2 +412,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if curves is NULL
@own{curves}
*/

@@ -391,5 +421,5 @@ SU_RESULT SUEntitiesAddArcCurves(SUEntitiesRef entities, size_t len, const SUArcCurveRef curves[]);

@since SketchUp 2014 M1, API 2.1
@param[in] entities The entities object.
@param[in] len The length of the array of guide point objects.
@param[in] guide_points The array of guide point objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of guide point objects.
@param[in] guide_points The array of guide point objects to add.
@related SUEntitiesRef

@@ -400,2 +430,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if guide_points is NULL
@own{guide_points}
*/

@@ -408,5 +440,5 @@ SU_RESULT SUEntitiesAddGuidePoints(

@since SketchUp 2016, API 4.0
@param[in] entities The entities object.
@param[in] len The length of the array of guide line objects.
@param[in] guide_lines The array of guide line objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of guide line objects.
@param[in] guide_lines The array of guide line objects to add.
@related SUEntitiesRef

@@ -417,2 +449,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if guide_lines is NULL
@own{guild_lines}
*/

@@ -424,4 +458,4 @@ SU_RESULT SUEntitiesAddGuideLines(

@brief Adds a group object to an entities object.
@param[in] entities The entities object.
@param[in] group The group object to add.
@param[in,out] entities The entities object.
@param[in] group The group object to add.
@related SUEntitiesRef

@@ -431,2 +465,4 @@ @return

- \ref SU_ERROR_INVALID_INPUT if entities or group is not a valid object
@own{group}
*/

@@ -437,4 +473,4 @@ SU_RESULT SUEntitiesAddGroup(SUEntitiesRef entities, SUGroupRef group);

@brief Adds an image object to an entities object.
@param[in] entities The entities object.
@param[in] image The image object to add.
@param[in,out] entities The entities object.
@param[in] image The image object to add.
@related SUEntitiesRef

@@ -444,2 +480,4 @@ @return

- \ref SU_ERROR_INVALID_INPUT if entities or image is not a valid object
@own{image}
*/

@@ -450,7 +488,7 @@ SU_RESULT SUEntitiesAddImage(SUEntitiesRef entities, SUImageRef image);

@brief Adds a component instance object to the entities.
@param[in] entities The entities object.
@param[in] instance The component instance object to add.
@param[out] name The unique name that is assigned to definition of the
component instance. This can be NULL in which case the
caller does not need to retrieve the assigned name.
@param[in,out] entities The entities object.
@param[in] instance The component instance object to add.
@param[out] name The unique name that is assigned to definition of the
component instance. This can be NULL in which case the
caller does not need to retrieve the assigned name.
@related SUEntitiesRef

@@ -462,2 +500,4 @@ @return

\ref SUStringRef object
@own{instance}
*/

@@ -470,5 +510,5 @@ SU_RESULT SUEntitiesAddInstance(

@since SketchUp 2016, API 4.0
@param[in] entities The entities object.
@param[in] len The length of the array of section planes objects.
@param[in] section_planes The array of section planes objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of section planes objects.
@param[in] section_planes The array of section planes objects to add.
@related SUEntitiesRef

@@ -479,2 +519,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if section_planes is NULL
@own{section_planes}
*/

@@ -487,5 +529,5 @@ SU_RESULT SUEntitiesAddSectionPlanes(

@since SketchUp 2018, API 6.0
@param[in] entities The entities object.
@param[in] len The length of the array of text objects.
@param[in] texts The array of text objects to add.
@param[in,out] entities The entities object.
@param[in] len The length of the array of text objects.
@param[in] texts The array of text objects to add.
@related SUEntitiesRef

@@ -496,2 +538,4 @@ @return

- \ref SU_ERROR_NULL_POINTER_INPUT if texts is NULL
@own{texts}
*/

@@ -650,3 +694,3 @@ SU_RESULT SUEntitiesAddTexts(SUEntitiesRef entities, size_t len, const SUTextRef texts[]);

SU_RESULT SUEntitiesGetDimensions(
SUEntitiesRef entities, size_t len, SUDimensionRef* dimensions, size_t* count);
SUEntitiesRef entities, size_t len, SUDimensionRef dimensions[], size_t* count);

@@ -671,6 +715,6 @@ /**

@since SketchUp 2017, API 5.0
@param[in] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be transformed.
@param[in] trans The transform to be applied.
@param[in,out] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be transformed.
@param[in] trans The transform to be applied.
@related SUEntitiesRef

@@ -694,6 +738,6 @@ @return

@since SketchUp 2017, API 5.0
@param[in] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be transformed.
@param[in] tranforms The transformations to be applied.
@param[in,out] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be transformed.
@param[in] tranforms The transformations to be applied.
@related SUEntitiesRef

@@ -717,5 +761,5 @@ @return

@since SketchUp 2017, API 5.0
@param[in] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be destroyed.
@param[in,out] entities The entities object.
@param[in] len The number of entities in the array.
@param[in] elements The elements to be destroyed.
@related SUEntitiesRef

@@ -786,6 +830,6 @@ @return

@since SketchUp 2020.1, API 8.1
@param[in] entities The entities object to be queried.
@param[in] num_edges The length of the array of edge objects.
@param[in] edges The array of edge objects to weld.
@param[out] list The list object to be filled with \ref SUCurveRef objects.
@param[in,out] entities The entities object to be queried.
@param[in] num_edges The length of the array of edge objects.
@param[in] edges The array of edge objects to weld.
@param[out] list The list object to be filled with \ref SUCurveRef objects.
@related SUEntitiesRef

@@ -850,4 +894,5 @@ @see SUArcCurveRef

\p section_plane value and would have returned SU_ERROR_INVALID_INPUT instead
@param[in] entities
@param[in] section_plane The section plane to activate or \p SU_INVALID if none should be active.
@param[in,out] entities
@param[in] section_plane The section plane to activate or \p SU_INVALID if none should be
active.
@related SUEntitiesRef

@@ -854,0 +899,0 @@ @return

@@ -50,2 +50,4 @@ // Copyright 2017 Trimble Inc. All Rights Reserved.

SketchUp 2025.0
- SUEnvironmentRef
SketchUp 2020.1

@@ -85,2 +87,3 @@ - SUComponentDefinitionRef

/**

@@ -123,6 +126,6 @@ @brief Retrieves the number of attribute dictionaries of an entity.

@since SketchUp 2018 M0, API 6.0
@param[in] entity The entity.
@param[in] dictionary The dictionary object to be added. If the function is
successful, don't call SUAttributeDictionaryRelease on the
dictionary because the new entity will take ownership.
@param[in,out] entity The entity.
@param[in] dictionary The dictionary object to be added. If the function is
successful, don't call SUAttributeDictionaryRelease on the
dictionary because the new entity will take ownership.
@related SUEntityRef

@@ -129,0 +132,0 @@ @return

@@ -81,8 +81,8 @@ // Copyright 2013-2021 Trimble Inc. All Rights Reserved.

@param[out] face The face object created.
@param[in] vertices3d The array of vertices that make the face.
@param[in] outer_loop The loop input that describes the outer loop of the face.
If the function is successful, the new face will take
ownership of the loop and this reference will be
invalidated.
@param[out] face The face object created.
@param[in] vertices3d The array of vertices that make the face.
@param[in,out] outer_loop The loop input that describes the outer loop of the face.
If the function is successful, the new face will take
ownership of the loop and this reference will be
invalidated.
@related SUFaceRef

@@ -136,3 +136,3 @@ @return

@brief Releases a face object and its associated resources.
@param[in] face The face object.
@param[in,out] face The face object.
@related SUFaceRef

@@ -280,8 +280,8 @@ @return

component.
@param[in] face The face object.
@param[in] vertices3d The array of vertices references by the added loop.
@param[in] loop The loop input that describes the inner loop.
If the function is successful, the new face will take
ownership of the loop and this reference will be
invalidated.
@param[in,out] face The face object.
@param[in] vertices3d The array of vertices references by the added loop.
@param[in,out] loop The loop input that describes the inner loop.
If the function is successful, the new face will take
ownership of the loop and this reference will be
invalidated.
@related SUFaceRef

@@ -340,5 +340,5 @@ @return

@brief Sets the front material of a face object.
@param[in] face The face object.
@param[in] material The material object to set. If invalid, this will set the
material to the default material.
@param[in,out] face The face object.
@param[in] material The material object to set. If invalid, this will set the
material to the default material.
@related SUFaceRef

@@ -367,5 +367,5 @@ @return

@brief Sets the back material of a face object.
@param[in] face The face object.
@param[in] material The material object to set. If invalid, this will set the
material to the default material.
@param[in,out] face The face object.
@param[in] material The material object to set. If invalid, this will set the
material to the default material.
@related SUFaceRef

@@ -527,3 +527,3 @@ @return

@since SketchUp 2016, API 4.0
@param[in] face The face object.
@param[in,out] face The face object.
@related SUFaceRef

@@ -599,4 +599,4 @@ @return

@param[in] face
@param[in] front Flag indicating whether to clear the front or back side of the face.
@param[in,out] face
@param[in] front Flag indicating whether to clear the front or back side of the face.
@related SUFaceRef

@@ -656,4 +656,4 @@ @return

@param[in] face
@param[in] front Flag indicating whether to clear the front or back side of the face.
@param[in,out] face
@param[in] front Flag indicating whether to clear the front or back side of the face.
@related SUFaceRef

@@ -675,5 +675,5 @@ @return

@param[in] face
@param[in] front Flag indicating whether to use the front or back side of the face.
@param[in] mapping
@param[in,out] face
@param[in] front Flag indicating whether to use the front or back side of the face.
@param[in] mapping
@related SUFaceRef

@@ -691,2 +691,18 @@ @return

/**
@brief Retrieves a flag indicating whether \p face is coplanar with \p other_face.
@since SketchUp 2025.0, API 13.0
@param[in] face The \p face object.
@param[in] other_face The \p other_face object.
@param[out] is_coplanar The flag retrieved.
@related SUFaceRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p face or \p other_face is not a valid face object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p is_coplanar is NULL
*/
SU_RESULT SUFaceCoplanarWith(SUFaceRef face, SUFaceRef other_face, bool* is_coplanar);
#ifdef __cplusplus

@@ -693,0 +709,0 @@ } // extern "C" {

@@ -105,3 +105,3 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

@brief Deallocates a geometry input object.
@param[in] geom_input The object to deallocate.
@param[in,out] geom_input The object to deallocate.
@related SUGeometryInputRef

@@ -117,4 +117,4 @@ @return

@brief Adds a vertex to a geometry input object.
@param[in] geom_input The geometry input object.
@param[in] point The location of the vertex to be added.
@param[in,out] geom_input The geometry input object.
@param[in] point The location of the vertex to be added.
@related SUGeometryInputRef

@@ -131,5 +131,5 @@ @return

be overridden.
@param[in] geom_input The geometry input object.
@param[in] num_vertices The number of vertices in the given point array.
@param[in] points The points array containing the location of vertices.
@param[in,out] geom_input The geometry input object.
@param[in] num_vertices The number of vertices in the given point array.
@param[in] points The points array containing the location of vertices.
@related SUGeometryInputRef

@@ -149,7 +149,7 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] vertex0_index The vertex index of the edge's first vertex.
@param[in] vertex1_index The vertex index of the edge's last vertex.
@param[out] added_edge_index (optional) If not NULL, returns the index of the
added edge.
@param[in,out] geom_input The geometry input object.
@param[in] vertex0_index The vertex index of the edge's first vertex.
@param[in] vertex1_index The vertex index of the edge's last vertex.
@param[out] added_edge_index (optional) If not NULL, returns the index of the
added edge.
@related SUGeometryInputRef

@@ -171,6 +171,6 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] hidden The flag to set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] hidden The flag to set.
@related SUGeometryInputRef

@@ -190,6 +190,6 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] soft The flag to set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] soft The flag to set.
@related SUGeometryInputRef

@@ -208,6 +208,6 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] smooth The flag to set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index The zero-based index of the edge which is not associated
with a loop input.
@param[in] smooth The flag to set.
@related SUGeometryInputRef

@@ -226,5 +226,5 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index Index of the edge to set the material.
@param[in] material The material to be set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index Index of the edge to set the material.
@param[in] material The material to be set.
@related SUGeometryInputRef

@@ -244,5 +244,5 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] edge_index Index of the edge to set the layer.
@param[in] layer The layer to be set.
@param[in,out] geom_input The geometry input object.
@param[in] edge_index Index of the edge to set the layer.
@param[in] layer The layer to be set.
@related SUGeometryInputRef

@@ -263,7 +263,7 @@ @return

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] num_edges The number of edges to be used in the curve.
@param[in] edge_indices The edge indices to be used in defining the curve.
@param[out] added_curve_index (optional) If not NULL, returns the index of the
added curve.
@param[in,out] geom_input The geometry input object.
@param[in] num_edges The number of edges to be used in the curve.
@param[in] edge_indices The edge indices to be used in defining the curve.
@param[out] added_curve_index (optional) If not NULL, returns the index of the
added curve.
@related SUGeometryInputRef

@@ -288,15 +288,15 @@ @return

include an arccurve in a loop the user only needs add the arccurve's
points to a loop using \ref SULoopInputAddVertexIndex().
points to a loop using SULoopInputAddVertexIndex().
@since SketchUp 2017 M2, API 5.2
@param[in] geom_input The geometry input object.
@param[in] start_point The index of the vertex at the start of the arc.
@param[in] end_point The index of the vertex at the end of the arc.
@param[in] center The center point of the arc's circle.
@param[in] normal The normal vector of the arc plane.
@param[in] num_segments The number of edges for the arc.
@param[out] added_curve_index (optional) If not NULL, returns the index of the
added curve.
@param[out] control_edge_index (optional) If not NULL, returns the index of the
the arc's control edge which can be used to set
the arc's edge properties.
@param[in,out] geom_input The geometry input object.
@param[in] start_point The index of the vertex at the start of the arc.
@param[in] end_point The index of the vertex at the end of the arc.
@param[in] center The center point of the arc's circle.
@param[in] normal The normal vector of the arc plane.
@param[in] num_segments The number of edges for the arc.
@param[out] added_curve_index (optional) If not NULL, returns the index of the
added curve.
@param[out] control_edge_index (optional) If not NULL, returns the index of the
the arc's control edge which can be used to set
the arc's edge properties.
@related SUGeometryInputRef

@@ -319,3 +319,4 @@ @return

@param[out] loop_input The object created.
@related SUGeometryInputRef
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -330,4 +331,5 @@ - \ref SU_ERROR_NONE on success

@brief Deallocates a loop input object.
@param[in] loop_input The object to deallocate.
@related SUGeometryInputRef
@param[in,out] loop_input The object to deallocate.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -350,4 +352,4 @@ - \ref SU_ERROR_NONE on success

loop, or by adding a curve to the loop which connects the loop's start
and end points using \ref SULoopInputAddCurve(). If a loop was not
previously closed and \ref SULoopInputAddVertexIndex() is used to add
and end points using SULoopInputAddCurve(). If a loop was not
previously closed and SULoopInputAddVertexIndex() is used to add
the loop's start vertex, the loop will be closed and \ref SU_ERROR_NONE

@@ -359,7 +361,8 @@ will be returned. If attempts are made to add vertices after a loop has

@param[in] loop_input The loop input object.
@param[in] vertex_index The vertex index to add. This references a vertex within
the parent geometry input's vertex collection (as a
zero- based index).
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] vertex_index The vertex index to add. This references a vertex within
the parent geometry input's vertex collection (as a
zero- based index).
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -376,6 +379,7 @@ - \ref SU_ERROR_NONE on success

@brief Sets the hidden flag of an edge in a loop input object.
@param[in] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] hidden The flag to set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] hidden The flag to set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -391,6 +395,7 @@ - \ref SU_ERROR_NONE on success

@brief Sets the soft flag of an edge in a loop input object.
@param[in] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] soft The flag to set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] soft The flag to set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -406,6 +411,7 @@ - \ref SU_ERROR_NONE on success

@brief Sets the smooth flag of an edge in a loop input object.
@param[in] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] smooth The flag to set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index The zero-based index of the edge within the loop.
@param[in] smooth The flag to set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -422,6 +428,7 @@ - \ref SU_ERROR_NONE on success

@since SketchUp 2017, API 5.0
@param[in] loop_input The loop input object.
@param[in] edge_index Index of the edge to set the material.
@param[in] material The material to be set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index Index of the edge to set the material.
@param[in] material The material to be set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -440,6 +447,7 @@ - \ref SU_ERROR_NONE on success

@since SketchUp 2017, API 5.0
@param[in] loop_input The loop input object.
@param[in] edge_index Index of the edge to set the layer.
@param[in] layer The layer to be set.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] edge_index Index of the edge to set the layer.
@param[in] layer The layer to be set.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -455,6 +463,7 @@ - \ref SU_ERROR_NONE on success

@brief Adds a simple curve to a loop input object.
@param[in] loop_input The loop input object.
@param[in] first_edge_index First edge index to be associated with the curve.
@param[in] last_edge_index Last edge index to be associated with the curve.
@related SUGeometryInputRef
@param[in,out] loop_input The loop input object.
@param[in] first_edge_index First edge index to be associated with the curve.
@param[in] last_edge_index Last edge index to be associated with the curve.
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -471,9 +480,10 @@ - \ref SU_ERROR_NONE on success

@brief Retrieves whether the loop input is closed. A loop input can be closed
either by re-adding the start vertex to the end of the loop using \ref
SULoopInputAddVertexIndex or by adding a curve to the loop input which
connects the loop's start and end points using \ref SULoopInputAddCurve().
either by re-adding the start vertex to the end of the loop using
SULoopInputAddVertexIndex() or by adding a curve to the loop input which
connects the loop's start and end points using SULoopInputAddCurve().
@since SketchUp 2017 M2, API 5.2
@param[in] loop_input The loop input object.
@param[out] is_closed The flag retrieved (true if the loop is closed).
@related SUGeometryInputRef
@related SULoopInputRef
@see SUGeometryInputRef
@return

@@ -496,8 +506,8 @@ - \ref SU_ERROR_NONE on success

@param[in] geom_input The geometry input object.
@param[in] outer_loop The outer loop to be set for the face. If the
function succeeds (i.e. returns SU_ERROR_NONE),
this loop will be deallocated.
@param[out] added_face_index (optional) If not NULL, returns the index of the
added face.
@param[in,out] geom_input The geometry input object.
@param[in,out] outer_loop The outer loop to be set for the face. If the
function succeeds (i.e. returns \ref SU_ERROR_NONE),
this loop will be deallocated.
@param[out] added_face_index (optional) If not NULL, returns the index of the
added face.
@related SUGeometryInputRef

@@ -516,5 +526,5 @@ @return

reversing the orientations of all of its loops.
@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to be reversed.
@param[in] reverse The given reverse flag.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to be reversed.
@param[in] reverse The given reverse flag.
@related SUGeometryInputRef

@@ -532,5 +542,5 @@ @return

@brief Sets the layer of a face in the geometry input.
@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to be reversed.
@param[in] layer The layer to be set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to be reversed.
@param[in] layer The layer to be set.
@related SUGeometryInputRef

@@ -554,7 +564,7 @@ @return

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the inner loop.
@param[in] loop_input The inner loop to be added. If the function succeeds
(i.e. returns SU_ERROR_NONE), this loop will be
deallocated.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the inner loop.
@param[in,out] loop_input The inner loop to be added. If the function succeeds
(i.e. returns \ref SU_ERROR_NONE), this loop will be
deallocated.
@related SUGeometryInputRef

@@ -581,5 +591,5 @@ @return

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.

@@ -608,5 +618,5 @@ @related SUGeometryInputRef

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.

@@ -629,5 +639,5 @@ @related SUGeometryInputRef

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.

@@ -653,5 +663,5 @@ @related SUGeometryInputRef

@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to receive the material.
@param[in] material_input The material input to set.

@@ -678,5 +688,5 @@ @related SUGeometryInputRef

@since SketchUp 2017, API 5.0
@param[in] geom_input The geometry input object.
@param[in] face_index Index of the face to be hidden.
@param[in] hidden The given hidden flag.
@param[in,out] geom_input The geometry input object.
@param[in] face_index Index of the face to be hidden.
@param[in] hidden The given hidden flag.
@related SUGeometryInputRef

@@ -683,0 +693,0 @@ @return

@@ -112,5 +112,5 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

@brief Sets the name of a group object.
@param[in] group The group object.
@param[in] name The name string to set the group object.
Assumed to be UTF-8 encoded.
@param[in,out] group The group object.
@param[in] name The name string to set the group object.
Assumed to be UTF-8 encoded.
@related SUGroupRef

@@ -156,4 +156,4 @@ @return

@since SketchUp 2015, API 3.0
@param[in] group The group object.
@param[in] guid_str The utf-8 formatted guid string.
@param[in,out] group The group object.
@param[in] guid_str The utf-8 formatted guid string.
@related SUGroupRef

@@ -173,8 +173,9 @@ @return

coordinates.
@param[in] group The group object.
@param[in] transform The affine transform to set.
@param[in,out] group The group object.
@param[in] transform The affine transform to set.
@related SUGroupRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if group is not a valid object.
- \ref SU_ERROR_INVALID_INPUT if group is not a valid object or if the transform is not
invertible
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL.

@@ -181,0 +182,0 @@ */

@@ -146,4 +146,4 @@ // Copyright 2013 Trimble Inc. All Rights Reserved

@brief Sets the name of an image object.
@param[in] image The image object.
@param[in] name The name to set. Assumed to be UTF-8 encoded.
@param[in,out] image The image object.
@param[in] name The name to set. Assumed to be UTF-8 encoded.
@related SUImageRef

@@ -175,8 +175,9 @@ @deprecated This function sets a property that should not exist.

@brief Sets the 3-dimensional homogeneous transform of an image object.
@param[in] image The image object.
@param[in] transform The affine transform to set.
@param[in,out] image The image object.
@param[in] transform The affine transform to set.
@related SUImageRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if image is not a valid object
- \ref SU_ERROR_INVALID_INPUT if image is not a valid object or if the transform is not
invertible
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL

@@ -183,0 +184,0 @@ */

@@ -28,3 +28,3 @@ // Copyright 2013-2019 Trimble, Inc. All Rights Reserved.

@brief Indicates whether to set the layer visible by default. Used for
\ref SULayerGetSceneBehavior() and \ref SULayerSetSceneBehavior().
SULayerGetSceneBehavior() and SULayerSetSceneBehavior().
*/

@@ -39,3 +39,3 @@ enum SULayerVisibilityDefaultType {

@brief Indicates whether to set the layer visible on new scenes. Used for
\ref SULayerGetSceneBehavior() and \ref SULayerSetSceneBehavior().
SULayerGetSceneBehavior() and SULayerSetSceneBehavior().
*/

@@ -89,3 +89,3 @@ enum SULayerVisibilityNewSceneType {

The layer object to be deallocated must not be associated with a SketchUp model.
@param[in] layer The layer object.
@param[in,out] layer The layer object.
@related SULayerRef

@@ -92,0 +92,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2013 Trimble Inc. All Rights Reserved.
// Copyright 2012-2024 Trimble Inc. All Rights Reserved.

@@ -25,3 +25,2 @@ /**

/**

@@ -60,2 +59,22 @@ @enum SUMaterialType

/**
@enum SUMaterialWorkflow
@brief Indicates the workflow being used to represent materials
@since SketchUp 2025.0, API 13.0
*/
enum SUMaterialWorkflow {
SUMaterialWorkflow_Classic = 0, ///< Classic material workflow
SUMaterialWorkflow_PBRMetallicRoughness ///< PBR metallic/roughness material workflow
};
/**
@enum SUMaterialNormalMapStyle
@brief Indicates the normal mapping convention used by the material.
@since SketchUp 2025.0, API 13.0
*/
enum SUMaterialNormalMapStyle {
SUMaterialNormalMapStyle_OpenGL = 0, ///< OpenGL style
SUMaterialNormalMapStyle_DirectX, ///< DirectX style
};
/**
@brief Converts from an \ref SUMaterialRef to an \ref SUEntityRef.

@@ -100,3 +119,3 @@ This is essentially an upcast operation.

The material must not be associated with a parent object such as a face.
@param[in] material The material to be released.
@param[in,out] material The material to be released.
@related SUMaterialRef

@@ -118,5 +137,5 @@ @return

@param[in] material The material object.
@param[in] name The name to set the material name. Assumed to be UTF-8
encoded.
@param[in,out] material The material object.
@param[in] name The name to set the material name. Assumed to be UTF-8
encoded.
@related SUMaterialRef

@@ -175,4 +194,4 @@ @return

@brief Sets the color of a material object.
@param[in] material The material object.
@param[in] color The color value to set the material color.
@param[in,out] material The material object.
@param[in] color The color value to set the material color.
@related SUMaterialRef

@@ -199,12 +218,12 @@ @return

/**
@brief Sets the texture of a material object. Materials take ownership of their
assigned textures, so textures should not be shared accross different
materials.
@param[in] material The material object.
@param[in] texture The texture object to set the material texture.
@brief Sets the texture of a material object.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@param[in,out] material The material object.
@param[in] texture The texture object to set the material texture.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if material or texture is not a valid object
- \ref SU_ERROR_GENERIC if texture contains invalid image data
- \ref SU_ERROR_INVALID_INPUT if \p material or \p texture is not a valid object
- \ref SU_ERROR_GENERIC if \p texture contains invalid image data
*/

@@ -216,3 +235,4 @@ SU_RESULT SUMaterialSetTexture(SUMaterialRef material, SUTextureRef texture);

@param[in] material The material object.
@param[out] texture The texture object retrieved.
@param[out] texture The texture object retrieved. This texture should not be released
via SUTextureRelease() since it is owned by the material.
@related SUMaterialRef

@@ -223,3 +243,2 @@ @return

- \ref SU_ERROR_NULL_POINTER_OUTPUT if texture is NULL
- \ref SU_ERROR_INVALID_OUTPUT if texture is not a valid object
- \ref SU_ERROR_NO_DATA if the material object does not have a texture

@@ -243,4 +262,4 @@ */

@brief Sets the alpha value of a material object.
@param[in] material The material object.
@param[in] alpha The alpha value to set. Must be within range [0.0, 1.0].
@param[in,out] material The material object.
@param[in] alpha The alpha value to set. Must be within range [0.0, 1.0].
@related SUMaterialRef

@@ -270,4 +289,4 @@ @return

object.
@param[in] material The material object.
@param[in] use_opacity The flag boolean value to set.
@param[in,out] material The material object.
@param[in] use_opacity The flag boolean value to set.
@related SUMaterialRef

@@ -282,4 +301,4 @@ @return

@brief Sets the type of a material object.
@param[in] material The material object.
@param[in] type The type to set.
@param[in,out] material The material object.
@param[in] type The type to set.
@related SUMaterialRef

@@ -340,4 +359,4 @@ @return

@since SketchUp 2019.2, API 7.1
@param[in] material The material object.
@param[in] type The type to set.
@param[in,out] material The material object.
@param[in] type The type to set.
@related SUMaterialRef

@@ -381,2 +400,3 @@ @return

SUMaterialRef material, double* hue, double* saturation, double* lightness);
/**

@@ -398,3 +418,390 @@ @brief Writes a material to a SKM file.

/** @name PBR Metallic Roughness Workflow
*/
///@{
/**
@brief Queries the workflow type of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] workflow The returned workflow type.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p workflow is NULL
*/
SU_RESULT SUMaterialGetWorkflow(SUMaterialRef material, enum SUMaterialWorkflow* workflow);
/**
@brief Enables metalness properties for the material.
@note After this is enabled, a metallic texture and/or a metallic factor can be set.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] enable Whether to enable or disable.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
*/
SU_RESULT SUMaterialSetMetalnessEnabled(SUMaterialRef material, bool enable);
/**
@brief Queries whether metalness properties are enabled for the material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] enabled Whether metalness is enabled or not.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
*/
SU_RESULT SUMaterialIsMetalnessEnabled(SUMaterialRef material, bool* enabled);
/**
@brief Sets the metallic texture of a PBR material.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] texture The texture containing the metalness information. Should be an 8 bit per
pixel (single channel) image. If an invalid texture reference is given (i.e.
\ref SU_INVALID), then any existing metallic texture will be removed from
the material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid metalness data
*/
SU_RESULT SUMaterialSetMetallicTexture(SUMaterialRef material, SUTextureRef texture);
/**
@brief Retrieves the metallic texture of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] texture The texture containing the metalness information, if one exists. This texture
should not be released via SUTextureRelease() since it is owned by the
material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
- \ref SU_ERROR_NO_DATA if \p material does not have a metalness texture
*/
SU_RESULT SUMaterialGetMetallicTexture(SUMaterialRef material, SUTextureRef* texture);
/**
@brief Sets the metallic factor of a material.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] factor Metallic factor to set. The valid range is [0.0, 1.0].
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p factor is not within the valid range
*/
SU_RESULT SUMaterialSetMetallicFactor(SUMaterialRef material, double factor);
/**
@brief Retrieves the metallic factor of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] factor The factor returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p factor is NULL
*/
SU_RESULT SUMaterialGetMetallicFactor(SUMaterialRef material, double* factor);
/**
@brief Enables roughness properties for the material.
@note After this is enabled, a roughness texture and/or a roughness factor can be set.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] enable Whether to enable or disable.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
*/
SU_RESULT SUMaterialSetRoughnessEnabled(SUMaterialRef material, bool enable);
/**
@brief Queries whether roughness properties are enabled for the material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] enabled Whether roughness is enabled or not.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
*/
SU_RESULT SUMaterialIsRoughnessEnabled(SUMaterialRef material, bool* enabled);
/**
@brief Sets the roughness texture of a PBR material.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] texture The texture containing the roughness information. Should be an 8 bit per
pixel (single channel) image. If an invalid texture reference is given (i.e.
\ref SU_INVALID), then any existing metallic texture will be removed from
the material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid roughness data
*/
SU_RESULT SUMaterialSetRoughnessTexture(SUMaterialRef material, SUTextureRef texture);
/**
@brief Retrieves the roughness texture of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] texture The texture containing the roughness information, if one exists. This texture
should not be released via SUTextureRelease() since it is owned by the
material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
- \ref SU_ERROR_NO_DATA if \p material does not have a roughness texture
*/
SU_RESULT SUMaterialGetRoughnessTexture(SUMaterialRef material, SUTextureRef* texture);
/**
@brief Sets the roughness factor of a material.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] factor Roughness factor to set. The valid range is [0.0, 1.0].
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p factor is not within the valid range
*/
SU_RESULT SUMaterialSetRoughnessFactor(SUMaterialRef material, double factor);
/**
@brief Retrieves the roughness factor of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] factor The factor returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p factor is NULL
*/
SU_RESULT SUMaterialGetRoughnessFactor(SUMaterialRef material, double* factor);
/**
@brief Enables normal map for the material.
@note A normal map texture must be set before enabling it.
@since SketchUp 2025.0.2, API 13.1
@param[in,out] material The material object.
@param[in] enable Whether to enable or disable.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_ARGUMENT if a normal map texture was not set before enabling.
*/
SU_RESULT SUMaterialSetNormalEnabled(SUMaterialRef material, bool enable);
/**
@brief Queries whether normal mapping is enabled for the material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] enabled Whether normal mapping is enabled or not.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
*/
SU_RESULT SUMaterialIsNormalEnabled(SUMaterialRef material, bool* enabled);
/**
@brief Sets the normal texture of a PBR material.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@since SketchUp 2025.0, API 13.0
@param[in,out] material The material object.
@param[in] texture The texture containing the normal information. Should be an 24 bit per pixel
(3 channel) image. If an invalid texture reference is given (i.e. \ref
SU_INVALID), then any existing normal texture will be removed from the
material, which will effectively disable normal mapping.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid normal data
*/
SU_RESULT SUMaterialSetNormalTexture(SUMaterialRef material, SUTextureRef texture);
/**
@brief Retrieves the normal texture of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] texture The texture containing the normal information, if one exists. This texture
should not be released via SUTextureRelease() since it is owned by the
material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
- \ref SU_ERROR_NO_DATA if \p material does not have a normal texture
*/
SU_RESULT SUMaterialGetNormalTexture(SUMaterialRef material, SUTextureRef* texture);
/**
@brief Sets the normal scale of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[in] scale Normal scale to set. Should be >= 0.0
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p scale is not valid
*/
SU_RESULT SUMaterialSetNormalScale(SUMaterialRef material, double scale);
/**
@brief Retrieves the normal scale of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] scale Normal scale returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p scale is NULL
*/
SU_RESULT SUMaterialGetNormalScale(SUMaterialRef material, double* scale);
/**
@brief Sets the normal mapping style of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[in] style Normal style to set.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
*/
SU_RESULT SUMaterialSetNormalStyle(SUMaterialRef material, enum SUMaterialNormalMapStyle style);
/**
@brief Retrieves the normal mapping style of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] style Normal style returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
*/
SU_RESULT SUMaterialGetNormalStyle(SUMaterialRef material, enum SUMaterialNormalMapStyle* style);
/**
@brief Enables ambient occlusion map for the material.
@note An ambient occlusion map texture must be set before enabling it.
@since SketchUp 2025.0.2, API 13.1
@param[in,out] material The material object.
@param[in] enable Whether to enable or disable.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_ARGUMENT if an ambient occlusion map texture was not set before enabling.
*/
SU_RESULT SUMaterialSetAOEnabled(SUMaterialRef material, bool enable);
/**
@brief Queries whether ambient occlusion mapping is enabled for the material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] enabled Whether occlusion mapping is enabled or not.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
*/
SU_RESULT SUMaterialIsAOEnabled(SUMaterialRef material, bool* enabled);
/**
@brief Sets the ambient occlusion texture of a PBR material.
@note Materials take ownership of their assigned textures, so textures should not be shared
accross different materials.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[in] texture The texture containing the occlusion information. Should be an 8 bit per pixel
(single channel) image. If an invalid texture reference is given (i.e. \ref
SU_INVALID), then any existing AO texture will be removed from the material,
which will effectively disable AO mapping.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid occlusion data
*/
SU_RESULT SUMaterialSetAOTexture(SUMaterialRef material, SUTextureRef texture);
/**
@brief Retrieves the ambient occlusion texture of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] texture The texture containing the occlusion information, if one exists. This texture
should not be released via SUTextureRelease() since it is owned by the
material.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
- \ref SU_ERROR_NO_DATA if \p material does not have an AO texture
*/
SU_RESULT SUMaterialGetAOTexture(SUMaterialRef material, SUTextureRef* texture);
/**
@brief Sets the ambient occlusion strength of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[in] strength Strength to set. The valid range is [0.0, 1.0].
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_INVALID_ARGUMENT if \p strength is not within the valid range
*/
SU_RESULT SUMaterialSetAOStrength(SUMaterialRef material, double strength);
/**
@brief Retrieves the ambient occlusion strength of a material.
@since SketchUp 2025.0, API 13.0
@param[in] material The material object.
@param[out] strength Occlusion strength returned.
@related SUMaterialRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p strength is NULL
*/
SU_RESULT SUMaterialGetAOStrength(SUMaterialRef material, double* strength);
// End of PBR grouping:
///@}
#ifdef __cplusplus

@@ -401,0 +808,0 @@ } // extern "C"

@@ -85,86 +85,87 @@ // Copyright 2013 Trimble Inc. All rights reserved.

Rendering Option | Value Type
------------------------ | ----------------------
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 (since SketchUp 2014, API 2.0) | SUTypedValueType_Bool
DisplaySectionCuts (since SketchUp 2015, API 3.0) | SUTypedValueType_Bool
DisplaySketchAxes | SUTypedValueType_Bool
DisplayText | SUTypedValueType_Bool
DisplayWatermarks | SUTypedValueType_Bool
DrawBackEdges (since SketchUp 2015, API 3.0) | SUTypedValueType_Bool
DrawDepthQue | SUTypedValueType_Bool
DrawGround | SUTypedValueType_Bool
DrawHidden | SUTypedValueType_Bool
DrawHiddenGeometry (since SketchUp 2020, API 8.0) | SUTypedValueType_Bool
DrawHiddenObjects (since SketchUp 2020, API 8.0) | SUTypedValueType_Bool
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 (since SketchUp 2015, API 3.0) | SUTypedValueType_Bool
SectionCutFilled (since SketchUp 2018, API 6.0) | SUTypedValueType_Bool
SectionCutWidth | SUTypedValueType_Int32
SectionDefaultCutColor | SUTypedValueType_Color
SectionDefaultFillColor (since SketchUp 2018, API 6.0) | SUTypedValueType_Color
SectionInactiveColor | SUTypedValueType_Color
ShowViewName | SUTypedValueType_Bool
SilhouetteWidth | SUTypedValueType_Int32
SkyColor | SUTypedValueType_Color
Texture | SUTypedValueType_Bool
TransparencySort | SUTypedValueType_Int32
Rendering Option | Value Type | Since
---------------------------- | ---------------------------- | -------------------------
`"BackgroundColor"` | \ref SUTypedValueType_Color | &nbsp;
`"BandColor"` | \ref SUTypedValueType_Color | &nbsp;
`"ConstructionColor"` | \ref SUTypedValueType_Color | &nbsp;
`"DepthQueWidth"` | \ref SUTypedValueType_Int32 | &nbsp;
`"DisplayColorByLayer"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayDims"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayFog"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayInstanceAxes"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplaySectionPlanes"` | \ref SUTypedValueType_Bool | SketchUp 2014, API 2.0
`"DisplaySectionCuts"` | \ref SUTypedValueType_Bool | SketchUp 2015, API 3.0
`"DisplaySketchAxes"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayText"` | \ref SUTypedValueType_Bool | &nbsp;
`"DisplayWatermarks"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawBackEdges"` | \ref SUTypedValueType_Bool | SketchUp 2015, API 3.0
`"DrawDepthQue"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawGround"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawHidden"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawHiddenGeometry"` | \ref SUTypedValueType_Bool | SketchUp 2020, API 8.0
`"DrawHiddenObjects"` | \ref SUTypedValueType_Bool | SketchUp 2020, API 8.0
`"DrawHorizon"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawLineEnds"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawProfilesOnly"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawSilhouettes"` | \ref SUTypedValueType_Bool | &nbsp;
`"DrawUnderground"` | \ref SUTypedValueType_Bool | &nbsp;
`"EdgeColorMode"` | \ref SUTypedValueType_Int32 | &nbsp;
`"EdgeDisplayMode"` | \ref SUTypedValueType_Int32 | &nbsp;
`"EdgeType"` | \ref SUTypedValueType_Int32 | &nbsp;
`"ExtendLines"` | \ref SUTypedValueType_Bool | &nbsp;
`"FaceBackColor"` | \ref SUTypedValueType_Color | &nbsp;
`"FaceFrontColor"` | \ref SUTypedValueType_Color | &nbsp;
`"FogColor"` | \ref SUTypedValueType_Color | &nbsp;
`"FogEndDist"` | \ref SUTypedValueType_Double | &nbsp;
`"FogStartDist"` | \ref SUTypedValueType_Double | &nbsp;
`"FogUseBkColor"` | \ref SUTypedValueType_Bool | &nbsp;
`"ForegroundColor"` | \ref SUTypedValueType_Color | &nbsp;
`"GroundColor"` | \ref SUTypedValueType_Color | &nbsp;
`"GroundTransparency"` | \ref SUTypedValueType_Int32 | &nbsp;
`"HideConstructionGeometry"` | \ref SUTypedValueType_Bool | &nbsp;
`"HighlightColor"` | \ref SUTypedValueType_Color | &nbsp;
`"HorizonColor"` | \ref SUTypedValueType_Color | &nbsp;
`"InactiveFade"` | \ref SUTypedValueType_Double | &nbsp;
`"InactiveHidden"` | \ref SUTypedValueType_Bool | &nbsp;
`"InstanceFade"` | \ref SUTypedValueType_Double | &nbsp;
`"InstanceHidden"` | \ref SUTypedValueType_Bool | &nbsp;
`"JitterEdges"` | \ref SUTypedValueType_Bool | &nbsp;
`"LineEndWidth"` | \ref SUTypedValueType_Int32 | &nbsp;
`"LineExtension"` | \ref SUTypedValueType_Int32 | &nbsp;
`"LockedColor"` | \ref SUTypedValueType_Color | &nbsp;
`"MaterialTransparency"` | \ref SUTypedValueType_Bool | &nbsp;
`"ModelTransparency"` | \ref SUTypedValueType_Bool | &nbsp;
`"RenderMode"` | \ref SUTypedValueType_Int32 | &nbsp;
`"SectionActiveColor"` | \ref SUTypedValueType_Color | &nbsp;
`"SectionCutDrawEdges"` | \ref SUTypedValueType_Bool | SketchUp 2015, API 3.0
`"SectionCutFilled"` | \ref SUTypedValueType_Bool | SketchUp 2018, API 6.0
`"SectionCutWidth"` | \ref SUTypedValueType_Int32 | &nbsp;
`"SectionDefaultCutColor"` | \ref SUTypedValueType_Color | &nbsp;
`"SectionDefaultFillColor"` | \ref SUTypedValueType_Color | SketchUp 2018, API 6.0
`"SectionInactiveColor"` | \ref SUTypedValueType_Color | &nbsp;
`"ShowViewName"` | \ref SUTypedValueType_Bool | &nbsp;
`"SilhouetteWidth"` | \ref SUTypedValueType_Int32 | &nbsp;
`"SkyColor"` | \ref SUTypedValueType_Color | &nbsp;
`"Texture"` | \ref SUTypedValueType_Bool | &nbsp;
`"TransparencySort"` | \ref SUTypedValueType_Int32 | &nbsp;
Some of the options map to enumerated values, as shown in the table below.
Option | Value | Meaning
--------------- | ----- | -------
EdgeColorMode | 0: | ObjectColor
&nbsp; | 1: | ForegroundColor
&nbsp; | 2: | DirectionColor
EdgeDisplayMode | 0: | EdgeDisplayNone
&nbsp; | 1: | EdgeDisplayAll
&nbsp; | 2: | EdgeDisplayStandalone
RenderMode | 0: | RenderWireframe
&nbsp; | 1: | RenderHidden
&nbsp; | 2: | RenderFlat
&nbsp; | 3: | RenderSmooth
&nbsp; | 4: | RenderTextureObsolete
&nbsp; | 5: | RenderNoMaterials
EdgeType | 0: | EdgeStandard
&nbsp; | 1: | EdgeNPR
Option | Value | Meaning | Since
------------------ | ----- | --------------------- | --------------------------
\b EdgeColorMode | `0` | ObjectColor | &nbsp;
&nbsp; | `1` | ForegroundColor | &nbsp;
&nbsp; | `2` | DirectionColor | &nbsp;
\b EdgeDisplayMode | `0` | EdgeDisplayNone | &nbsp;
&nbsp; | `1` | EdgeDisplayAll | &nbsp;
&nbsp; | `2` | EdgeDisplayStandalone | &nbsp;
\b RenderMode | `0` | RenderWireframe | &nbsp;
&nbsp; | `1` | RenderHidden | &nbsp;
&nbsp; | `2` | RenderFlat | &nbsp;
&nbsp; | `3` | RenderSmooth | &nbsp;
&nbsp; | `4` | RenderTextureObsolete | &nbsp;
&nbsp; | `5` | RenderNoMaterials | &nbsp;
&nbsp; | `6` | RenderPhysicallyBased | SketchUp 2025.0, API 13.0
\b EdgeType | `0` | EdgeStandard | &nbsp;
&nbsp; | `1` | EdgeNPR | &nbsp;

@@ -171,0 +172,0 @@ @note The rendering option FaceColorMode was removed in SketchUp 2019.1.

@@ -1,2 +0,2 @@

// Copyright 2013 Trimble Inc. All Rights Reserved.
// Copyright 2013-2025 Trimble Inc. All Rights Reserved.

@@ -23,2 +23,5 @@ /**

object.
@note Add the scene to the model before setting its properties, except for the name which should
be set before adding it.
*/

@@ -34,14 +37,19 @@

*/
#define FLAG_USE_CAMERA 0x0001
#define FLAG_USE_RENDERING_OPTIONS 0x0002
#define FLAG_USE_SHADOWINFO 0x0004
#define FLAG_USE_AXES 0x0008
#define FLAG_USE_CAMERA 0x0001 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_RENDERING_OPTIONS 0x0002 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_SHADOWINFO 0x0004 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_AXES 0x0008 ///< @since SketchUp 2017, API 5.0
/// @deprecated Obsolete since SketchUp 2020.1, API 8.1. Instead, use
/// \ref FLAG_USE_HIDDEN_GEOMETRY and \ref FLAG_USE_HIDDEN_OBJECTS.
///
/// @since SketchUp 2017, API 5.0
#define FLAG_USE_HIDDEN 0x0010
#define FLAG_USE_LAYER_VISIBILITY 0x0020
#define FLAG_USE_SECTION_PLANES 0x0040
#define FLAG_USE_HIDDEN_GEOMETRY 0x0080
#define FLAG_USE_HIDDEN_OBJECTS 0x0100
#define FLAG_USE_LAYER_VISIBILITY 0x0020 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_SECTION_PLANES 0x0040 ///< @since SketchUp 2017, API 5.0
#define FLAG_USE_HIDDEN_GEOMETRY 0x0080 ///< @since SketchUp 2020.1, API 8.1
#define FLAG_USE_HIDDEN_OBJECTS 0x0100 ///< @since SketchUp 2020.1, API 8.1
#define FLAG_USE_ENVIRONMENT 0x0200 ///< @since SketchUp 2025.0, API 13.0
#define FLAG_USE_ALL 0x0fff
#define FLAG_NO_CAMERA 0x0ffe
#define FLAG_USE_ALL 0x0fff ///< @since SketchUp 2017, API 5.0
#define FLAG_NO_CAMERA 0x0ffe ///< @since SketchUp 2017, API 5.0
/**@}*/

@@ -74,2 +82,6 @@

@brief Creates an empty scene object.
@note The created scene will not save any scene properties until
the \ref SUSceneFlags bits are set.
@param[out] scene The scene object created.

@@ -81,2 +93,17 @@ @related SUSceneRef

- \ref SU_ERROR_OVERWRITE_VALID if face already refers to a valid object
@see SUSceneSetFlags
@see SUModelAddScenes
@code
SUScene scene = SU_INVALID;
SUSceneCreate(&scene);
SUSceneSetName(scene, "Example"); // Must be unique.
SUSceneSetFlags(scene, FLAG_USE_ALL); // Set the properties to remember.
SUModelAddScenes(model, 1, &scene); // This will also update the scene based on the flags set.
// Set scene properties after adding it to the model.
// ...
SUSceneSetCamera(scene, eye, target, up);
@endcode
*/

@@ -122,5 +149,7 @@ SU_RESULT SUSceneCreate(SUSceneRef* scene);

/**
@brief Retrieves the camera of a scene object. The returned camera object
points to scene's internal camera. So the camera must not be released
via SUCameraRelease().
@brief Retrieves the camera of a scene object.
@note The returned camera object points to scene's internal camera. So the
camera must not be released via SUCameraRelease().
@param[in] scene The scene object.

@@ -137,6 +166,8 @@ @param[out] camera The camera object retrieved.

/**
@brief Sets a given scene's camera object. The scene does not take ownership
of the provided camera, it just copies the properties to the scene's
owned camera. If the input camera was created using SUCameraCreate()
it must be released using SUCameraRelease().
@brief Sets a given scene's camera object.
@note The scene does not take ownership of the provided camera, it just copies
the properties to the scene's owned camera. If the input camera was created
using SUCameraCreate() it must be released using SUCameraRelease().
@since SketchUp 2016, API 4.0

@@ -197,3 +228,3 @@ @param[in] scene The scene object.

@warning Breaking Change: The behavior of SUSceneSetName changed in
SketchUp SDK 2018 API 6.0 to return SU_ERROR_INVALID_ARGUMENT if the
SketchUp 2018, API 6.0 to return \ref SU_ERROR_INVALID_ARGUMENT if the
given name already exists in the scene's model.

@@ -303,2 +334,4 @@

@related SUSceneRef
@see SUSceneGetUseHiddenGeometry
@see SUSceneGetUseHiddenObjects
@return

@@ -320,2 +353,4 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneSetUseHiddenGeometry
@see SUSceneSetUseHiddenObjects
@return

@@ -334,2 +369,5 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneSetUseHiddenGeometry
@see SUSceneGetUseHiddenObjects
@see SUSceneSetUseHiddenObjects
@return

@@ -349,2 +387,5 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneGetUseHiddenGeometry
@see SUSceneGetUseHiddenObjects
@see SUSceneSetUseHiddenObjects
@return

@@ -363,2 +404,5 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneGetUseHiddenGeometry
@see SUSceneSetUseHiddenGeometry
@see SUSceneSetUseHiddenObjects
@return

@@ -378,2 +422,5 @@ - \ref SU_ERROR_NONE on success

@related SUSceneRef
@see SUSceneGetUseHiddenGeometry
@see SUSceneSetUseHiddenGeometry
@see SUSceneGetUseHiddenObjects
@return

@@ -470,7 +517,9 @@ - \ref SU_ERROR_NONE on success

Adding a layer to a scene will flag the layer to be the opposite of its
default scene visibility. See \ref SULayerVisibilityDefaultType. This
function does not take ownership of the specified layer.
@note Adding a layer to a scene will flag the layer to be the opposite of its
default scene visibility. See \ref SULayerVisibilityDefaultType. This
function does not take ownership of the specified layer.
@note Prior to SketchUp 2020.0, API 8.0 this function did not return
SU_ERROR_INVALID_ARGUMENT.
\ref SU_ERROR_INVALID_ARGUMENT.
@since SketchUp 2016, API 4.0

@@ -492,7 +541,9 @@ @param[in] scene The scene object.

Removing a layer from a scene will flag the layer to use its default
scene visibility. See \ref SULayerVisibilityDefaultType. Scenes do not
own their layers so removing them doesn't release them.
@note Removing a layer from a scene will flag the layer to use its default
scene visibility. See \ref SULayerVisibilityDefaultType. Scenes do not
own their layers so removing them doesn't release them.
@note Prior to SketchUp 2020.0, API 8.0 this function did not return
SU_ERROR_INVALID_ARGUMENT.
\ref SU_ERROR_INVALID_ARGUMENT.
@since SketchUp 2016, API 4.0

@@ -553,7 +604,8 @@ @param[in] scene The scene object.

Adding a layer folder to a scene will cause that layer folder to be
flagged as HIDDEN for the specified scene. Any layers or layer folders
within that layer folder will also be hidden, and therefore don't need to
be added to the scene. This function does not take ownership of the
specified layer folder.
@note Adding a layer folder to a scene will cause that layer folder to be
flagged as HIDDEN for the specified scene. Any layers or layer folders
within that layer folder will also be hidden, and therefore don't need to
be added to the scene. This function does not take ownership of the
specified layer folder.
@since SketchUp 2021.0, API 9.0

@@ -575,5 +627,6 @@ @param[in] scene The scene object.

Removing a layer folder from a scene will cause that layer folder to be
flagged as VISIBLE for the specified scene. Scenes do not own their layer
folders so removing them doesn't release them.
@note Removing a layer folder from a scene will cause that layer folder to be
flagged as VISIBLE for the specified scene. Scenes do not own their layer
folders so removing them doesn't release them.
@since SketchUp 2021.0, API 9.0

@@ -672,7 +725,13 @@ @param[in] scene The scene object.

See \ref SUSceneFlags "Scene Flags" for available flags that can be combined bitwise.
@note If this function is called after the scene has been added to the model the API user *must*
call SUSceneUpdate(). Otherwise it can lead to a crash while interacting with the model.
In general it is recommended to use the separate `SUSceneSetUse*` setters after the scene has
been added to the model.
@note \ref FLAG_USE_HIDDEN is deprecated and the bits for \ref FLAG_USE_HIDDEN_GEOMETRY and
\ref FLAG_USE_HIDDEN_OBJECTS will take precedence.
@since SketchUp 2017, API 5.0
@param[in] scene The scene object.
@param[in] flags The flags to be set.
@param[in] flags A bitwise combination of \ref SUSceneFlags.
@related SUSceneRef

@@ -682,2 +741,6 @@ @return

- \ref SU_ERROR_INVALID_INPUT if scene is not a valid object
@see SUSceneFlags
@see SUSceneGetFlags
@see SUSceneUpdate
*/

@@ -689,7 +752,5 @@ SU_RESULT SUSceneSetFlags(SUSceneRef scene, uint32_t flags);

See \ref SUSceneFlags "Scene Flags" for available flags that can be combined bitwise.
@since SketchUp 2017, API 5.0
@param[in] scene The scene object.
@param[out] flags The flags.
@param[out] flags A bitwise combination of \ref SUSceneFlags.
@related SUSceneRef

@@ -700,2 +761,6 @@ @return

- \ref SU_ERROR_NULL_POINTER_OUTPUT if flags is NULL
@see SUSceneFlags
@see SUSceneSetFlags
*/

@@ -795,3 +860,3 @@ SU_RESULT SUSceneGetFlags(SUSceneRef scene, uint32_t* flags);

@note Only drawing elements at the root of the model, or nested instances of
components, groups, and images are controlled by scene visibility.
components, groups, and images are controlled by scene visibility.
@param[in] scene The scene object.

@@ -854,2 +919,117 @@ @param[in] drawing_element The drawing element object.

/**
* @brief Enables the use of an environment for a scene.
* @since SketchUp 2025.0, API 13.0
* @param[in] scene The scene object.
* @param[in] use_environment The setting whether a scene should use an environment.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
*/
SU_RESULT SUSceneSetUseEnvironment(SUSceneRef scene, bool use_environment);
/**
* @brief Retrieves the setting whether a scene uses an environment.
* @since SketchUp 2025.0, API 13.0
* @param[in] scene The scene object.
* @param[out] use_environment The setting whether a scene should use an environment.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p use_environment is `NULL`
*/
SU_RESULT SUSceneGetUseEnvironment(SUSceneRef scene, bool* use_environment);
/**
* @brief Sets the environment for a scene.
* @since SketchUp 2025.0, API 13.0
* @param[in] scene The scene object.
* @param[in] environment The environment object to be set.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
*/
SU_RESULT SUSceneSetEnvironment(SUSceneRef scene, SUEnvironmentRef environment);
/**
* @brief Retrieves the environment of a scene.
* @since SketchUp 2025.0, API 13.0
* @param[in] scene The scene object.
* @param[out] environment The environment object to be retrieved.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
* - \ref SU_ERROR_NO_DATA if the scene does not have an environment
*/
SU_RESULT SUSceneGetEnvironment(SUSceneRef scene, SUEnvironmentRef* environment);
/**
* @brief Retrieves the number of section planes that will be activated when the scene is activated.
* @since SketchUp 2025.1, API 13.1
* @param[in] scene The scene object.
* @param[out] count The number of section planes.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is `NULL`
*/
SU_RESULT SUSceneGetNumActiveSectionPlanes(SUSceneRef scene, size_t* count);
/**
* @brief Retrieves the section planes that will be activated when the scene is activated.
* @since SketchUp 2025.1, API 13.1
* @param[in] scene The scene object.
* @param[in] len The number of section planes to retrieve.
* @param[out] active_section_planes The section planes retrieved.
* @param[out] count The number of section planes retrieved.
* @related SUSceneRef
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p active_section_planes or \p count is `NULL`
*/
SU_RESULT SUSceneGetActiveSectionPlanes(
SUSceneRef scene, size_t len, SUSectionPlaneRef active_section_planes[], size_t* count);
/**
* @brief Performs an update on the scene properties based on the current view that the use has.
*
* What properties of the Scene get updated are controlled via an integer whose bits corresponds to
* different properties. These flags can be used individually or combined using bitwise OR.
*
* @note The properties updated is determined by the AND operation of the passed in \p flags and
* the flags on the scene set by SUSceneSetFlags() or the separate `SUSceneSetUse*` setters.
*
* @since SketchUp 2025.0, API 13.0
*
* @param[in] scene The \p scene object.
* @param[in] flags The bitwise OR of \ref SUSceneFlags.
* @return
* - \ref SU_ERROR_NONE on success
* - \ref SU_ERROR_INVALID_INPUT if \p scene is not a valid object
* - \ref SU_ERROR_INVALID_ARGUMENT if \p scene is not added to a model
*
* @related SUSceneRef
*
* @see \ref SUSceneFlags
* @see SUSceneSetFlags
*
* @code
* SUScene scene = SU_INVALID;
* SUSceneCreate(&scene);
* SUSceneSetName(scene, "Example");
* SUSceneSetFlags(scene, FLAG_USE_ALL); // Set the properties to remember.
* SUModelAddScenes(model, 1, &scene);
* // ...
* SUSceneUpdate(scene, FLAG_USE_CAMERA | FLAG_USE_SECTION_PLANES);
* @endcode
*/
SU_RESULT SUSceneUpdate(SUSceneRef scene, unsigned int flags);
#ifdef __cplusplus

@@ -856,0 +1036,0 @@ }

@@ -1,2 +0,2 @@

// Copyright 2015 Trimble Inc. All Rights Reserved.
// Copyright 2015-2025 Trimble Inc. All Rights Reserved.

@@ -36,5 +36,5 @@ /**

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
- \ref SU_ERROR_SERIALIZATION if style couldn't be created from the file at path
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p name is NULL
- \ref SU_ERROR_SERIALIZATION if \p style couldn't be created from the file at \p path
- \ref SU_ERROR_DUPLICATE if the name corresponds to an existing style

@@ -52,4 +52,4 @@ */

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is NULL
*/

@@ -68,4 +68,4 @@ SU_RESULT SUStylesGetNumStyles(SUStylesRef styles, size_t* count);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style_array or count is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style_array or \p count is NULL
*/

@@ -83,4 +83,4 @@ SU_RESULT SUStylesGetStyles(

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
*/

@@ -97,4 +97,4 @@ SU_RESULT SUStylesGetActiveStyle(SUStylesRef styles, SUStyleRef* style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
*/

@@ -112,5 +112,5 @@ SU_RESULT SUStylesGetSelectedStyle(SUStylesRef styles, SUStyleRef* style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if guid is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p guid is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
*/

@@ -128,6 +128,6 @@ SU_RESULT SUStylesGetStyleByGuid(SUStylesRef styles, const char* guid, SUStyleRef* style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if path is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if style is NULL
- \ref SU_ERROR_NO_DATA if no style in styles matches the style at path.
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p path is NULL
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
- \ref SU_ERROR_NO_DATA if no style in \p styles matches the \p style at \p path.
*/

@@ -144,4 +144,4 @@ SU_RESULT SUStylesGetStyleByPath(SUStylesRef styles, const char* path, SUStyleRef* style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if changed is NULL
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p changed is NULL
*/

@@ -159,3 +159,3 @@ SU_RESULT SUStylesGetActiveStyleChanged(SUStylesRef styles, bool* changed);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if any of styles, style, or scene are not
- \ref SU_ERROR_INVALID_INPUT if any of \p styles, \p style, or \p scene are not
valid objects

@@ -167,2 +167,3 @@ */

@brief Sets the selected style.
@bug Prior to SketchUp 2025.0 setting the selected style to the active style would crash.
@since SketchUp 2019.2, API 7.1

@@ -174,3 +175,4 @@ @param[in] styles The styles object.

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles or style are not valid objects
- \ref SU_ERROR_INVALID_INPUT if \p styles or \p style are not valid objects
- \ref SU_ERROR_INVALID_ARGUMENT if \p style is the active style
*/

@@ -190,6 +192,6 @@ SU_RESULT SUStylesSetSelectedStyle(SUStylesRef styles, SUStyleRef style);

- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if style is NULL
- \ref SU_ERROR_INVALID_ARGUMENT if style is not within styles
- \ref SU_ERROR_OUT_OF_RANGE if the style is the last style in the manager
- \ref SU_ERROR_INVALID_INPUT if \p styles is not a valid object
- \ref SU_ERROR_NULL_POINTER_INPUT if \p style is NULL
- \ref SU_ERROR_INVALID_ARGUMENT if \p style is not within styles
- \ref SU_ERROR_OUT_OF_RANGE if the \p style is the last style in the manager
*/

@@ -196,0 +198,0 @@ SU_RESULT SUStylesRemoveStyle(SUStylesRef styles, SUStyleRef* style);

@@ -158,3 +158,5 @@ // Copyright 2016 Trimble Inc. All Rights Reserved.

/**
@brief Retrieves the font from the text object
@brief Retrieves the font from the text object.
@note The returned font reference may become invalid if another font is
assigned to this text object later.
@since SketchUp 2018, API 6.0

@@ -278,8 +280,10 @@ @param[in] text The text object.

/**
@brief Retrieves the point associated with the text object. The given instance
path object either must have been constructed using one of the
SUInstancePathCreate* functions or it will be generated on the fly if it
is invalid. It must be released using SUInstancePathRelease() when it
is no longer needed.
@brief Retrieves the point associated with the text object.
The given instance path object either must have been constructed using one of the
+SUInstancePathCreate*+ functions or it will be generated on the fly if it
is invalid. It must be released using SUInstancePathRelease() when it is no longer needed.
@since SketchUp 2018, API 6.0
@param[in] text The text object.

@@ -289,2 +293,6 @@ @param[out] point The point retrieved.

@related SUTextRef
@see SUInstancePathCreate
@see SUInstancePathCreateCopy
@return

@@ -291,0 +299,0 @@ - \ref SU_ERROR_NONE on success

@@ -127,3 +127,3 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

@brief Retrieves the pixel width, height, and scale factors of the texture.
The s_scale and t_scale values are useful when a face doesn't have a
@note The s_scale and t_scale values are useful when a face doesn't have a
material applied directly, but instead inherit from a parent group or

@@ -133,2 +133,5 @@ component instance. Then you want use these values to multiply the

If the material is applied directly then this would not be needed.
@note For PBR textures (metallic, roughness, normal, and ambient occlusion)
the s_scale and t_scale values are only used when the PBR material
doesn't have a base texture.
@param[in] texture The texture object whose dimensions are retrieved.

@@ -152,2 +155,21 @@ @param[out] width The width in pixels.

/**
@brief Sets the scale factors of the texture.
@note For PBR textures (metallic, roughness, normal, and ambient occlusion)
the \p s_scale and \p t_scale values are only used when the PBR material
doesn't have a base texture.
@since SketchUp 2025.0, API 13.0
\param texture The texture object whose dimensions are set.
\param s_scale The s coordinate scale factor to map a pixel into model
coordinates.
\param t_scale The t coordinate scale factor to map a pixel into model
coordinates.
@related SUTextureRef
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_INVALID_INPUT if \p texture is an invalid object
- \ref SU_ERROR_OUT_OF_RANGE if \p s_scale, or \p t_scale is smaller or equal to 0
*/
SU_RESULT SUTextureSetDimensions(SUTextureRef texture, double s_scale, double t_scale);
/**
@brief Returns the total size and bits-per-pixel value of a texture's image

@@ -154,0 +176,0 @@ data. This function is useful to determine the size of the buffer

@@ -59,3 +59,3 @@ // Copyright 2013 Trimble Inc. All Rights Reserved

\ref SUTypedValueCreate().
@param[in] typed_value The typed value object.
@param[in,out] typed_value The typed value object.
@related SUTypedValueRef

@@ -96,4 +96,4 @@ @return

@brief Sets the byte value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] byte_value The byte value that is assigned.
@param[in,out] typed_value The typed value object.
@param[in] byte_value The byte value that is assigned.
@related SUTypedValueRef

@@ -121,4 +121,4 @@ @return

@brief Sets the int16 value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] int16_value The int16 value to set.
@param[in,out] typed_value The typed value object.
@param[in] int16_value The int16 value to set.
@related SUTypedValueRef

@@ -146,4 +146,4 @@ @return

@brief Sets the int32 value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] int32_value The int32 value to set.
@param[in,out] typed_value The typed value object.
@param[in] int32_value The int32 value to set.
@related SUTypedValueRef

@@ -171,4 +171,4 @@ @return

@brief Sets the float value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] float_value The float value to set.
@param[in,out] typed_value The typed value object.
@param[in] float_value The float value to set.
@related SUTypedValueRef

@@ -196,4 +196,4 @@ @return

@brief Sets the double value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] double_value The double value to set.
@param[in,out] typed_value The typed value object.
@param[in] double_value The double value to set.
@related SUTypedValueRef

@@ -221,4 +221,4 @@ @return

@brief Sets the boolean value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] bool_value The boolean value to set.
@param[in,out] typed_value The typed value object.
@param[in] bool_value The boolean value to set.
@related SUTypedValueRef

@@ -246,4 +246,4 @@ @return

@brief Sets the color value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] color The color value to set.
@param[in,out] typed_value The typed value object.
@param[in] color The color value to set.
@related SUTypedValueRef

@@ -274,4 +274,4 @@ @return

seconds since January 1, 1970.
@param[in] typed_value The typed value object.
@param[in] time_value The time value that is set.
@param[in,out] typed_value The typed value object.
@param[in] time_value The time value that is set.
@related SUTypedValueRef

@@ -301,4 +301,4 @@ @return

@brief Sets the string value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] string_value The string value to set. Assumed to be UTF-8 encoded.
@param[in,out] typed_value The typed value object.
@param[in] string_value The string value to set. Assumed to be UTF-8 encoded.
@related SUTypedValueRef

@@ -327,4 +327,4 @@ @return

@brief Sets the 3-element vector value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] vector3d_value The 3-element vector value to set.
@param[in,out] typed_value The typed value object.
@param[in] vector3d_value The 3-element vector value to set.
@related SUTypedValueRef

@@ -339,4 +339,4 @@ @return

@brief Sets the 3D unit vector value of a typed value object.
@param[in] typed_value The typed value object.
@param[in] vector3d_value The 3 vector components. Magnitude is ignored.
@param[in,out] typed_value The typed value object.
@param[in] vector3d_value The 3 vector components. Magnitude is ignored.
@related SUTypedValueRef

@@ -371,5 +371,5 @@ @return

elements of the given array are copied to the type value object.
@param[in] typed_value The typed value object.
@param[in] len The number of typed value objects to set.
@param[in] values The array of typed value objects to set.
@param[in,out] typed_value The typed value object.
@param[in] len The number of typed value objects to set.
@param[in] values The array of typed value objects to set.
@related SUTypedValueRef

@@ -376,0 +376,0 @@ @return

@@ -62,4 +62,4 @@ // Copyright 2013 Trimble Inc. All Rights Reserved.

@brief Sets the position of a vertex object.
@param[in] vertex The vertex object.
@param[in] position The value used to set the vertex position.
@param[in,out] vertex The vertex object.
@param[in] position The value used to set the vertex position.
@related SUVertexRef

@@ -66,0 +66,0 @@ @return

@@ -1,2 +0,2 @@

// Copyright 2015-2020 Trimble Inc., All rights reserved.
// Copyright 2015-2024 Trimble Inc., All rights reserved.
// This file is intended for public distribution.

@@ -83,2 +83,4 @@

#include <SketchUpAPI/model/entity_list_iterator.h>
#include <SketchUpAPI/model/environment.h>
#include <SketchUpAPI/model/environments.h>
#include <SketchUpAPI/model/face.h>

@@ -115,2 +117,3 @@ #include <SketchUpAPI/model/font.h>

#include <SketchUpAPI/model/shadow_info.h>
#include <SketchUpAPI/model/snap.h>
#include <SketchUpAPI/model/style.h>

@@ -117,0 +120,0 @@ #include <SketchUpAPI/model/styles.h>

@@ -42,3 +42,3 @@ // Copyright 2013 Trimble Inc., All rights reserved.

Constructs a string and initializes it to a copy of the provided string,
which is provided by a `'\0'` (`NULL`) terminated array of 8-bit characters.
which is provided by a <tt>'\0'</tt> (<tt>NULL</tt>) terminated array of 8-bit characters.
This string is interpreted as UTF-8.

@@ -134,4 +134,4 @@ You must use SUStringRelease() on this string object to free its memory.

@param[in] string_ref The string object.
@param[in] char_array The character array to be set.
@param[in,out] string_ref The string object.
@param[in] char_array The character array to be set.
@related SUStringRef

@@ -148,4 +148,4 @@ @return

@param[in] string_ref The string object.
@param[in] char_array The character array to be set.
@param[in,out] string_ref The string object.
@param[in] char_array The character array to be set.
@related SUStringRef

@@ -203,3 +203,3 @@ @return

@since SketchUp 2017, API 5.0
@param[in] string_ref The string object.
@param[in,out] string_ref The string object.
@related SUStringRef

@@ -215,3 +215,3 @@ @return

@since SketchUp 2017, API 5.0
@param[in] string_ref The string object.
@param[in,out] string_ref The string object.
@related SUStringRef

@@ -218,0 +218,0 @@ @return

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

// Copyright 2017 Trimble Inc., All rights reserved.
#ifndef LAYOUT_MODEL_SKPFILEREFERENCE_H_
#define LAYOUT_MODEL_SKPFILEREFERENCE_H_
#include <LayOutAPI/common.h>
#include <LayOutAPI/geometry/geometry.h>
#include <LayOutAPI/model/defs.h>
#include <SketchUpAPI/model/defs.h>
/**
@struct LOSkpFileRef
@since LayOut 2018, API 3.0
@brief References a SketchUp file reference object.
*/
DEFINE_SU_TYPE(LOSkpFileRef)
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/**
@brief Creates a SketchUp file reference object with a Skp model.
This function takes ownership of the given model. Upon success, user
should not release the model, or create another LOSkpFileRef with
the same model. The model is valid and mutable till the LOSkpFileRef is
released.
Do not use a model obtained by a 'Get' function such as the
\ref LOSketchUpModelGetModel() as the ownership cannot be transfered
to the file_ref.
@since LayOut 2018, API 3.0
@param[out] file_ref The file reference object to be created.
@param[in] model The SketchUp model.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_NULL_POINTER_OUTPUT if file_ref is NULL
- \ref SU_ERROR_OVERWRITE_VALID if *file_ref refers to a valid object
- \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
*/
LO_RESULT LOSkpFileReferenceCreate(LOSkpFileRef* file_ref, SUModelRef model);
/**
@brief Releases a SketchUp file reference object.
@since LayOut 2018, API 3.0
@param[in] file_ref The SketchUp file reference object.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_NULL_POINTER_INPUT if file_ref is NULL
- \ref SU_ERROR_INVALID_INPUT if *file_ref does not refer to a valid object
*/
LO_RESULT LOSkpFileReferenceRelease(LOSkpFileRef* file_ref);
/**
@brief Creates a new SketchUp model object with the specified bounds and
file reference.
This function increases reference count on the given file reference.
@since LayOut 2018, API 3.0
@param[out] model The model entity to be created.
@param[in] file_ref The SketchUp file reference object.
@param[in] bounds The starting dimensions of the model entity.
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_NULL_POINTER_OUTPUT if model is NULL
- \ref SU_ERROR_OVERWRITE_VALID if *model already refers to a valid object
- \ref SU_ERROR_INVALID_INPUT if file_ref is invalid
- \ref SU_ERROR_NULL_POINTER_INPUT if bounds is NULL
- \ref SU_ERROR_OUT_OF_RANGE if bounds has a width or height of zero
*/
LO_RESULT LOSketchUpModelCreateWithSkpFileRef(
LOSketchUpModelRef* model, LOSkpFileRef file_ref, const LOAxisAlignedRect2D* bounds);
/**
@brief Applies a clip mask to all entities inside a group. Entities outside
the clip mask will be removed from the document. Entities that cross
the clip mask boundary will be removed but may be replaced by new
entities. The clip_mask entity must be a \ref LORectangleRef,
\ref LOEllipseRef, or \ref LOPathRef.
@since LayOut 2018, API 3.0
@param[in] group The group to apply the clipmask to.
@param[in] clip_mask The entity to use as a clip mask.
@return
@return
- \ref SU_ERROR_NONE on success
- \ref SU_ERROR_ENTITY_LOCKED if group is locked
- \ref SU_ERROR_LAYER_LOCKED if group contains entities on locked layers
- \ref SU_ERROR_GENERIC if clipping algorithm fails
*/
LO_RESULT LOGroupClipChildren(LOGroupRef group, LOEntityRef clip_mask);
#ifdef __cplusplus
} // end extern "C"
#endif // __cplusplus
#endif // LAYOUT_MODEL_SKPFILEREFERENCE_H_

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display