Author Topic: moving text using insertion point  (Read 3014 times)

0 Members and 1 Guest are viewing this topic.

confusedCADguy

  • Guest
moving text using insertion point
« on: June 08, 2004, 03:35:48 PM »
I am writing a routine to move a piece of text and draw a line from where that text is placed to a user defined point. I want to move the text using the insertion point and use that point as the start of my line. Any ideas?

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
moving text using insertion point
« Reply #1 on: June 08, 2004, 03:44:01 PM »
Code: [Select]

(defun c:lft (/ ent ins_pt_txt p1)

  (if (setq ent (car (entsel "\nSelect (D)Text: ")))
(setq ins_pt_txt (cdr (assoc 10 (entget ent))))
)

  (if ins_pt_txt
(if (setq p1 (getpoint ins_pt_txt "\nSelect end point of line: "))
 (command "_.line" ins_pt_txt p1 "")
 )
)
  )
TheSwamp.org  (serving the CAD community since 2003)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
moving text using insertion point
« Reply #2 on: June 08, 2004, 09:45:47 PM »
confusedCADguy

Jeff answered it for you here :
http://www.cadvault.com/forums/showpost.php?p=75009&postcount=9
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
moving text using insertion point
« Reply #3 on: June 09, 2004, 04:39:00 AM »
- confusedCADguy
please update your e-mail address, the one you are using bounces.

thanks
TheSwamp.org  (serving the CAD community since 2003)