×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

An Autolisp Lesson part 4 the legend continues.....

An Autolisp Lesson part 4 the legend continues.....

An Autolisp Lesson part 4 the legend continues.....

(OP)
ok well then 2 things to talk about this time but first i want to say thanks to tigrek and striker cause im learning so much if i could i'd give you both 3 stars

ok well im ready to edit the linelength.lsp one more time. this time i want and need to do a couple of things. 1 set up so that when it lables its readable down & right. also i want to semi incorperate another lsp in this one to allow me to append and prefix each lable.And for all the settings i would like them to either default to a perticular setting or assume the last option the default unless otherwise changed. i think that this would be the most used part i would use!!!

as for the append/Precede lsp here is the code i called the lisp ADD2TXT.lsp

(defun c:addtxt()
        (setq count 0)
        (setq txt_t_add (getstring T "\nEnter additional text: "))
        (initget "A P")
        (setq AP (getkword "\nAppend/<Precede>: "))
        (princ "Select text: ")
        (setq txtset (ssget '((0 . "TEXT"))))
        (repeat (sslength txtset)
                (setq txt1 (entget (ssname txtset count))
                      txt2 (assoc 1 txt1)
                      txt (cdr txt2)
                );  end setquote
                (cond
                      ((= AP "P" )(setq newstrng (strcat txt_t_add txt)))
                      ((= AP "A")(setq newstrng (strcat txt txt_t_add)))
                      ((null AP)(setq newstrng (strcat txt_t_add txt)))
                );end cond
                (setq nwtxtent (subst (cons 1 newstrng) txt2 txt1))  
                (ENTMOD nwtxtent)
                (setq count (+ count 1))
        );end repeat
 )
 
ok now i just need to know at what point to tell it to use this command in our linelength.lsp

Also i have an object # lsp that supposedly uses #'s  Letter's to kinda lable things but i would like to set it so it does either eddits text and adds a # to the end or a letter and then cycles thru a given sequence like say i only want it to go 1-10 or A-D/L/Z but have some kind of a way to specify and set defauls like i was talking about in the previous

PS tigrek
i agree with you on the text rotation its not really that important but say if you were aligning something with something it would probably be a good idea to know but i have sill yet to get the snipit to work later in this thread ill post the code with it set like that and show the errors i got

later guys gotta go home and fix the sink

if everyone helps everybody the world will be a better place

RE: An Autolisp Lesson part 4 the legend continues.....

I will post an example to show how to place text on top or right side of a line only.

RE: An Autolisp Lesson part 4 the legend continues.....

(OP)
Was just thinking a little more on the add2txt routine what about an option to add to the begining and the end at the same time how do ya goabout setting that up with what we got ???

if everyone helps everybody the world will be a better place

RE: An Autolisp Lesson part 4 the legend continues.....

(OP)
so striker what happened did you get bussy i thought you were going to show us an example of that code of how it does it :)

if everyone helps everybody the world will be a better place

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources