After using TextBlockPtr to create a text node, we want to get the actual width and height of the created text node. But we can't find any useful functions within TextBlock class
Any idea how to get the actual width and height of an existing text element?
TextBlockPtr textBlock = TextBlock::Create(*tbProps, *paraProps, *runProps, *ISessionMgr::GetActiveDgnModelP());
textBlock->SetProperties(*tbProps);
textBlock->SetUserOrigin(insPt);
textBlock->AppendText(_T("Hello World!"));
EditElementHandle textElm;
if (TEXTBLOCK_TO_ELEMENT_RESULT_Success != TextHandlerBase::CreateElement(textElm, NULL, *textBlock))
{
CString sMsgInfo;
sMsgInfo.Format(_T("Can't create text element."));
mdlDialog_openInfoBox(sMsgInfo);
return FALSE;
}
//how to get the actual height of the created text node? Especially when we specified the width of the text node and the text node is wrapped to multi-lines.