AutoLISP command giving the coordinates for text?

Discussion in 'AutoCAD' started by Tapio P, Apr 12, 2004.

  1. Tapio P

    Tapio P Guest

    Hello!

    I have faced difficulties in promising start in AutoLISP programming.

    Which command I should use when defining coordinates (X Y) for the text?

    Thanks for all the help

    Tapio
     
    Tapio P, Apr 12, 2004
    #1
  2. Tapio P

    Paul Turvill Guest

    Are you *placing* text, or do you want to obtain the coordinates of the
    insertion point?
    ___
     
    Paul Turvill, Apr 12, 2004
    #2
  3. Tapio P

    bob.at Guest

    Tapio,

    to insert a new text, you can use:
    (setq pt (getpoint "\nStratpoint: "))
    (command "_.text" pt "5" "" "my text")

    To get the coords of an existing text:
    (setq pt (cdr (assoc 10 (entget (car (entsel "\nSelect Text: "))))))

    bob.at
     
    bob.at, Apr 13, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.