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

RE: [CONNECT, C++] Setting of view independent status in TextblockProperties

$
0
0

Hello Peder,

Apologize missing your post so long time. Today I test SetIsViewIndependent(true) in my side. It works fine. The following is my test code snippet. FYI.

void createText(WCharCP  unparsed)
    {
    DgnModelP       pActiveModel = ISessionMgr::GetActiveDgnModelP();
    TextBlockPropertiesPtr  pTBProp = TextBlockProperties::Create(*pActiveModel);
    pTBProp->SetIsViewIndependent(true);
    ParagraphPropertiesPtr  pParaProp = ParagraphProperties::Create(*pActiveModel);
    DgnTextStylePtr         pActiveTextStyle = DgnTextStyle::GetActive();
    RunPropertiesPtr        pRunProp = RunProperties::Create(*pActiveTextStyle, *pActiveModel);

    TextBlockPtr pTextBlock = TextBlock::Create(*pTBProp, *pParaProp, *pRunProp, *pActiveModel);
    pTextBlock->AppendText(L"This is a ViewIndependent text");

    EditElementHandle  eeh;
    if (TEXTBLOCK_TO_ELEMENT_RESULT_Success ==
        TextHandlerBase::CreateElement(eeh, nullptr, *pTextBlock))
        {
        eeh.AddToModel();
        }
    }

Viewing all articles
Browse latest Browse all 7260

Trending Articles



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