- UID
- 5126
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-5-16
- 最后登录
- 1970-1-1
|
发表于 2003-5-22 13:46:34
|
显示全部楼层
打开标注实体后用
Acad::ErrorStatus
setDimensionText(
const char* text);
text Input text string to use for dimension
This function sets the dimension to use a copy of text as the user-supplied dimension annotation text string. This string will need to contain any desired multiline text formatting characters.
This function returns a copy of the user-supplied dimension annotation text string (including any multiline text formatting characters).
If the default text is the only text in the dimension, provide this function with an empty string (for example, 灯). If the dimension contains user-defined text along with the defualt text, provide this function with the default text denoted with angle brackets (for example, 典his is the default text <>・. If the dimension contains no text, for example using the ・・syntax), provide the ・・ Finally if the text is user defined, but there is no default text, provide only the user-defined text to this function.
To set the dimension to use only the default text in the block table record, call this function with text==NULL. Then when the dimension is closed, the dimension text string will be set to an empty string and the default text will be used.
The annotation text string is used for DXF group code 1.
This function returns Acad::eOk.
获取text用
char*
dimensionText() const;
This function returns a copy of the user-supplied dimension annotation text string (including any multiline text formatting characters).
If the default text is the only text in the dimension, this function will return an empty string (for example, 灯). If the dimension contains user-defined text along with the defualt text, this function will return the text with the default text denoted with angle brackets (for example, 典his is the default text <>・. If the dimension contains no text, for example using the ・・syntax), it will return the ・・ Finally, if the text is user defined but there is no default text, only the user-defined text is returned.
Call AcDbDimension::measurement() to obtain the default measurement and computed text.
Alternately, to identify the substring in the block table record is, you can look at the AcDbText entity within the block table record (the object ID for this block table record can be obtained via AcDbDimension::dimBlockId()).
The caller of this function is responsible for deallocating the memory used by the returned text string using the C++ delete[] operator.
The annotation text string is used for DXF group code 1. |
|