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

[V8i C++] Setting the Text Style for a Dimension Style

$
0
0

I wish to programmatically set the TextStyle for a dimension. I obtain a DgnTextStylePtr for the text style, and use it to get the ID ( textStylePtr->GetID() ). With that, I want to set the Text Style for the dimension:

iStatus = mdlDimStyle_setIntegerProp(pDimStyle, textStylePtr->GetID(), DIMSTYLE_PROP_Text_TextStyleID_INTEGER);

But in the help file, there is a statement to NOT do it this way:

"DIMSTYLE_PROP_Text_TextStyleID_INTEGER: The ID of the dimStyle's text style. Do not 'set' this value directly. To set the text style use

DIMSTYLE_PROP_Text_TextStyle_TEXTSTYLE"

DIMSTYLE_PROP_Text_TextSty

The doc lists DIMSTYLE_PROP_Text_TextStyle_TEXTSTYLE and an "int" value, but when I use:

iStatus = mdlDimStyle_setIntegerProp(pDimStyle, textStylePtr->GetID(), DIMSTYLE_PROP_Text_TextStyle_TEXTSTYLE);

 

I get a return code of -126 (invalid argument).

 

So how should one set the TextStyle?


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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