SketchUp SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
entity.h File Reference
#include <slapi/slapi.h>
#include <slapi/model/defs.h>

Go to the source code of this file.

Functions

SU_EXPORT enum SURefType SUEntityGetType (SUEntityRef entity)
 Returns the concrete type of the given entity. More...
 
SU_RESULT SUEntityGetID (SUEntityRef entity, int32_t *entity_id)
 Retrieves the id of the entity. More...
 
SU_RESULT SUEntityGetNumAttributeDictionaries (SUEntityRef entity, size_t *count)
 Retrieves the number of attribute dictionaries of an entity. More...
 
SU_RESULT SUEntityGetAttributeDictionaries (SUEntityRef entity, size_t len, SUAttributeDictionaryRef dictionaries[], size_t *count)
 Retrieves the attribute dictionaries of an entity. More...
 
SU_RESULT SUEntityGetAttributeDictionary (SUEntityRef entity, const char *name, SUAttributeDictionaryRef *dictionary)
 Retrieves the attribute dictionary of an entity that has the given name. More...
 

Function Documentation

SU_RESULT SUEntityGetAttributeDictionaries ( SUEntityRef  entity,
size_t  len,
SUAttributeDictionaryRef  dictionaries[],
size_t *  count 
)

Retrieves the attribute dictionaries of an entity.

Parameters
[in]entityThe entity.
[in]lenThe number of attribute dictionaries to retrieve.
[out]dictionariesThe dictionaries retrieved.
[out]countThe number of dictionaries retrieved.
Returns
SU_RESULT SUEntityGetAttributeDictionary ( SUEntityRef  entity,
const char *  name,
SUAttributeDictionaryRef dictionary 
)

Retrieves the attribute dictionary of an entity that has the given name.

If a dictionary with the given name does not exist, one is added to the entity.

Parameters
[in]entityThe entity.
[in]nameThe name of the retrieved attribute dictionary. Assumed to be UTF-8 encoded.
[out]dictionaryThe destination of the retrieved dictionary object.
Returns
SU_RESULT SUEntityGetID ( SUEntityRef  entity,
int32_t *  entity_id 
)

Retrieves the id of the entity.

Parameters
[in]entityThe entity.
[out]entity_idThe id retrieved.
Returns
SU_RESULT SUEntityGetNumAttributeDictionaries ( SUEntityRef  entity,
size_t *  count 
)

Retrieves the number of attribute dictionaries of an entity.

Parameters
[in]entityThe entity.
[out]countThe number of attribute dictionaries.
Returns
SU_EXPORT enum SURefType SUEntityGetType ( SUEntityRef  entity)

Returns the concrete type of the given entity.

Parameters
[in]entityThe entity.
Returns
  • The concrete type of the given entity reference.
  • SURefType_Unknown if entity is not valid.