# Markup definition

> 4.0

The `A3DMkpAnnotationItemData`structure references an `A3DMkpMarkup`. This markup contains tessellation, leaders, and linked item information that is available by using the function `A3DMkpMarkupGet()`. In addition this markup can contain also definition and specific data. Those data are stored in common structure `A3DMarkupDefinitionData`and in a specific structure corresponding to the type return by the function `A3DEntityGetType()`. For the structures corresponding to markups with definition, only access functions are defined. In other words, the customer can only create `A3DMkpMarkup`.

The following illustration shows the available methods to retrieve all the data.In yellow, the data stored in the structure; in blue, the access function defined for corresponding structure.

Here, it samples of the two ways to obtain markup data. In the first case, the markup contains only a tessellation, a type, and a sub type, in the second case, considering a markup text creation, the markup contains specific data (text, text properties (font…), position definition, display options, with a tessellation, a type, and a sub type.

See the following sample code:

    //markupdata

    A3DEEntityTypeeType;
    A3DInt32iRet=A3DEntityGetType(pMarkup,&eType);
    //if(iRet!=A3D_SUCCESS)exit
    if(eType==kA3DTypeMkpMarkup)
    {
    //nodefinitionisset,noinformationtoretrieve
    //terminate...
    }

    //markupdefinitiondata

    A3DMarkupDefinitionDatasDataDefinition=A3D_MAKE_DATA(A3DMarkupDefinitionData);
    A3DInt32iRet=A3DMarkupDefinitionGet((A3DMarkupDefinition*)pMarkup,&sDataDefinition);//sDataDefinitioncontainsbasicdefinitioninformation

    //specificdata

    A3DMarkupTextDatasTextData;
    A3DMarkupDimensionDatasDimensionData;
    switch(eType)
    {
    casekA3DTypeMarkupText:
    {
    A3DMarkupTextDatasTextData=A3D_MAKE_DATA(A3DMarkupTextData);
    A3DInt32iRet=A3DMarkupTextGet((A3DMarkupText*)pMarkup,&sTextData);
    break;
    }
    casekA3DTypeMarkupDimension:
    {
    A3DMarkupDimensionDatasDimensionData=A3D_MAKE_DATA(A3DMarkupDimensionData);
    A3DInt32iRet=A3DMarkupTextGet((A3DMarkupDimension*)pMarkup,&sDimensionData);
    break;
    }
    casekA3DTypeMarkupGDT:
    {
    A3DMarkupGDTDatasGDTData=A3D_MAKE_DATA(A3DMarkupGDTData);
    A3DInt32iRet=A3DMarkupGDTGet((A3DMarkupGDT*)pMarkup,&sGDTData);
    break;
    }
    ...samethingforalltypes

    default:
    break;

    }

Parameters

> pMarkupDefinition: is the markup.

> pIsScreenLocation: true if the position of the markup is a screen position.

> pPosition: is the 2D position of the markup.

> pOffsetAnchorPoint: is the offset of position of the markup.

Returns

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

Topics

- Position definition
- Notes
- Dimension
- Tolerance
- Symbols
- Welding

Structures

- `A3DMDTextPropertiesData`
- `A3DMarkupDefinitionData`

Enumerations

- `A3DEMDMarkupDisplayType`
- `A3DEMDTextPropertiesScore`
- `A3DEMDTextPropertiesFormat`
- `A3DEMDTextPropertiesJustification`

Functions

- `A3DMDTextPropertiesGet()`
- `A3DMarkupDefinitionGet()`
- `A3DMarkupPositionIsScreenLocation()`
- `A3DMDTextPropertiesCreate()`
- `A3DMDTextPositionCreate()`
- `A3DMDLeaderDefinitionSet()`
- `A3DMarkupDefinitionSet()`

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...