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

References a Tag Folder object. More...

#include <SketchUpAPI/model/layer_folder.h>

Related Functions

(Note that these are not member functions.)

SUEntityRef SULayerFolderToEntity (SULayerFolderRef layer_folder)
 Converts from an SULayerFolderRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SULayerFolderRef SULayerFolderFromEntity (SUEntityRef entity)
 Converts from an SUEntityRef to an SULayerFolderRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SULayerFolderRef. More...
 
enum SUResult SULayerFolderCreate (SULayerFolderRef *layer_folder, const char *name)
 Creates a new layer folder object with the given name. More...
 
enum SUResult SULayerFolderRelease (SULayerFolderRef *layer_folder)
 Deallocates a layer folder object. More...
 
enum SUResult SULayerFolderGetName (SULayerFolderRef layer_folder, SUStringRef *name)
 Retrieves the name of a layer folder object. More...
 
enum SUResult SULayerFolderSetName (SULayerFolderRef layer_folder, const char *name)
 Assigns the name of a layer folder object. More...
 
enum SUResult SULayerFolderGetVisibility (SULayerFolderRef layer_folder, bool *visible)
 Retrieves the boolean flag indicating whether a layer folder object is visible. More...
 
enum SUResult SULayerFolderSetVisibility (SULayerFolderRef layer_folder, bool visible)
 Sets the boolean flag indicating whether a layer folder object is visible. More...
 
enum SUResult SULayerGroupGetVisibleOnNewScenes (SULayerFolderRef layer_folder, bool *visible)
 Retrieves the boolean flag indicating whether a layer folder object is visible by default on new scenes. More...
 
enum SUResult SULayerGroupSetVisibleOnNewScenes (SULayerFolderRef layer_folder, bool visible)
 Sets the boolean flag indicating whether a layer folder object is visible by default on new scenes. More...
 
enum SUResult SULayerFolderAddLayer (SULayerFolderRef layer_folder, SULayerRef layer)
 Adds a layer to the given layer folder. More...
 
enum SUResult SULayerFolderRemoveLayer (SULayerFolderRef layer_folder, SULayerRef layer)
 Removes a layer from the given layer folder. More...
 
enum SUResult SULayerFolderGetNumLayers (SULayerFolderRef layer_folder, size_t *count)
 Gets the number of layers that layer_folder contains. More...
 
enum SUResult SULayerFolderGetLayers (SULayerFolderRef layer_folder, size_t len, SULayerRef *layers, size_t *count)
 Gets the layers that are in the layer_folder. More...
 
enum SUResult SULayerFolderAddLayerFolder (SULayerFolderRef layer_folder, SULayerFolderRef add_folder)
 Adds a SULayerFolderRef object to the given layer folder. More...
 
enum SUResult SULayerFolderGetNumLayerFolders (SULayerFolderRef layer_folder, size_t *count)
 Gets the number of SULayerFolderRef objects that are direct children of the given layer folder object. More...
 
enum SUResult SULayerFolderGetLayerFolders (SULayerFolderRef layer_folder, size_t len, SULayerFolderRef *layer_folders, size_t *count)
 Gets the SULayerFolderRef objects that are direct children of the given layer folder object. More...
 
enum SUResult SULayerFolderGetParentLayerFolder (SULayerFolderRef layer_folder, SULayerFolderRef *parent)
 Gets the SULayerFolderRef object that contains the given layer folder. More...
 

Detailed Description

References a Tag Folder object.

Note
'Layer' is a legacy term that is being used for consistency within the API.
Since
SketchUp 2021.0, API 9.0

Friends And Related Function Documentation

enum SUResult SULayerFolderAddLayer ( SULayerFolderRef  layer_folder,
SULayerRef  layer 
)
related

Adds a layer to the given layer folder.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[in]layerThe layer to add.
Returns
enum SUResult SULayerFolderAddLayerFolder ( SULayerFolderRef  layer_folder,
SULayerFolderRef  add_folder 
)
related

Adds a SULayerFolderRef object to the given layer folder.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe parent layer folder.
[in]add_folderThe layer folder to add.
Returns
enum SUResult SULayerFolderCreate ( SULayerFolderRef layer_folder,
const char *  name 
)
related

Creates a new layer folder object with the given name.

Layer Folders associated with a SketchUp model must not be explicitly deallocated. Layer folders that are not associated with a SketchUp model must be deallocated with SULayerFolderRelease().

Note
Layer folder names do not need to be unique, but they can not be empty.
Since
SketchUp 2021.0, API 9.0
Parameters
[out]layer_folderThe layer folder object created.
[in]nameThe desired layer folder name. Assumed to be UTF-8 encoded.
Returns
SULayerFolderRef SULayerFolderFromEntity ( SUEntityRef  entity)
related

Converts from an SUEntityRef to an SULayerFolderRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SULayerFolderRef.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]entityThe given entity reference.
Returns
  • The converted SULayerFolderRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
enum SUResult SULayerFolderGetLayerFolders ( SULayerFolderRef  layer_folder,
size_t  len,
SULayerFolderRef layer_folders,
size_t *  count 
)
related

Gets the SULayerFolderRef objects that are direct children of the given layer folder object.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[in]lenThe number of elements in layer_folders.
[out]layer_foldersAn array of layer folder objects.
[out]countThe number of elements written into layer_folders.
Returns
enum SUResult SULayerFolderGetLayers ( SULayerFolderRef  layer_folder,
size_t  len,
SULayerRef layers,
size_t *  count 
)
related

Gets the layers that are in the layer_folder.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[in]lenThe number of elements in the layers array.
[out]layersThe layers that are in the layer folder.
[out]countThe number of layers read into the layers array.
Returns
enum SUResult SULayerFolderGetName ( SULayerFolderRef  layer_folder,
SUStringRef name 
)
related

Retrieves the name of a layer folder object.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[out]nameThe name retrieved.
Returns
enum SUResult SULayerFolderGetNumLayerFolders ( SULayerFolderRef  layer_folder,
size_t *  count 
)
related

Gets the number of SULayerFolderRef objects that are direct children of the given layer folder object.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[out]countThe number of layer folder objects that are direct children.
Returns
enum SUResult SULayerFolderGetNumLayers ( SULayerFolderRef  layer_folder,
size_t *  count 
)
related

Gets the number of layers that layer_folder contains.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[out]countThe number of layers.
Returns
enum SUResult SULayerFolderGetParentLayerFolder ( SULayerFolderRef  layer_folder,
SULayerFolderRef parent 
)
related

Gets the SULayerFolderRef object that contains the given layer folder.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[out]parentThe retrieved parent layer folder object.
Returns
enum SUResult SULayerFolderGetVisibility ( SULayerFolderRef  layer_folder,
bool *  visible 
)
related

Retrieves the boolean flag indicating whether a layer folder object is visible.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[out]visibleThe visibility flag retrieved.
Returns
enum SUResult SULayerFolderRelease ( SULayerFolderRef layer_folder)
related

Deallocates a layer folder object.

The layer folder object to be deallocated must not be associated with a SketchUp model.

Note
To release a SULayerFolderRef that is owned by a model you should use SUModelRemoveLayerFolders().
Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
Returns
enum SUResult SULayerFolderRemoveLayer ( SULayerFolderRef  layer_folder,
SULayerRef  layer 
)
related

Removes a layer from the given layer folder.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[in]layerThe layer to remove.
Returns
enum SUResult SULayerFolderSetName ( SULayerFolderRef  layer_folder,
const char *  name 
)
related

Assigns the name of a layer folder object.

Note
Layer folder names do not need to be unique, but they can not be empty.
Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[in]nameThe new name of the layer folder object. Assumed to be UTF-8 encoded.
Returns
enum SUResult SULayerFolderSetVisibility ( SULayerFolderRef  layer_folder,
bool  visible 
)
related

Sets the boolean flag indicating whether a layer folder object is visible.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[in]visibleThe visibility flag to set.
Returns
SUEntityRef SULayerFolderToEntity ( SULayerFolderRef  layer_folder)
related

Converts from an SULayerFolderRef to an SUEntityRef. This is essentially an upcast operation.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe given layer folder reference.
Returns
  • The converted SUEntityRef if layer_folder is a valid layer folder
  • If not, the returned reference will be invalid
enum SUResult SULayerGroupGetVisibleOnNewScenes ( SULayerFolderRef  layer_folder,
bool *  visible 
)
related

Retrieves the boolean flag indicating whether a layer folder object is visible by default on new scenes.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[out]visibleThe visibility flag retrieved.
See Also
SUSceneLayerFolders()
Returns
enum SUResult SULayerGroupSetVisibleOnNewScenes ( SULayerFolderRef  layer_folder,
bool  visible 
)
related

Sets the boolean flag indicating whether a layer folder object is visible by default on new scenes.

Since
SketchUp 2021.0, API 9.0
Parameters
[in]layer_folderThe layer folder object.
[in]visibleThe visibility flag to set.
See Also
SUSceneAddLayerFolder()
SUSceneRemoveLayerFolder()
Returns

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