SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SUHatchPatternsRef Struct Reference

A model's collection of hatch patterns. More...

#include <SketchUpAPI/model/hatch_patterns.h>

Related Functions

(Note that these are not member functions.)

enum SUResult SUHatchPatternsGetCount (SUHatchPatternsRef hatch_patterns, size_t *count)
 Retrieves the number of hatch patterns in a hatch patterns collection. More...
 
enum SUResult SUHatchPatternsGetAll (SUHatchPatternsRef hatch_patterns, size_t len, SUHatchPatternRef items[], size_t *count)
 Retrieves the hatch patterns in a hatch patterns collection. More...
 
enum SUResult SUHatchPatternsGetHatchPatternByName (SUHatchPatternsRef hatch_patterns, const char *name, SUHatchPatternRef *hatch_pattern)
 Retrieves a hatch pattern from a hatch patterns collection by name. More...
 
enum SUResult SUHatchPatternsGetSelectedHatchPattern (SUHatchPatternsRef hatch_patterns, SUHatchPatternRef *hatch_pattern)
 Retrieves the selected hatch pattern of a hatch patterns collection. More...
 
enum SUResult SUHatchPatternsSetSelectedHatchPattern (SUHatchPatternsRef hatch_patterns, SUHatchPatternRef hatch_pattern)
 Sets the selected hatch pattern of a hatch patterns collection. More...
 
enum SUResult SUHatchPatternsAdd (SUHatchPatternsRef hatch_patterns, SUHatchPatternRef hatch_pattern)
 Adds a hatch pattern to a hatch patterns collection. More...
 
enum SUResult SUHatchPatternsRemove (SUHatchPatternsRef hatch_patterns, SUHatchPatternRef *hatch_pattern)
 Removes a hatch pattern from a hatch patterns collection. More...
 
enum SUResult SUHatchPatternsPurgeUnused (SUHatchPatternsRef hatch_patterns)
 Removes the hatch patterns that are not referenced by any entity. More...
 

Detailed Description

A model's collection of hatch patterns.

Obtained from SUModelGetHatchPatterns(). The collection is owned by the model and must not be released.

Since
SketchUp 2027.0, API 15.0

Friends And Related Function Documentation

enum SUResult SUHatchPatternsAdd ( SUHatchPatternsRef  hatch_patterns,
SUHatchPatternRef  hatch_pattern 
)
related

Adds a hatch pattern to a hatch patterns collection.

Note
Ownership transfers to the collection only when this function returns SU_ERROR_NONE. On success the caller must not call SUHatchPatternRelease() on hatch_pattern. On any failure the caller retains ownership and remains responsible for releasing hatch_pattern.

Names must be unique within the collection, compared case insensitively.

Since
SketchUp 2027.0, API 15.0
Parameters
[in]hatch_patternsThe hatch patterns collection object.
[in]hatch_patternThe hatch pattern to add.
Returns
enum SUResult SUHatchPatternsGetAll ( SUHatchPatternsRef  hatch_patterns,
size_t  len,
SUHatchPatternRef  items[],
size_t *  count 
)
related

Retrieves the hatch patterns in a hatch patterns collection.

Since
SketchUp 2027.0, API 15.0
Parameters
[in]hatch_patternsThe hatch patterns collection object.
[in]lenThe number of hatch patterns to retrieve.
[out]itemsThe hatch patterns retrieved.
[out]countThe number of hatch patterns retrieved.
Returns
enum SUResult SUHatchPatternsGetCount ( SUHatchPatternsRef  hatch_patterns,
size_t *  count 
)
related

Retrieves the number of hatch patterns in a hatch patterns collection.

Since
SketchUp 2027.0, API 15.0
Parameters
[in]hatch_patternsThe hatch patterns collection object.
[out]countThe number of hatch patterns.
Returns
enum SUResult SUHatchPatternsGetHatchPatternByName ( SUHatchPatternsRef  hatch_patterns,
const char *  name,
SUHatchPatternRef *  hatch_pattern 
)
related

Retrieves a hatch pattern from a hatch patterns collection by name.

The comparison is case insensitive, matching how the collection enforces name uniqueness.

Since
SketchUp 2027.0, API 15.0
Parameters
[in]hatch_patternsThe hatch patterns collection object.
[in]nameThe name to look for. Assumed to be UTF-8 encoded.
[out]hatch_patternThe hatch pattern retrieved.
Returns
enum SUResult SUHatchPatternsGetSelectedHatchPattern ( SUHatchPatternsRef  hatch_patterns,
SUHatchPatternRef *  hatch_pattern 
)
related

Retrieves the selected hatch pattern of a hatch patterns collection.

The selection is the pattern the UI applies to newly created section fills. It is not persisted with the model.

Since
SketchUp 2027.0, API 15.0
Parameters
[in]hatch_patternsThe hatch patterns collection object.
[out]hatch_patternThe hatch pattern retrieved.
Returns
enum SUResult SUHatchPatternsPurgeUnused ( SUHatchPatternsRef  hatch_patterns)
related

Removes the hatch patterns that are not referenced by any entity.

Any ref to a purged hatch pattern is stale after this call and must not be used or released.

Since
SketchUp 2027.0, API 15.0
Parameters
[in]hatch_patternsThe hatch patterns collection object.
Returns
enum SUResult SUHatchPatternsRemove ( SUHatchPatternsRef  hatch_patterns,
SUHatchPatternRef *  hatch_pattern 
)
related

Removes a hatch pattern from a hatch patterns collection.

Entities referencing the removed hatch pattern have their pattern cleared. hatch_pattern is set to an invalid reference on success and must not be used or released afterward.

Since
SketchUp 2027.0, API 15.0
Parameters
[in]hatch_patternsThe hatch patterns collection object.
[in,out]hatch_patternThe hatch pattern to remove.
Returns
enum SUResult SUHatchPatternsSetSelectedHatchPattern ( SUHatchPatternsRef  hatch_patterns,
SUHatchPatternRef  hatch_pattern 
)
related

Sets the selected hatch pattern of a hatch patterns collection.

Since
SketchUp 2027.0, API 15.0
Parameters
[in]hatch_patternsThe hatch patterns collection object.
[in]hatch_patternThe hatch pattern to select. Must belong to this collection.
Returns

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