# How to place a text object in center of a closed polyline? When I set center’s coordinates as the position of the text, the text is placed starting from this point to the right.

 1. [FAQ](/faq)
2. »
3. [Text and Font Questions](/faq/text-and-font-questions)

Use pText-&gt;setAlignmentPoint(OdGePoint3d(outlineCenter.x() , outlineCenter.y(), outlineCenter.z())) and set text alignment by next way

```
pText->setHorizontalMode(OdDb::TextHorzMode::kTextCenter );
pText->setVerticalMode(OdDb::TextVertMode::kTextVertMid) ;
```

Method adjustAlignment(); is called while text entity is closed but may be called directly after append in block

```
m_blockTableRecordPtr->appendOdDbEntity(pText); 
pText->adjustAlignment(NULL);

```
