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

RE: [CONNECT C++] Programatically build text string containing the "plus/minus" symbol

$
0
0

Hi Bruce,

I was testing the behavior using these lines of code:

	DgnModelP model = ISessionMgr::GetActiveDgnModelP();
	TextBlockPropertiesPtr tbProps = TextBlockProperties::Create(*model);
	ParagraphPropertiesPtr paraProps = ParagraphProperties::Create(*model);
	RunPropertiesPtr runProps = RunProperties::Create(*DgnTextStyle::GetActive(), *model);
	TextBlockPtr textBlock = TextBlock::Create(*tbProps, *paraProps, *runProps, *model);   // create textBlock using active textstyle settings

	textBlock->AppendText(L"PlusMinus: ");
	textBlock->AppendText(L"\xB1");   //char 177
	EditElementHandle textElm;
	if (TEXTBLOCK_TO_ELEMENT_RESULT_Success == TextHandlerBase::CreateElement(textElm, NULL, *textBlock))
	{
		textElm.AddToModel();
	}

This also should be applicable for other characters.

I hope this helps?

Best regards,
Artur


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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