乐筑天下

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

[编程交流] from ss Text, mtext & block al

[复制链接]

29

主题

196

帖子

168

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
145
发表于 2022-7-6 12:26:21 | 显示全部楼层 |阅读模式
My last request for a long time for you guys...
 
I have been trying to find the perfect routine for my company to achieve this:
 
I would to have a routine to select a line or polyline segment and then it will prompt me to select objects, and then this routine will filter only text, mtext and blocks, and will align them to previously selected line or polyline segment, each one by its own insertion point, for dummies the objects may be rotated 180 degrees from desired angle, so a prompt - backwards?  would be better after the command shows us the result.. to give us the change to choose 180 degrees rotation with the "Y" answer.
 
I have found all of these things in 5 different files, the best one at this moment for us is the
 
ta.lsp, (vba) which aligns text, mtext and blocks to a line, but one by one and will not allow polyline segments.
 
then the rtt.lsp (vba) will allow us to select a polyline segment or a line, but the command will end after aligning only one object. It will not align blocks either...
 
And then we have the torient (from express tools in acettxt.lsp) which allow us to pick a selection set, but it will require the angle by picking 2 points and will rotate attdefs inside selected blocks, not blocks properly.
 
Can anyone make Santa Claus and help us increase our productivity reaching the objectives above with a brand new routine?
aligns.zip
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-6 12:29:40 | 显示全部楼层
i keep meaning to do a little house cleaning and rewrite portions of this, but i just haven't the time. however, you are more than welcome to it. it will do everything you are asking for, and more.
select a line, pline, arc, block, piece of text, specify an angle or choose 0 rotation, even nested objects can be selected, then select as many blocks, text, mtext, multileaders as you like, and they will all rotate along that angle. lastly, the user is prompted with option to rotate everything 180 degrees (just in case).
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 12:34:46 | 显示全部楼层
Have you had a look at this for text/Mtext?
 
http://www.cadtutor.net/forum/showthread.php?t=37646
回复

使用道具 举报

29

主题

196

帖子

168

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
145
发表于 2022-7-6 12:37:01 | 显示全部楼层
 
 
What a beatiful lisp Alan.... That's exactly what I've looking for this since this monday....
 
I've been using the ta.lsp... but this is way better..
 
This is exactly as I wanted it, you've really worked a lot in this... maybe it will be part of Autocad commands in the future.
 
That's a lot, I will pass the message to other people... thank you for it. This week I also solved 2 other things our company was struggling with, one of them was to use one abbreviation for printing pdf regardless of current autocad version (I made 3 different abbreviations before) and the other thing was to update the scale of any type of block to current dimscale, now we have all solved thanks to this and other forums.
pdf.lsp
Bu.lsp
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-6 12:40:04 | 显示全部楼层
happy to help.
maybe you'll score a few brownie points around the office.
回复

使用道具 举报

29

主题

196

帖子

168

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
145
发表于 2022-7-6 12:45:14 | 显示全部楼层
 
Is it possible to add the polyline to the angle detection objects? because program stops if a polyline is selected... I can see the polyline and lwpolyline in the type objects but doesn´t work for polys... maybe we can add the "convert" "selected entity" "Polyline" command in the middle so we can make it work with old fashioned polylines too, where could I add this line? or add the polyline type to make it work?
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-6 12:46:40 | 显示全部楼层
old style plines? what on earth are you working with?
give me a sample drawing (i can't create one) with a non-LWpolyline and i'll see what i can do.
回复

使用道具 举报

29

主题

196

帖子

168

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
145
发表于 2022-7-6 12:49:24 | 显示全部楼层
 
JAJAJA... I work on 2009, but I just have an option to create polylines by default, maybe some people have this option by default too... I am the support guy in a 40 or 50 people company in Mexico... but there's another major person responsible for creating our standards in our main USA office in Tucson. (M3)
 
So I just want to make sure anybody can use this beautiful lisp without stucking on pline objects. Check attached
check8.dwg
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-6 12:53:42 | 显示全部楼层
default? i didn't think you could even create a non-LWPolyline in the new cad versions.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 12:57:12 | 显示全部楼层
 
Yup you can, I think it goes on the PLINETYPE sys var.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-5 06:13 , Processed in 0.768718 second(s), 72 queries .

© 2020-2025 乐筑天下

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