Deprecated List
Member Bentley::DgnPlatform::Extraction_Deprecated
Member IBeginPrintSetParam::GetEnableDynamicPlot () const =0
Obsolete; always False.
Member IEndPrintSetParam::GetEnableDynamicPlot () const =0
Obsolete; always False.
Member IPrintEngineCapability::GetEnableDynamicPlot () const =0
Obsolete; always False.
Member IPrintEngineCapability::SetEnableDynamicPlot (bool value)=0
Obsolete; has no effect.
Member mdlDependency_getAppendChanges ()
Member mdlDependency_getEager ()
Returns
true if eager post-processing is enabled
Member mdlDependency_getErrorLevel (void)
Member mdlDependency_getTrackingDisabled (void)
Member mdlDependency_setAppendChanges (bool bAppendChanges)
Member mdlDependency_setEager (bool bEager)
Member mdlDependency_setErrorLevel (int l)
Member mdlDependency_setTrackingDisabled (bool bSuppress)
Member mdlLevel_getLinkageHolder (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn)
- Use XAttributes to store custom data on level table entry element
Member mdlLevel_setLinkageHolder (DgnModelRefP modelRefIn, DgnPlatform::LevelId levelIdIn, MSElementP pLinkageHolderElementIn)
- Use XAttributes to store custom data on level table element
Member mdlLevelTable_getLinkageHolder (DgnModelRefP modelRefIn)
- Use XAttributes to store custom data on level table element
Member mdlLevelTable_setLinkageHolder (DgnModelRefP modelRefIn, MSElementP pLinkageHolderElementIn)
- Use XAttributes to store custom data on level table element
Member mdlRaster_eventGroupEnd (int eventMode)

Member mdlRaster_eventGroupStart (int eventMode, int commandName)

Member mdlText_addStringsToNodeDscr (MSElementDescrP in, WCharCP buffer)
It is recommended that you create a TextBlock out of the element, and append the string via this object.
ElementHandle eh (...);
TextBlockPtr textBlock = TextHandlerBase::GetFirstTextPartValue (eh);
if (!textBlock.IsValid ())
/* ERROR */
// Append the text...
// While Unicode strings are best, WString (buffer).c_str () can be used to create a Unicode string from a locale-encoded string using the system's active code page.
textBlock->AppendText (...);
textBlock->AppendParagraphBreak ();
textBlock->AppendLineBreak ();
textBlock->AppendTab ();
textBlock->AppendStackedFraction (...);
textBlock->AppendEnterDataField (...);
// Create the element...
EditElementHandle eeh;
if (TextBlock::TO_ELEMENT_RESULT_Success != TextHandlerBase::CreateElement (eeh, &eh, *textBlock))
/* ERROR */
// eeh now contains a text element (or node) that you can ReplaceInModel etc.
Remarks
Required Library: mdlbltin.lib
Member mdlText_changeElementFont (MSElementP u, TextStyleInfoP newTfs)
It is recommended that you use the edit properties interface. Aside from supporting all elements that contain fonts, it will correctly remap strings between encodings.
// Acquire the font object... some possibilities:
DgnFontCP newFont = DgnFontManager::FindSystemFont (L"<FontName>"); // Optionally provide a filter to find only RSC, SHX, or TrueType fonts; must also check NULL.
DgnFontCR newFont = <DgnFileR>.GetDgnFontMapP ()->ResolveFont (<FontNumber>); // Font number maps are per-file; for instance, ISessionMgr::GetActiveDgnFile (). ResolveFont will always provide a font object, even if it has to provide a fallback font.
DgnFontCP newFont; DgnTextStyle::GetActive ()->GetProperty (TextStyle_Font, newFont); // While this interface deals with DgnFontCP, it should never fail to provide a value for TextStyle_Font.
DgnFontCR newFont = DgnFontManager::GetDefaultTrueTypeFont (); // Gets the "active" font. The user controls this through the text style dialog.
// Create the helper class...
ElementPropertiesSetterPtr remapper = ElementPropertiesSetter::Create ();
remapper->SetFont (newFont); // Dereference newFont if required based on how you got and verified the font object.
// Change the font...
EditElementHandle eeh (...);
remapper->Apply (eeh);
// You may now AddToModel or ReplaceInModel on eeh.
Remarks
Required Library: mdlbltin.lib
Member mdlText_compressString (WStringR outBuffer, WCharCP inBuffer, int conversionType)
Acquire the appropriate font object (see DgnFontManager and DgnFontNumMap), and call CompressRscFractions and/or CompressEscapeSequences.
// Instead of using an "active" or "loaded" font, you should acquire the appropriate DgnFont object directly. For instance:
DgnFontCR font = <DgnFileR>.GetDgnFontMapP ()->ResolveFont (<FontNumber>); // <DgnFileR> such as ISessionMgr::GetActiveFile ().
DgnFontCP newFont; DgnTextStyle::GetActive ()->GetProperty (TextStyle_Font, newFont); // While this interface deals with DgnFontCP, it should never fail to provide a value for TextStyle_Font.
WString uniString = ...;
font.CompressRscFractions (uniString.c_str (), uniString); // Dereference font if required based on how you got and verified the font object.
font.CompressEscapeSequences (uniString.c_str (), uniString); // Dereference font if required based on how you got and verified the font object.
Remarks
Required Library: mdlbltin.lib
Member mdlText_create (MSElementP out, MSElementCP in, WCharCP string, DPoint3dCP userOrigin, RotMatrixCP trans, DgnPlatform::TextSizeParam const *textSize, DgnPlatform::TextParamWide const *textParam, TextEDParamCP edParam, DgnModelRefP modelRef)
Create a TextBlock object, and configure the formatting and content that way.
// If you want to start with active settings, or from any other DgnTextStyle object...
TextBlockPtr textBlock = TextBlock::Create (*DgnTextStyle::GetActive (*ISessionMgr::GetActiveDgnFile ()), *ISessionMgr::GetActiveDgnModelP ());
// -or- If you want to start from an existing template element...
ElementHandle eh (...);
TextBlockPtr textBlock = TextHandlerBase::GetFirstTextPartValue (eh);
if (!textBlock.IsValid ())
/* ERROR */
textBlock->Clear ();
// -or- If you want to start from scratch...
TextBlockPtr textBlock = TextBlock::Create (*ISessionMgr::GetActiveDgnModelP ());
// -or- You can manually configure the settings up front...
TextBlockPropertiesPtr tbProps = TextBlockProperties::Create (...);
ParagraphPropertiesPtr paraProps = ParagraphProperties::Create (...);
RunPropertiesPtr runProps = RunProperties::Create (...);
tbProps.Set... ();
paraProps.Set... ();
runProps.Set... ();
TextBlockPtr textBlock = TextBlock::Create (*tbProps, *paraProps, *runProps, *ISessionMgr::GetActiveDgnModelP ());
// Then tweak as desired (if you didn't set up properties up-front)...
// TextParamWide is split between TextBlockProperties, ParagraphProperties, and RunProperties. TextSizeParam (now simply a DPoint2d in UORs) is on RunProperties (via (Get|Set)FontSize).
TextBlockPropertiesPtr tbProps = textBlock->GetProperties ().Clone ();
tbProps->Set... ();
textBlock->SetProperties (*tbProps);
textBlock->GetParagraphPropertiesForAddR ().Set... ();
textBlock->GetRunPropertiesForAddR ().Set... ();
textBlock->SetUserOrigin (...);
textBlock->SetOrientation (...);
// Add text...
textBlock->AppendText (...);
textBlock->AppendEnterDataField (...);
// Create the element...
EditElementHandle eeh;
if (TextBlock::TO_ELEMENT_RESULT_Success != TextHandlerBase::CreateElement (eeh, NULL /* use the template if you have it */, *textBlock))
/* ERROR */
// eeh now contains a text element (or node) that you can AddToModel etc.
Remarks
Required Library: mdlbltin.lib
Member mdlText_expandString (WStringR outBuffer, WCharCP inBuffer, int conversionType)
Acquire the appropriate font object (see DgnFontManager and DgnFontNumMap), and call ExpandRscFractions and/or ExpandEscapeSequences.
// Instead of using an "active" or "loaded" font, you should acquire the appropriate DgnFont object directly. For instance:
DgnFontCR font = <DgnFileR>.GetDgnFontMapP ()->ResolveFont (<FontNumber>); // <DgnFileR> such as ISessionMgr::GetActiveFile ().
DgnFontCP newFont; DgnTextStyle::GetActive ()->GetProperty (TextStyle_Font, newFont); // While this interface deals with DgnFontCP, it should never fail to provide a value for TextStyle_Font.
WString uniString = ...;
font.ExpandEscapeSequences (uniString.c_str (), uniString); // Dereference font if required based on how you got and verified the font object.
font.ExpandRscFractions (uniString.c_str (), uniString); // Dereference font if required based on how you got and verified the font object.
Remarks
Required Library: mdlbltin.lib
Member mdlText_expandTabs (WStringR outstring, WCharCP instring, int tabInterval)
This utility has been deprecated, with no direct replacement. When dealing with text elements, the TextBockAPI can handle tabs (see AppendTab; and ParagraphProperties for tab settings), and should be used instead of faking alignment with spaces.
Member mdlText_extract (WStringP wString, DPoint3dP origin, DPoint3dP userOrigin, RotMatrixP rotMatrix, DgnPlatform::TextSizeParam *textSize, DgnPlatform::TextParamWide *textParam, TextEDParamP edParam, MSElementCP in)
It is recommended that you create a TextBlock out of the element, and query the properties and content from there.
See also
mdlTextNode_extract for porting recommendations.
Remarks
Required Library: mdlbltin.lib
Member mdlText_extractFontStyle (MSElementCP u, DgnPlatform::TextStyleInfo *tfs)
It is recommended that you create a TextBlock out of the element, and query the properties from there.
See also
mdlTextNode_extract for porting recommendations.
Remarks
Required Library: mdlbltin.lib
Member mdlText_extractShape (Dpoint3d rPoints[5], DPoint3dP rOrigin, MSElementCP in, int addSnaptol, int view)
It is recommended that you create a TextBlock out of the element, and call GetNominalRange. You may then transform this range as you wish (e.g. GetUserOrigin and GetOrientation), and create an array of points if that was actually the desired end result.
See also
textNode_extractShape for porting recommendations.
Remarks
Required Library: mdlbltin.lib
Member mdlText_extractString (WStringR wString, MSElementCP el)
It is recommended that you create a TextBlock out of the element, and query the content from there.
See also
mdlTextNode_extract for porting recommendations.
Remarks
Required Library: mdlbltin.lib
Member mdlText_extractStringsFromDscr (WStringR buffer, MSElementDescrP in)
It is recommended that you create a TextBlock out of the element, and get the string value from it. Better yet, you can use a Caret to walk the runs of a TextBlock, which allows you to get text content, stacked fractions, and special whitespace.
ElementHandle eh (...);
TextBlockPtr textBlock = TextHandlerBase::GetFirstTextPartValue (eh);
if (!textBlock.IsValid ())
/* ERROR */
// Returns a Unicode string representing the entire text node (or element). Special whitespace (e.g. paragraph breaks, line breaks, and tabs) is indicated as escape characters in the string.
WString textValue = textBlock->ToString ();
// This value is Unicode (differs from old function); this is the recommended string encoding, and you should update your application to use it, as opposed to down-converting this to a locale-encoded string.
Remarks
Required Library: mdlbltin.lib
Member mdlText_extractW (WCharP string, DPoint3dP origin, DPoint3dP userOrigin, RotMatrixP rotMatrix, DgnPlatform::TextSizeParam *textSize, DgnPlatform::TextParamWide *textParam, TextEDParamP edParam, MSElementDescrP ed)
It is recommended that you create a TextBlock out of the element, and query the properties from there. You can also use the getters on TextElemHandler for direct access.
ElementHandle eh (...);
TextBlockPtr textBlock = TextHandlerBase::GetFirstTextPartValue (eh);
if (!textBlock.IsValid ())
/* ERROR */
// Often, getting the parameters was only required to modify the text and re-create it. If this is your goal, instead of acquiring the properties, mutate the TextBlock in-place and re-generate the element.
// There is no direct equivalent to getting the element origin (lower-left) from a TextBlock; only user origin is supported. The user origin is the data point / snap point used to create the text, and affects how it flows and positions itself as its content changes. Element origins were always lower-left, and failure to keep this concept synchronized with the user origin resulted in poorly positioned text.
WString string = textBlock->ToString ();
DPoint3d userOrigin = textBlock->GetUserOrigin ();
RotMatrix rotMatrix = textBlock->GetOrientation ();
// If the TextBlock came from a text element, querying the paragraph and run formatting at the beginning is sufficient (since it will not have heterogeneous formatting).
CaretPtr caret = textBlock->CreateStartCaret ();
// TextParamWide is split between TextBlockProperties, ParagraphProperties, and RunProperties. TextSizeParam (now simply a DPoint2d in UORs) is on RunProperties (via (Get|Set)FontSize).
textBlock->GetProperties ().Get/Is... ();
caret->GetCurrentParagraphCP ()->GetProperties ().Get/Is... ();
caret->GetCurrentRunCP ()->GetProperties ().Get/Is... ();
// There is no direct equivalent to TextEDParam in TextBlock. You must iterate the runs and dynamic_cast to an EdfCharStream to get EDF information.
// To mutate the TextBlock, see methods such as TextBlock::Clear (), TextBlock::AppentText (), TextBlock::InsertText (), TextBlock::Remove (), TextBlock::SetParagraphPropertiesForAdd (), and TextBlock::SetRunPropertiesForAdd ().
// To create the updated element, see TextHandlerBase::CreateElement, then you can use standard EditElementHandle methods (such as EditElementHandle::ReplaceInModel ()).
Member mdlText_getElementDescr (MSElementDescrH outEdPP, DgnPlatform::Text_2d *pTextElm, RotMatrixP viewRMatrixP)
Get the element's DisplayHandler, and call Drop with the DropGeometry::OPTION_Text option.
ElementHandle eh (...);
DisplayHandlerP displayHandler = eh.GetDisplayHandler ();
if (NULL == displayHandler)
/* ERROR */
ElementAgenda agenda;
if (SUCCESS != displayHandler->Drop (eh, agenda, DropGeometry (DropGeometry::OPTION_Text)))
/* ERROR */
// Work with the dropped elements inside the agenda. For instance, loop over the agenda, and call AddToModel to emit the dropped geometry to the file.
Remarks
Required Library: mdlbltin.lib
Member mdlText_getElementDescrWithModelRef (MSElementDescrH outEdPP, DgnPlatform::Text_2d *pTextElm, RotMatrixP viewRMatrixP, DgnModelRefP modelRef)
Get the element's DisplayHandler, and call Drop with the DropGeometry::OPTION_Text option.
See also
mdlText_getElementDescr for porting recommendations.
Remarks
Required Library: mdlbltin.lib
Member mdlText_getFontInfo (DgnPlatform::TextFontInfo *tfiP, UInt32 fontNum)
Use the DgnFontManager and DgnFontNumMap APIs for dealing with fonts.
bool fontExists = (NULL != <DgnFileR>.GetDgnFontMapP ()->GetFontP (<FontNumber>)); // <DgnFileR> such as ISessionMgr::GetActiveFile ().
@encode
@remark Required Library: mdlbltin.lib
bool mdlText_fontExists (int fontNum);
Gets metric information about a font.
@deprecated This utility has been deprecated, with no direct replacement.
@code
DgnFontCR font = <DgnFileR>.GetDgnFontMapP ()->ResolveFont (<FontNumber>); // <DgnFileR> such as ISessionMgr::GetActiveFile ().
// These properties can still be computed:
TextFontInfo.lettersType.upper = font.IsCharacterPresent (L'A');
TextFontInfo.lettersType.lower = font.IsCharacterPresent (L'a');
TextFontInfo.lettersType.space = font.IsCharacterPresent (L' ');
TextFontInfo.lettersType.filled = font.IsOutlineFont ();
TextFontInfo.lettersType.fract = (font.GetMaxFractionDenominator () > 0);
TextFontInfo.charType = (font.IsSymbolFont () ? TXTFONT_SYMBOL : TXTFONT_NORMAL);
// These properties are hard-coded to these values, and are no longer useful.
Remarks
Required Library: mdlbltin.lib
Member mdlText_nodeFromText (DgnPlatform::Text_node_2d *nodeTemplate, DgnPlatform::Text_2d *textTemplate)
The TextBlock API accepts either element type as a template, and will generate an element or node as required by content or formatting automatically. You should not have to manually deal with text element vs. node specifics.
See also
mdlTextNode_create for an example of creating a text element or node.
Remarks
Required Library: mdlbltin.lib
Member mdlText_nodeFromTextExt (DgnPlatform::Text_node_2d *nodeTemplate, DgnPlatform::Text_2d *textTemplate, int *pNodeNumber)
TextBlock knows how to promote a text element to a node when required. You can can force it to generate a text node by calling SetForceTextNodeFlag.
ElementHandle eh (...);
TextBlockPtr textBlock = TextHandlerBase::GetFirstTextPartValue (eh);
if (!textBlock.IsValid ())
/* ERROR */
textBlock->SetForceTextNodeFlag (true);
// Work with textBlock.
EditElementHandle eeh;
if (TextBlock::TO_ELEMENT_RESULT_Success != TextHandlerBase::CreateElement (eeh, &eh, *textBlock))
/* ERROR */
// eeh now contains a text node, regardless of the TextBlock content.
Member mdlText_setTextParamWideCodePage (DgnPlatform::TextParamWide *textParamWide, LangCodePage codePage)
Use the TextBlock API to create elements; this API is an abstraction over the low-level TextParamWide, and will guarantee that the code page is set correctly.
Remarks
Required Library: mdlbltin.lib
Member mdlText_strokeToElementDescr (MSElementDescrH outEdPP, MSElementDescrP pTextOrNodeElmDscr, RotMatrixP viewRMatrixP, DgnModelRefP modelRef)
Get the element's DisplayHandler, and call Drop with the DropGeometry::OPTION_Text option.
ElementHandle eh (...);
DisplayHandlerP displayHandler = eh.GetDisplayHandler ();
if (NULL == displayHandler)
/* ERROR */
ElementAgenda agenda;
if (SUCCESS != displayHandler->Drop (eh, agenda, DropGeometry (DropGeometry::OPTION_Text)))
/* ERROR */
// Work with the dropped elements inside the agenda. For instance, loop over the agenda, and call AddToModel to emit the dropped geometry to the file.
Member mdlText_textFromNode (MSElementP pElementOut, MSElementCP elementIn)
The TextBlock API accepts either element type as a template, and will generate an element or node as required by content or formatting automatically. You should not have to manually deal with text element vs. node specifics.
See also
mdlTextNode_create for an example of creating a text element or node.
Remarks
Required Library: mdlbltin.lib
Member mdlTextNode_create (MSElementP pElementOut, MSElementP pTemplateElement, DPoint3dP dOrigin, RotMatrixP rotMatrix, double *lineSpacing, DgnPlatform::MSTextSize *size, DgnPlatform::TextParam *txtParams)
Use the TextBlock API to create text or text node elements; this API will create either element type based on the requirements of the content and formatting you provide. Note that the TextBlock API does not allow direct control over text element vs. text node; the most appropriate one is chosen. You thus do not have to create a blank text node first and fill it in; it is done in one operation now.
// If you want to start with active settings, or from any other DgnTextStyle object...
TextBlockPtr textBlock = TextBlock::Create (*DgnTextStyle::GetActive (*ISessionMgr::GetActiveDgnFile ()), *ISessionMgr::GetActiveDgnModelP ());
// -or- If you want to start from an existing template element...
ElementHandle eh (...);
TextBlockPtr textBlock = TextHandlerBase::GetFirstTextPartValue (eh);
if (!textBlock.IsValid ())
/* ERROR */
textBlock->Clear ();
// -or- If you want to start from scratch...
TextBlockPtr textBlock = TextBlock::Create (*ISessionMgr::GetActiveDgnModelP ());
// -or- You can manually configure the settings up front...
TextBlockPropertiesPtr tbProps = TextBlockProperties::Create (...);
ParagraphPropertiesPtr paraProps = ParagraphProperties::Create (...);
RunPropertiesPtr runProps = RunProperties::Create (...);
tbProps.Set... ();
paraProps.Set... ();
runProps.Set... ();
TextBlockPtr textBlock = TextBlock::Create (*tbProps, *paraProps, *runProps, *ISessionMgr::GetActiveDgnModelP ());
// Then tweak as desired (if you didn't set up properties up-front)...
// TextParamWide is split between TextBlockProperties, ParagraphProperties, and RunProperties. TextSizeParam (now simply a DPoint2d in UORs) is on RunProperties (via (Get|Set)FontSize).
TextBlockPropertiesPtr tbProps = textBlock->GetProperties ().Clone ();
tbProps->Set... ();
textBlock->SetProperties (*tbProps);
textBlock->GetParagraphPropertiesForAddR ().Set... ();
textBlock->GetRunPropertiesForAddR ().Set... ();
textBlock->SetUserOrigin (...);
textBlock->SetOrientation (...);
// Add text...
textBlock->AppendText (...);
textBlock->AppendEnterDataField (...);
// Create the element...
EditElementHandle eeh;
if (TextBlock::TO_ELEMENT_RESULT_Success != TextHandlerBase::CreateElement (eeh, NULL /* use the template if you have it */, *textBlock))
/* ERROR */
// eeh now contains a text element (or node) that you can AddToModel etc.
Remarks
Required Library: mdlbltin.lib
Member mdlTextNode_createEx (MSElementDescrH nodeDescrPP, MSElementP nodeTemplate, MSElementDescrP textEdp, DPoint3dP dOrigin, RotMatrixP rotMatrix, DgnPlatform::TextSizeParam *sizeParam, DgnPlatform::TextParamWide *txtParams)
Use the TextBlock API to create text or text node elements; this API will create either element type based on the requirements of the content and formatting you provide. Note that the TextBlock API does not allow direct control over text element vs. text node; the most appropriate one is chosen. You thus do not have to worry about creating nodes and filling them in.
See also
mdlTextNode_create for porting recommendations.
Remarks
Required Library: mdlbltin.lib
Member mdlTextNode_createWide (MSElementP out, MSElementP in, DPoint3dP userOrigin, RotMatrixP rotMatrix, DgnPlatform::TextSizeParam *size, DgnPlatform::TextParamWide *txtParams)
Use the TextBlock API to create text or text node elements; this API will create either element type based on the requirements of the content and formatting you provide. Note that the TextBlock API does not allow direct control over text element vs. text node; the most appropriate one is chosen. You thus do not have to create a blank text node first and fill it in; it is done in one operation now.
See also
mdlTextNode_create for porting recommendations.
Remarks
Required Library: mdlbltin.lib
Member mdlTextNode_createWithStrings (MSElementDescrH nodeDescrPP, MSElementCP nodeTemplate, bvector< WString > const &, DPoint3dCP userOrigin, RotMatrixCP rotMatrix, DgnPlatform::TextSizeParam const *sizeParam, DgnPlatform::TextParamWide const *txtParams, TextEDParamCP textEDParam)
Use the TextBlock API to create text or text node elements; this API will create either element type based on the requirements of the content and formatting you provide. Note that the TextBlock API does not allow direct control over text element vs. text node; the most appropriate one is chosen.
See also
mdlTextNode_create for porting recommendations. When appending text, you can call textBlock->AppendParagraphBreak () or textBlock->AppendLineBreak () to create multiple lines.
Remarks
Required Library: mdlbltin.lib
Member mdlTextNode_extract (DPoint3dP userOrigin, RotMatrixP rotMatrix, DgnPlatform::MSTextSize *tileSize, double *lineSpacing, DgnPlatform::TextParam *txtParams, int *nodeNumber, MSElementCP in, MSElementDescrCP edP)
It is recommended that you create a TextBlock out of the element, and query the properties from there. It should be noted that TextBlock does not expose a direct equivalent to the formatting data of the text node element itself; it will provide the formatting actually used to display the text (e.g. from the child text elements).
ElementHandle eh (...);
TextBlockPtr textBlock = TextHandlerBase::GetFirstTextPartValue (eh);
if (!textBlock.IsValid ())
/* ERROR */
// Often, getting the parameters was only required to modify the text and re-create it. If this is your goal, instead of acquiring the properties, mutate the TextBlock in-place and re-generate the element.
// There is no direct equivalent to getting the element origin (lower-left) from a TextBlock; only user origin is supported. The user origin is the data point / snap point used to create the text, and affects how it flows and positions itself as its content changes. Element origins were always lower-left, and failure to keep this concept synchronized with the user origin resulted in poorly positioned text.
WString string = textBlock->ToString ();
DPoint3d userOrigin = textBlock->GetUserOrigin ();
RotMatrix rotMatrix = textBlock->GetOrientation ();
// If the TextBlock came from a text element, querying the paragraph and run formatting at the beginning is sufficient (since it will not have heterogeneous formatting).
// Otherwise, the element could contain multiple different formats, and you must use a Caret to iterate over the runs and aggregate this information.
CaretPtr caret = textBlock->CreateStartCaret ();
// TextParamWide is split between TextBlockProperties, ParagraphProperties, and RunProperties. TextSizeParam (now simply a DPoint2d in UORs) is on RunProperties (via (Get|Set)FontSize). Line spacing is stored on ParagraphProperties. Node number is no longer directly exposed.
textBlock->GetProperties ().Get/Is... ();
caret->GetCurrentParagraphCP ()->GetProperties ().Get/Is... ();
caret->GetCurrentRunCP ()->GetProperties ().Get/Is... ();
// There is no direct equivalent to TextEDParam in TextBlock. You must iterate the runs and dynamic_cast to an EdfCharStream to get EDF information.
// To mutate the TextBlock, see methods such as TextBlock::Clear (), TextBlock::AppentText (), TextBlock::InsertText (), TextBlock::Remove (), TextBlock::SetParagraphPropertiesForAdd (), and TextBlock::SetRunPropertiesForAdd ().
// To create the updated element, see TextHandlerBase::CreateElement, then you can use standard EditElementHandle methods (such as EditElementHandle::ReplaceInModel ()).
//!
Remarks
Required Library: mdlbltin.lib
Member mdlTextNode_extractShape (Dpoint3d rPoints[5], DPoint3dP rOrigin, MSElementDescrP edP, int addsnaptol, int view)
It is recommended that you create a TextBlock out of the element, and call GetNominalRange. You may then transform this range as you wish (e.g. GetUserOrigin and GetOrientation), and create an array of points if that was actually the desired end result.
ElementHandle eh (...);
TextBlockPtr textBlock = TextHandlerBase::GetFirstTextPartValue (eh);
if (!textBlock.IsValid ())
/* ERROR */
// This is the underlying range.
DRange3d nominalRange = textBlock->GetNominalRange ();
// You may then transform, extend, and prepare as you see fit. For example:
DPoint3d shapePts[5];
memset (shapePts, 0, sizeof (shapePts));
shapePts[0] = nominalRange.low;
shapePts[2] = nominalRange.high;
shapePts[1].x = shapePts[2].x;
shapePts[1].y = shapePts[0].y;
shapePts[3].x = shapePts[0].x;
shapePts[3].y = shapePts[2].y;
shapePts[4] = shapePts[0];
Transform transform;
transform.InitFrom (TextBlock::GetOrientation (), TextBlock::GetUserOrigin ());
transform.Multiply (shapePts, shapePts, 5);
Remarks
Required Library: mdlbltin.lib
Member mdlTextNode_extractWide (DPoint3dP userOrigin, RotMatrixP rotMatrix, DgnPlatform::TextSizeParam *txtSizeParam, DgnPlatform::TextParamWide *txtParams, MSElementCP in, MSElementDescrCP edP)
It is recommended that you create a TextBlock out of the element, and query the properties from there. It should be noted that TextBlock does not expose a direct equivalent to the formatting data of the text node element itself; it will provide the formatting actually used to display the text (e.g. from the child text elements).
See also
mdlTextNode_extract for porting recommendations.
Remarks
Required Library: mdlbltin.lib
Member SheetDef::GetPltFileName (WString &pltFileName) const
Member SheetDef::GetWindowsPrinterName (WString &windowsPrinterName) const
Member SheetDef::SetPltFileName (WChar const *pltFileName)
Member SheetDef::SetWindowsPrinterName (WChar const *windowsPrinterName)

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.