Author Topic: Extended move?  (Read 2735 times)

0 Members and 1 Guest are viewing this topic.

jav

  • Mosquito
  • Posts: 10
Extended move?
« on: March 30, 2007, 01:17:01 PM »
Is there a way to select multiple entities (text) and move
them to align on a line (orthogonal)?

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Extended move?
« Reply #1 on: March 30, 2007, 01:39:52 PM »
maybe, Are you wanting to restack them like a paragraph, or just move all to a line regardless of spacing b/t them?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

jav

  • Mosquito
  • Posts: 10
Re: Extended move?
« Reply #2 on: March 30, 2007, 02:02:55 PM »

uncoolperson

  • Guest
Re: Extended move?
« Reply #3 on: March 30, 2007, 02:14:00 PM »
as super hero-ish as possible

this looks like a job for
Code: [Select]
(inters pt1 pt2 pt3 pt4)

jav

  • Mosquito
  • Posts: 10
Re: Extended move?
« Reply #4 on: March 30, 2007, 05:30:05 PM »
test the routine please: texts with justification to the right, this correct, texts with justification to the left ERROR

as are the problem? thanks

Code: [Select]


(defun C:muevetexto ()
  (command "undo" "mark")
   (setq OLDORTHO (getvar "ORTHOMODE")
      OLDOSMODE (getvar "OSMODE")
   )
   (setvar "ORTHOMODE" 0)
   (setvar "OSMODE" 0)
   (princ "\n Osnap & Ortho have been turned off")

   (setq TOLINE (entsel "\n Pick line to move to: "))
   (setq TOLINEELIST (entget (car TOLINE)))
   (redraw (car TOLINE) 3)

   (setq TOLINEENDPT1 (cdr (assoc 10 TOLINEELIST))
      TOLINEENDPT2 (cdr (assoc 11 TOLINEELIST))
   )


(setq ss nil)
(prompt "\nPick the Text to Align:")
(setq ss (ssget))
(if ss
(progn

(setq c 0)
(repeat (sslength ss)
(setq text_ent (ssname ss c))
(setq txt (entget text_ent))
(setq just (cdr (assoc 72 txt))); justification
(if (/= just 0)
(setq ip (cdr (assoc 11 txt))); Right end
(setq ip (cdr (assoc 10 txt))); present location
); if

(setq ip0 (cdr (assoc 10 txt)))
(setq ip1 (cdr (assoc 11 txt)))


(setq INTPT (inters TOLINEENDPT1 TOLINEENDPT2 ip0 ip1 nil))
;(command "change" text_ent "" INTPT "" "" "" "")

 
;(setq np (polar ip (angle IP RX) DX))
(command "_move" text_ent "" ip INTPT)
(setq c (+ c 1))
); repeat
); progn
); if
(redraw (car TOLINE) 4)   
   (setvar "ORTHOMODE" OLDORTHO)
   (setvar "OSMODE" OLDOSMODE)
   (princ "\n Osnap & Ortho have been restored ")
   (princ)
); function


CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Extended move?
« Reply #5 on: March 31, 2007, 10:04:13 AM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

jav

  • Mosquito
  • Posts: 10
Re: Extended move?
« Reply #6 on: April 02, 2007, 02:42:15 PM »
Thanks CAB