乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 112|回复: 7

[编程交流] -- Vla-AddText ~ Justific

[复制链接]

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 14:49:51 | 显示全部楼层 |阅读模式
I have used "VLA-AddText" in the past, but there seems to be no input for a choice of justification for the text you are trying to create.
 
The text seems to always be created with a justification of bottom-left.
 
What is the easiest way to change the justification of such text? if indeed it can be changed?
 
As always, I thank you all for your time and patience
 
Cheers
 
Lee
回复

使用道具 举报

2

主题

182

帖子

180

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 14:58:30 | 显示全部楼层
(vla-put-attachmentPoint (vlax-ename->vla-object (car (entsel))) acAttachmentPointMiddleLeft)
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:09:11 | 显示全部楼层
Thanks John,
 
I see that works with MText only - out of interest, is there an equivalent for DTEXT?
 
Cheers
 
Lee
回复

使用道具 举报

2

主题

182

帖子

180

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 15:15:46 | 显示全部楼层
Not sure. I'll have to look.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:27:46 | 显示全部楼层
 
Cheers, I appreciate your time
 
The only other method I have used in this respect is to move the text using a vector obtained from a point on the edge or the center of the box generated by the (textbox) function. - which is a bit of a hassle...
回复

使用道具 举报

2

主题

182

帖子

180

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 15:38:28 | 显示全部楼层
Looks like a pain; i think what you have to do is to:
Change the alignment point (Once you do this your text insertion point gets reset to 0,0 or something like that)
then you need to put the text back into position.
like:
  1. (vla-put-Alignment  acAlignmentMiddle)(vla-put-TextAlignmentPoint  (vlax-3d-point '))
 
There has to be a better way. I'll keep looking.
回复

使用道具 举报

2

主题

182

帖子

180

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 15:48:43 | 显示全部楼层
?
  1. ( (lambda (/  )   (setq      (vlax-ename->vla-object (car (entsel)))          (vla-get-insertionpoint ))   (vla-put-Alignment  acAlignmentMiddle)   (vla-put-TextAlignmentPoint  )) )
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:58:15 | 显示全部楼层
Ahh I see - like having to specify the 11 DXF group code when 72 & 73 are non-zero.
 
That looks like a better method than what I was peviously doing - thanks John.
 
Lee
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-4 21:04 , Processed in 0.322180 second(s), 68 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表