gilsoto13 发表于 2022-7-6 12:26:21

from ss Text, mtext & block al

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

alanjt 发表于 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).

Lee Mac 发表于 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

gilsoto13 发表于 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

alanjt 发表于 2022-7-6 12:40:04

happy to help.
maybe you'll score a few brownie points around the office.

gilsoto13 发表于 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?

alanjt 发表于 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.

gilsoto13 发表于 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

alanjt 发表于 2022-7-6 12:53:42

default? i didn't think you could even create a non-LWPolyline in the new cad versions.

Lee Mac 发表于 2022-7-6 12:57:12

 
Yup you can, I think it goes on the PLINETYPE sys var.
页: [1] 2
查看完整版本: from ss Text, mtext & block al