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

An instance path type that provides a wrapping of a data structure of component instances. More...

#include <SketchUpAPI/model/instancepath.h>

Related Functions

(Note that these are not member functions.)

enum SUResult SUInstancePathCreate (SUInstancePathRef *instance_path)
 Creates an instance path object. More...
 
enum SUResult SUInstancePathCreateCopy (SUInstancePathRef *instance_path, SUInstancePathRef source_path)
 Creates a copy of an instance path object. More...
 
enum SUResult SUInstancePathRelease (SUInstancePathRef *instance_path)
 Releases an instance path object. More...
 
enum SUResult SUInstancePathPushInstance (SUInstancePathRef instance_path, SUComponentInstanceRef component_instance)
 Pushes a SUComponentInstanceRef to an SUInstancePathRef. More...
 
enum SUResult SUInstancePathPopInstance (SUInstancePathRef instance_path)
 Pops the last SUComponentInstanceRef from an SUInstancePathRef. More...
 
enum SUResult SUInstancePathSetLeaf (SUInstancePathRef instance_path, SUEntityRef entity)
 Sets a SUEntityRef to an SUInstancePathRef. More...
 
enum SUResult SUInstancePathGetPathDepth (SUInstancePathRef instance_path, size_t *depth)
 Gets a path depth for SUInstancePathRef. It only counts the component instances in the path, so the leaf node is not counted. More...
 
enum SUResult SUInstancePathGetFullDepth (SUInstancePathRef instance_path, size_t *full_depth)
 Gets the full path depth (including the leaf) for SUInstancePathRef. More...
 
enum SUResult SUInstancePathGetTransform (SUInstancePathRef instance_path, struct SUTransformation *transform)
 Gets the transform for SUInstancePathRef. More...
 
enum SUResult SUInstancePathGetTransformAtDepth (SUInstancePathRef instance_path, size_t depth, struct SUTransformation *transform)
 Gets the transform up to depth level for SUInstancePathRef. More...
 
enum SUResult SUInstancePathGetInstanceAtDepth (SUInstancePathRef instance_path, size_t depth, SUComponentInstanceRef *instance)
 Gets a component instance up to path depth level. More...
 
enum SUResult SUInstancePathGetLeafAsEntity (SUInstancePathRef instance_path, SUEntityRef *entity)
 Gets a leaf from an instance path as an entity object. More...
 
enum SUResult SUInstancePathGetLeaf (SUInstancePathRef instance_path, SUDrawingElementRef *drawing_element)
 Gets a leaf from an entity path as a drawing element object. More...
 
enum SUResult SUInstancePathIsValid (SUInstancePathRef instance_path, bool *valid)
 Validates an instance path. More...
 
enum SUResult SUInstancePathIsEmpty (SUInstancePathRef instance_path, bool *empty)
 Checks if an instance path is empty. More...
 
enum SUResult SUInstancePathContains (SUInstancePathRef instance_path, SUEntityRef entity, bool *contains)
 Checks if instance path contains a particular entity. More...
 
enum SUResult SUInstancePathGetPersistentID (SUInstancePathRef instance_path, SUStringRef *pid)
 Retrieves the full persistent id for a given instance path. More...
 
enum SUResult SUInstancePathGetPersistentIDAtDepth (SUInstancePathRef instance_path, size_t depth, SUStringRef *pid)
 Retrieves the persistent id of an entity up to depth level in a given instance path. More...
 

Detailed Description

An instance path type that provides a wrapping of a data structure of component instances.

Friends And Related Function Documentation

enum SUResult SUInstancePathContains ( SUInstancePathRef  instance_path,
SUEntityRef  entity,
bool *  contains 
)
related

Checks if instance path contains a particular entity.

Parameters
[in]instance_pathThe instance path object.
[in]entityThe entity object.
[out]containsWhether the instance path contains the entity or not.
Returns
enum SUResult SUInstancePathCreate ( SUInstancePathRef instance_path)
related

Creates an instance path object.

Parameters
[out]instance_pathThe instance path object created.
Returns
enum SUResult SUInstancePathCreateCopy ( SUInstancePathRef instance_path,
SUInstancePathRef  source_path 
)
related

Creates a copy of an instance path object.

Parameters
[out]instance_pathThe copy of instance path object.
[in]source_pathThe instance path to be copied.
Returns
enum SUResult SUInstancePathGetFullDepth ( SUInstancePathRef  instance_path,
size_t *  full_depth 
)
related

Gets the full path depth (including the leaf) for SUInstancePathRef.

Parameters
[in]instance_pathThe instance path object.
[out]full_depthThe depth of instance path object including the leaf (if it exists).
Returns
enum SUResult SUInstancePathGetInstanceAtDepth ( SUInstancePathRef  instance_path,
size_t  depth,
SUComponentInstanceRef instance 
)
related

Gets a component instance up to path depth level.

Parameters
[in]instance_pathThe instance path object.
[in]depthThe depth for getting drawing element up to.
[out]instanceThe component instance from instance path.
Returns
enum SUResult SUInstancePathGetLeaf ( SUInstancePathRef  instance_path,
SUDrawingElementRef drawing_element 
)
related

Gets a leaf from an entity path as a drawing element object.

Parameters
[in]instance_pathThe instance path object.
[out]drawing_elementThe leaf from an instance path.
Returns
enum SUResult SUInstancePathGetLeafAsEntity ( SUInstancePathRef  instance_path,
SUEntityRef entity 
)
related

Gets a leaf from an instance path as an entity object.

Parameters
[in]instance_pathThe instance path object.
[out]entityThe leaf from an instance path.
Returns
enum SUResult SUInstancePathGetPathDepth ( SUInstancePathRef  instance_path,
size_t *  depth 
)
related

Gets a path depth for SUInstancePathRef. It only counts the component instances in the path, so the leaf node is not counted.

Parameters
[in]instance_pathThe instance path object.
[out]depthThe depth of instance path object.
Returns
enum SUResult SUInstancePathGetPersistentID ( SUInstancePathRef  instance_path,
SUStringRef pid 
)
related

Retrieves the full persistent id for a given instance path.

Parameters
[in]instance_pathThe instance path.
[out]pidThe persistent id.
Returns
enum SUResult SUInstancePathGetPersistentIDAtDepth ( SUInstancePathRef  instance_path,
size_t  depth,
SUStringRef pid 
)
related

Retrieves the persistent id of an entity up to depth level in a given instance path.

Parameters
[in]instance_pathThe instance path.
[in]depthThe depth for getting persistent id up to.
[out]pidThe persistent id.
Returns
enum SUResult SUInstancePathGetTransform ( SUInstancePathRef  instance_path,
struct SUTransformation transform 
)
related

Gets the transform for SUInstancePathRef.

Parameters
[in]instance_pathThe instance path object.
[out]transformThe transform from instance path.
Returns
enum SUResult SUInstancePathGetTransformAtDepth ( SUInstancePathRef  instance_path,
size_t  depth,
struct SUTransformation transform 
)
related

Gets the transform up to depth level for SUInstancePathRef.

Parameters
[in]instance_pathThe instance path object.
[in]depthThe depth for getting transforms up to.
[out]transformThe transform from instance path.
Returns
enum SUResult SUInstancePathIsEmpty ( SUInstancePathRef  instance_path,
bool *  empty 
)
related

Checks if an instance path is empty.

Parameters
[in]instance_pathThe instance path object.
[out]emptyWhether the instance path is empty or not.
Returns
enum SUResult SUInstancePathIsValid ( SUInstancePathRef  instance_path,
bool *  valid 
)
related

Validates an instance path.

Parameters
[in]instance_pathThe instance path object.
[out]validWhether the instance path is valid or not.
Returns
enum SUResult SUInstancePathPopInstance ( SUInstancePathRef  instance_path)
related

Pops the last SUComponentInstanceRef from an SUInstancePathRef.

Parameters
[in]instance_pathThe instance path object.
Returns
enum SUResult SUInstancePathPushInstance ( SUInstancePathRef  instance_path,
SUComponentInstanceRef  component_instance 
)
related

Pushes a SUComponentInstanceRef to an SUInstancePathRef.

Parameters
[in]instance_pathThe instance path object.
[in]component_instanceThe component instance object.
Returns
enum SUResult SUInstancePathRelease ( SUInstancePathRef instance_path)
related

Releases an instance path object.

Parameters
[in]instance_pathThe instance path being released.
Returns
enum SUResult SUInstancePathSetLeaf ( SUInstancePathRef  instance_path,
SUEntityRef  entity 
)
related

Sets a SUEntityRef to an SUInstancePathRef.

Parameters
[in]instance_pathThe instance path object.
[in]entityThe the entity to be set as a leaf in instance path.
Returns

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