• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

move texts along orientation

Il filo

Guest
Good morning, everyone.

I am an architect, I joined this forum years ago but, for various reasons, I have been away from the world of design and cad for a long time.
In the last period I approached this world mainly as a designer and, despite not having encountered problems taking over the old and familiar software, I have already met some operations I would like to perform but I do not know how and if it is possible to do it.

I wanted to know if someone was aware of a way to move multiple autocad texts of a given measure along their orientation at once.
I find an analogy with 3d studio max when I want to move more objects along their local coordinates all together.

Unfortunately (and unexpectedly) I couldn't find anything on such an operation.

I attach a quick sketch, which an image is worth more than a thousand words.

thanks in advance to anyone who wants to answer.
 

Attachments

  • schema.webp
    schema.webp
    20.4 KB · Views: 6
simply in autocad the concept of local co-ordinate does not exist, so unless you have a lisp or similar to support these operations, I doubt that autocad is able in native way
 
First of all, thank you for the answer.

Unfortunately it was what I suspected, the problem is that, despite already using some lisp, I would not be able to create them currently.
so or I keep looking hoping to find a suitable lisp or try to find the time to learn. We'll see.

Can you let the discussion open again? Maybe some other users have the solution to my problem... At least I hope! ?
 
indeed it is a particularly boring thing to not have a direct command to move the text according to the normal (or parallel) of its orientation.

if you know the angle (just peek into the properties) you can simply use a relative shift by setting length and rotation+90.
in practice the relative coordination will be a thing of the type (where high 90 not to do so in mind or having to take the calculator):
@ distance < (+ angle 90)

other solution is to set the object bird by selecting the writing. at this point a simple move and you are finished (remembering you have to reset the uct to the previous value).
 
These methods are good, but always on a reduced amount of elements.
In my case, alas, there are several thousand texts rotated in the most diverse ways :eek:

the method used so far has been selected with the selerapid for range of 10° texts, temporarily change the ucts and move half of the selected texts upwards and the other downwards (filtrates with the command finds), all repeated for 36 times.
But this method works between one stuff and the other takes me away between 40 and 60 minutes.

but if I had the need to move the texts exactly along their orientation (which only for now did not happen to me) I should repeat that procedure 360 times... a piece that would last hours!

However, thanks to the answer, at least I see I'm not the only one who put this question. :
 
See if it works. ?
Code:
(defun c:tt (/txt t1 p1)
(vla-startundomark (vla-get-activedocument))
(princ "\selezionare and testi da spostare")
(setq txt (ssget '(0 . "text")))))
(setq d (cond
(getdist (strcat "\ndistanza di spostamento" (if d (strcat " <" (rtos d 2 2) ">: "))))) )
( d )
) )
(if (and txt d)
(repeat (ssslength txt)
(vla-move (vlax-ename->vla-object (setq t1 (ssname txt)))
(vlax-3d-point (setq p1 (cdr))
(vlax-3d-point (polar p1 (+ (cdr (assoc 50 (entget t1))) (/pi 2)))
)
)
(vla-endundomark (vla-get-activedocument))
(princ)
)
 
See if it works. ?
Code:
(defun c:tt (/txt t1 p1)
(vla-startundomark (vla-get-activedocument))
(princ "\selezionare and testi da spostare")
(setq txt (ssget '(0 . "text")))))
(setq d (cond
(getdist (strcat "\ndistanza di spostamento" (if d (strcat " <" (rtos d 2 2) ">: "))))) )
( d )
) )
(if (and txt d)
(repeat (ssslength txt)
(vla-move (vlax-ename->vla-object (setq t1 (ssname txt)))
(vlax-3d-point (setq p1 (cdr))
(vlax-3d-point (polar p1 (+ (cdr (assoc 50 (entget t1))) (/pi 2)))
)
)
(vla-endundomark (vla-get-activedocument))
(princ)
)
Wow!
I will absolutely prove it as soon as I can, that right now I am not in front of autocad.

a super-thank you!
I'll let you know when I try.
 
Here I am.

Okay, I admit I'm pretty ignorant about macro, lisp and programming in general.

all this code I tried to paste it into the command line but I can't figure out whether it's working or not.
Are these strings not to be glued there?
 
you need to create a text file, with lsp extension (e.g. tt.lsp) and copy it into the whole code. after saving it, load it in autocad by appload
from that moment, to launch it, from keyboard to tt followed by sending.
❖gp. Of course (that I tell you to do) works exactly as a thread he wanted, the only mole is that he only works on pure texts, not on mtext (type of different entity? more problematic? or just a question of ssget? )
 
@cristalloThanks for the delucidation, crystal. That was exactly what I missed.
❖gp. I don't know what to say if I don't thank you!
It works exactly as I wished.
I thank you so much for reading and solving my problem by taking time.

a little information for everyone after a few tests:
  • I also tried with mtext and confirm that it does not work, it goes only with normal texts (which, selfishly speaking, was what I was interested in)
  • I tried to move several texts with different reasons and this ultratime does not seem to affect the result minimally.
  • I can move both positive and negative.
It's probably a little useless evidence, but I did it anyway.
 
❖gp.I'll ask you one last thing.
I have also formulated this question on another forum, but without any result with other users.
Since now a solution exists, would you give me permission to share it there?
Maybe it could serve someone else besides me.

ps. Of course I wouldn't peel it like flour of my bag, eh!
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top