怎么样在当前文档中创建文字?
还有上次问的怎么样查找或替换文字是不是CAD处理文字很难呀?
可以用addtext或addmtext方法
1、addtext方法RetVal = object.AddText(TextString, InsertionPoint, Height)
Object
ModelSpace Collection, PaperSpace Collection, Block
The object or objects this method applies to.
TextString
String; input-only
The actual text to be displayed.
InsertionPoint
Variant (three-element array of doubles); input-only
The 3D WCS coordinates on the drawing where the text is placed.
Height
Double; input-only
The height of the text. Must be a positive number.
RetVal
Text object
The newly created Text object.
2、addmtext方法
RetVal = object.AddMText(InsertionPoint, Width, Text)
Object
ModelSpace Collection, PaperSpace Collection, Block
The object or objects this method applies to.
InsertionPoint
Variant (three-element array of doubles); input-only
The insertion point of the mtext bounding box.
Width
Double; input-only
The width of the mtext bounding box.
Text
String; input-only
The actual text string for the MText object.
RetVal
MText object
The newly created MText object.
3、关于查找和替换文字,先前有人做了一个VBA程序,你可以找找
说得妙
谢了
页:
[1]