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

RE: [CONNECT C++] Modifying Existing Text Parameters

$
0
0

Working a little more on this, I can now get the Annotation Scale (previously set to 2.0) of the model to apply to the text item:

ITextPartIdPtr		textPart;
TextBlockPtr		textBlock = textQueryHandler->GetTextPart(eehText, *textPart);
TextBlockPtr		newTextBlock=textBlock->Clone();
DPoint2dCR		scale = { 0.5, 0.5 };
newTextBlock->GetRunPropertiesForAddR().ApplyScale(scale, false);
eehText.Invalidate();
if (TEXTBLOCK_TO_ELEMENT_RESULT_Success != TextHandlerBase::CreateElement(eehText, nullptr, *newTextBlock))
	printf("Text creation error\n");
IAnnotationHandler		*annoHandler = dynamic_cast<IAnnotationHandler*>(&eehText.GetHandler());
StatusInt	iStatus = annoHandler->AddAnnotationScale(eehText, ACTIVEMODEL);

but ApplyScale() doesn't seem to be doing anything...The text item gets an Annotation Scale of 2 applied to it, but the text is NOT reduced in size by 2.0, so instead of the text now displaying the same size (as before the modification), it is twice as large.

 

Bruce


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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