# Entity Base

Creates and accesses a hierarchy of descriptive names and modeller data that can be applied to any PRC entity.

Entity type is `kA3DTypeRootBase`

This module lets you create a hierarchy of descriptive names and modeller data (called root-level attributes) that can be applied to any PRC entity. These attributes are packaged as an `A3DRootBase`entity that is referenced from the PRC entity they describe.

The following sample code shows how to create root-level attributes for any PRC entity. In this case, the attributes include modeller data. For restrictions on specifying modeller data, see `A3DMiscAttributeData`.

    A3DVoidsetAttributes(A3DEntity*p)
    {
    A3DMiscAttribute*pAttr[3];

    A3DMiscSingleAttributeDataSingle=A3D_MAKE_DATA(A3DMiscSingleAttributeData);

    Single.m_eType=kA3DModellerAttributeTypeString;
    Single.m_pcTitle="Title";
    Single.m_pcData="SimpleB-repbuildingdemonstration";

    A3DMiscAttributeDatasAttribs=A3D_MAKE_DATA(A3DMiscAttributeData);

    sAttribs.m_pcTitle=Single.m_pcTitle;
    sAttribs.m_asSingleAttributesData=&Single;
    sAttribs.m_uiSize=1;
    A3DInt32iRet=A3DMiscAttributeCreate(&sAttribs,&pAttr[0]);

    Single.m_pcTitle="Author";
    Single.m_pcData="HOOPSExchange";
    sAttribs.m_pcTitle=Single.m_pcTitle;
    iRet=A3DMiscAttributeCreate(&sAttribs,&pAttr[1]);

    Single.m_pcTitle="Company";
    Single.m_pcData="TechSoft3D";
    sAttribs.m_pcTitle=Single.m_pcTitle;
    iRet=A3DMiscAttributeCreate(&sAttribs,&pAttr[2]);

    A3DRootBaseDatasRootData=A3D_MAKE_DATA(A3DRootBaseData);

    sRootData.m_pcName="Trimmedsurface";
    sRootData.m_ppAttributes=pAttr;
    sRootData.m_uiSize=3;
    iRet=A3DRootBaseSet(p,&sRootData);

    //cleaninguptheallocatedattributes
    for(A3DUns32i=0;i<sRootData.m_uiSize;++i)
    {
    A3DEntityDelete(sRootData.m_ppAttributes[i]);
    }
    }

The following illustration shows the result of the sample code.

The sample code creates an `A3DRootBase`entity that houses three `A3DMiscAttribute`entities, each of which reference an `A3DMiscSingleAttributeData`structure. Each `A3DMiscSingleAttributeData`structure provides modeller data of type `kA3DModellerAttributeTypeString`.

> Root Type Declarations

Returns

> `A3D_SUCCESS`on success, or an error code on failure

Topics

- Miscellaneous Attribute Entity

Structures

- `A3DRootBaseData`

Functions

- `A3DRootBaseGet()`
- `A3DRootBaseSet()`
- `A3DRootBaseAttributeRemoveAll()`
- `A3DRootBaseAttributeRemove()`
- `A3DRootBaseAttributeRemoveAt()`
- `A3DRootBaseAttributeAppend()`
- `A3DRootBaseAttributeAdd()`

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Exchange in your own language, or choose a sample question below to start a conversation:

What is HOOPS Exchange?
What are the latest release notes for HOOPS Exchange?
How do I start evaluating HOOPS Exchange?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...