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

References a group object. More...

#include <SketchUpAPI/model/group.h>

Inherits SUComponentInstanceRef.

Related Functions

(Note that these are not member functions.)

SUEntityRef SUGroupToEntity (SUGroupRef group)
 Converts from an SUGroupRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SUGroupRef SUGroupFromEntity (SUEntityRef entity)
 Converts from an SUEntityRef to an SUGroupRef. This is essentially a downcast operation so the given entity must be convertible to an SUGroupRef. More...
 
SUDrawingElementRef SUGroupToDrawingElement (SUGroupRef group)
 Converts from an SUGroupRef to an SUDrawingElementRef. This is essentially an upcast operation. More...
 
SUGroupRef SUGroupFromDrawingElement (SUDrawingElementRef drawing_elem)
 Converts from an SUDrawingElementRef to an SUGroupRef. This is essentially a downcast operation so the given element must be convertible to an SUGroupRef. More...
 
SUComponentInstanceRef SUGroupToComponentInstance (SUGroupRef group)
 Converts from an SUGroupRef to an SUComponentInstanceRef. This is essentially an upcast operation. More...
 
SUGroupRef SUGroupFromComponentInstance (SUComponentInstanceRef component_inst)
 Converts from an SUComponentInstanceRef to an SUGroupRef. This is essentially a downcast operation so the given element must be convertible to an SUGroupRef. More...
 
enum SUResult SUGroupCreate (SUGroupRef *group)
 Creates a new group object. More...
 
enum SUResult SUGroupSetName (SUGroupRef group, const char *name)
 Sets the name of a group object. More...
 
enum SUResult SUGroupGetName (SUGroupRef group, SUStringRef *name)
 Retrieves the name of a group object. More...
 
enum SUResult SUGroupGetGuid (SUGroupRef group, SUStringRef *guid)
 Retrieves the globally unique identifier (guid) string of a group object. More...
 
enum SUResult SUGroupSetGuid (SUGroupRef group, const char *guid_str)
 Sets the globally unique identifier (guid) string of a group object. More...
 
enum SUResult SUGroupSetTransform (SUGroupRef group, const struct SUTransformation *transform)
 Sets the transform of a group object. More...
 
enum SUResult SUGroupGetTransform (SUGroupRef group, struct SUTransformation *transform)
 Retrieves the transform of a group object. More...
 
enum SUResult SUGroupGetEntities (SUGroupRef group, SUEntitiesRef *entities)
 Retrieves the entities of the group object. More...
 

Detailed Description

References a group object.

Friends And Related Function Documentation

enum SUResult SUGroupCreate ( SUGroupRef group)
related

Creates a new group object.

The created group must be subsequently added to the Entities of a model, component definition or a group. Use SUModelRemoveComponentDefinitions() to remove the group from a model.

Parameters
[out]groupThe group object created.
Returns
SUGroupRef SUGroupFromComponentInstance ( SUComponentInstanceRef  component_inst)
related

Converts from an SUComponentInstanceRef to an SUGroupRef. This is essentially a downcast operation so the given element must be convertible to an SUGroupRef.

Since
SketchUp 2016, API 4.0
Parameters
[in]component_instThe given component instance reference.
Returns
  • The converted SUGroupRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
SUGroupRef SUGroupFromDrawingElement ( SUDrawingElementRef  drawing_elem)
related

Converts from an SUDrawingElementRef to an SUGroupRef. This is essentially a downcast operation so the given element must be convertible to an SUGroupRef.

Parameters
[in]drawing_elemThe given element reference.
Returns
  • The converted SUGroupRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
SUGroupRef SUGroupFromEntity ( SUEntityRef  entity)
related

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

Parameters
[in]entityThe given entity reference.
Returns
  • The converted SUGroupRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
enum SUResult SUGroupGetEntities ( SUGroupRef  group,
SUEntitiesRef entities 
)
related

Retrieves the entities of the group object.

Parameters
[in]groupThe group object.
[out]entitiesThe entities retrieved.
Returns
enum SUResult SUGroupGetGuid ( SUGroupRef  group,
SUStringRef guid 
)
related

Retrieves the globally unique identifier (guid) string of a group object.

Since
SketchUp 2015, API 3.0
Parameters
[in]groupThe group object.
[out]guidThe guid retrieved.
Returns
enum SUResult SUGroupGetName ( SUGroupRef  group,
SUStringRef name 
)
related

Retrieves the name of a group object.

Parameters
[in]groupThe group object.
[out]nameThe name retrieved.
Returns
enum SUResult SUGroupGetTransform ( SUGroupRef  group,
struct SUTransformation transform 
)
related

Retrieves the transform of a group object.

See description of SUGroupSetTransform for a discussion of group transforms.

Parameters
[in]groupThe group object.
[out]transformThe transform retrieved.
Returns
enum SUResult SUGroupSetGuid ( SUGroupRef  group,
const char *  guid_str 
)
related

Sets the globally unique identifier (guid) string of a group object.

Since
SketchUp 2015, API 3.0
Parameters
[in]groupThe group object.
[in]guid_strThe utf-8 formatted guid string.
Returns
enum SUResult SUGroupSetName ( SUGroupRef  group,
const char *  name 
)
related

Sets the name of a group object.

Parameters
[in]groupThe group object.
[in]nameThe name string to set the group object. Assumed to be UTF-8 encoded.
Returns
enum SUResult SUGroupSetTransform ( SUGroupRef  group,
const struct SUTransformation transform 
)
related

Sets the transform of a group object.

The transform is relative to the parent component. If the parent component is the root component of a model, then the transform is relative to absolute coordinates.

Parameters
[in]groupThe group object.
[in]transformThe affine transform to set.
Returns
SUComponentInstanceRef SUGroupToComponentInstance ( SUGroupRef  group)
related

Converts from an SUGroupRef to an SUComponentInstanceRef. This is essentially an upcast operation.

Since
SketchUp 2016, API 4.0
Parameters
[in]groupThe given group reference.
Returns
  • The converted SUComponentInstanceRef if group is a valid group
  • If not, the returned reference will be invalid
SUDrawingElementRef SUGroupToDrawingElement ( SUGroupRef  group)
related

Converts from an SUGroupRef to an SUDrawingElementRef. This is essentially an upcast operation.

Parameters
[in]groupThe given group reference.
Returns
  • The converted SUDrawingElementRef if group is a valid group
  • If not, the returned reference will be invalid
SUEntityRef SUGroupToEntity ( SUGroupRef  group)
related

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

Parameters
[in]groupThe given group reference.
Returns
  • The converted SUEntityRef if group is a valid group
  • If not, the returned reference will be invalid

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