Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[CONNECT C++] Text/properties/formatting

$
0
0

Hi,

I used "textblock" created a string of text. I found out that the text length and width are zero (from text property/formatting).

I used following code.

		TextBlockPropertiesPtr tbProps = TextBlockProperties::Create(*ISessionMgr::GetActiveDgnModelP());
		ParagraphPropertiesPtr paraProps = ParagraphProperties::Create(*ISessionMgr::GetActiveDgnModelP());
		RunPropertiesPtr runProps = RunProperties::Create(*DgnTextStyle::GetActive(), *ISessionMgr::GetActiveDgnModelP());
		tbProps->SetIsViewIndependent(true);
		paraProps->SetJustification(TextElementJustification::LeftBaseline);

		runProps->SetColor(Color);
		runProps->SetFontSize(fontSize);
		runProps->SetFont(*pDGNFont);
		TextBlockPtr textBlock = TextBlock::Create(*tbProps, *paraProps, *runProps, *ISessionMgr::GetActiveDgnModelP());

......
            textBlock->SetUserOrigin(Point);
            textBlock->SetOrientation(Matrix);
            textBlock->AppendText(WTxtString); .....

How can I set the text width and height.

Thanks,


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>