明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2353|回复: 6

[求助]Mtext在程序中的用法?

[复制链接]
发表于 2003-4-9 09:54:00 | 显示全部楼层 |阅读模式
我在CAD中写文本习惯用MTEXT命令来写的,但MTEXT在程序中的用法到现在还没有掌握,询问了几次,都不得要领,不知哪位高手能指点一下?
发表于 2003-4-9 09:59:00 | 显示全部楼层

MTEXT再程序中的用法?“用法”指的是什么?

不知你是要创建MTEXT对象,还是要操作原有的对象?
建议你仔细查看MTEXT的DXF组,用它可以很容易使用MTEXT
 楼主| 发表于 2003-4-15 15:47:00 | 显示全部楼层

[求助]创建MTEXT文本

我指的是创建MTEXT文本,
发表于 2003-4-15 15:56:00 | 显示全部楼层

根据MTEXT的DXF组来创建,

含义如下,英文,将就看吧

Group code        Description
100        Subclass marker (AcDbMText)
10        Insertion point
DXF: X value; APP: 3D point
20, 30        DXF: Y and Z values of insertion point
40        Nominal (initial) text height
41        Reference rectangle width
71        Attachment point:
1 = Top left; 2 = Top center; 3 = Top right;
4 = Middle left; 5 = Middle center; 6 = Middle right;
7 = Bottom left; 8 = Bottom center; 9 = Bottom right
72        Drawing direction:
1 = Left to right;
3 = Top to bottom;
5 = By style (the flow direction is inherited from the associated text style)
1        Text string. If the text string is less than 250 characters, all characters appear in group 1. If the text string is greater than 250 characters, the string is divided into 250 character chunks, which appear in one or more group 3 codes. If group 3 codes are used, the last group is a group 1 and has fewer than 250 characters.
3        Additional text (always in 250 character chunks) (optional)
7        Text style name (STANDARD if not provided) (optional)
210        Extrusion direction (optional; default = 0, 0, 1)
DXF: X value; APP: 3D vector
220, 230        DXF: Y and Z values of extrusion direction (optional)
11        X-axis direction vector (in WCS)
DXF: X value; APP: 3D vector

NOTE  A group code 50 (rotation angle in radians) passed as DXF input is converted to the equivalent direction vector (if both a code 50 and codes 11, 21, 31 are passed, the last one wins). This is provided as a convenience for conversions from text objects.
21, 31        DXF: Y and Z values of X-axis direction vector (in WCS)
42        Horizontal width of the characters that make up the mtext entity. This value will always be equal to or less than the value of group code 41. (read-only, ignored if supplied)
43        Vertical height of the mtext entity (read-only, ignored if supplied)
50        Rotation angle in radians
73        Mtext line spacing style (optional):
1 = At least (taller characters will override)
2 = Exact (taller characters will not override)
44        Mtext line spacing factor (optional):
Percentage of default (3-on-5) line spacing to be applied. Valid values range from 0.25 to 4.00.
发表于 2003-4-15 21:26:00 | 显示全部楼层

怎么不看看二次开发栏目中的DXF参考中的相关内容

 楼主| 发表于 2003-4-17 16:51:00 | 显示全部楼层

求源程序

有没有例子
发表于 2003-4-17 17:17:00 | 显示全部楼层

直接用命令mtext不可以吗?

(command "mtext" pt1 pt2 "你要输入的文字\\P现在是第二行。" "")
其中pt1和pt2是你文字的矩形框的角点座标。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 09:44 , Processed in 0.175635 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表