高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】converting attribute definitions to text objects
converting attribute definitions to text objects
converting attribute definitions to text objects
hi,
i want to simplify a drawing to make it compatible with old cad software. in the drawing, there are blocks with constant attributes. i want to convert these attributes to text objects.
so obviously i need to convert oddbattributedefinition objects to oddbtext objects. i know that oddbattributedefinition is a subclass of oddbtext, but i want to "remove" all additional attrribute information and just keep the text with all its properties like text position etc.
i have tried to first convert the oddbattributedefinition to a oddbmtext object (using oddbattribute::getmtextattribute() ) and then i have exploded the mtext, but the resulting oddbtext looks slightly different.
is there a simpler solution than creating a new oddbtext object and manually setting all its properties to the same as the oddbattributedefinition's properties?
you can use oddbentget() / oddbentmod()
sergey slezkin
thank you for your answer! i'll try to use oddbentmod().
|