Results 1 to 4 of 4

Thread: HELP: List routine wont work on muliline text only single line text.

  1. #1
    Member
    Join Date
    2013-01
    Posts
    11
    Login to Give a bone
    0

    Default HELP: List routine wont work on muliline text only single line text.

    Hey guys,

    Just need to know if anyone can help me with a routine that was written a while ago.
    Basically, it has the capabilities to add additional increments to a single line text attribute withing a block.

    (Defun c:Pilnum (/ startnumber limit
    nestedobjsectselectionmode
    entitydata
    selectedentitytype
    attributeValuetobereplace
    )
    ;;;; dumbed down as per your request ;;;
    (initget 7)
    (while (not (progn
    (setq startnumber (getstring "\nEnter Start number: "))
    (if (and
    (numberp (setq limit (read startnumber)))
    (<= limit 2000000))
    limit
    (and (princ "\n<Invalid number>") nil)))))
    (while (setq nestedobjsectselectionmode (car (nentsel "\nSelect Attribute/Enter to exit:")))
    (setq entitydata (entget nestedobjsectselectionmode))
    (setq selectedentitytype (cdr (assoc 0 entitydata)))
    (if (eq selectedentitytype "ATTRIB")
    (progn
    (setq attributeValuetobereplace (assoc 1 entitydata))
    (entmod (subst (cons 1
    (strcat "" (itoa limit)))
    attributeValuetobereplace
    entitydata))
    (setq limit (+ 1 limit))
    )
    (princ "\nNot an attribute definition"))
    )
    (princ)
    )




    is there a way to get it to work with multiline text?

    Thanks in advance.. Rico
    Last edited by ECASAOL350033; 2013-12-12 at 04:37 AM.

  2. #2
    All AUGI, all the time pbejse's Avatar
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: HELP: List routine wont work on muliline text only single line text.

    Code:
    (Defun c:Pilnum (/ startnumber limit
    nestedobjsectselectionmode
    entitydata
    selectedentitytype
    attributeValuetobereplace
    )
    ;;;; dumbed down as per your request	 ;;;
    (princ "EDP Pillar Increment by Rico")
    .....

    That looks awfully familiar. --> Right here

  3. #3
    Member
    Join Date
    2013-01
    Posts
    11
    Login to Give a bone
    0

    Default Re: HELP: List routine wont work on muliline text only single line text.

    yes!!!!

    the man!!!

    is there a way to make it work on multiline attributes?

  4. #4
    All AUGI, all the time pbejse's Avatar
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: HELP: List routine wont work on muliline text only single line text.

    Quote Originally Posted by ECASAOL350033 View Post
    is there a way to make it work on multiline attributes?
    to be on the cear, Multiline attributes? not MTEXT? or ALSO for MTEXT/TEXT/Multi Line Attributes?

    Code:
    (Defun c:INC (/ startnumber limit estedobjsectselectionmode
    	       entitydata selectedentitytype )
    ;;;	Add Vl function to avoid issues with Annotative properties	;;;
      (initget 7)
      (while (not
    	   (progn
    	     (setq startnumber (getstring "\nEnter Start number: "))
    	     (if (and
    		   (numberp (setq limit (read startnumber)))
    		   (<= limit 2000000)
    		 )
    	       limit
    	       (and (princ "\n<Invalid number>") nil)
    	     )
    	   )
    	 )
      )
      (while (progn
    	   (setq nestedobjsectselectionmode
    		  (car
    		    (nentsel
    		      "\nSelect Attribute/Enter to exit:"
    		    )
    		  )
    	   )
    	   (setq entitydata (entget nestedobjsectselectionmode))
    	   (setq selectedentitytype (cdr (assoc 0 entitydata)))
    	   (wcmatch selectedentitytype "ATTRIB,*TEXT")
    	 )
        (vla-put-textstring
          (vlax-ename->vla-object nestedobjsectselectionmode)
          (itoa limit)
        )
        (setq limit (+ 1 limit))
      )
    
      (princ)
    )
    (vl-load-com)
    Last edited by pbejse; 2013-12-13 at 10:10 AM.

Similar Threads

  1. 2013: Single line text won't rotate
    By funkeoye in forum AutoCAD Annotation
    Replies: 4
    Last Post: 2013-05-10, 12:30 AM
  2. Associative Single Line Text
    By Light Guy in forum AutoCAD General
    Replies: 3
    Last Post: 2008-12-15, 12:46 PM
  3. Single mouse click to edit single line text
    By cjshaw in forum AutoCAD LT - General
    Replies: 5
    Last Post: 2007-02-14, 04:59 PM
  4. Convert single line text to multi line text?
    By civilguy in forum AutoCAD General
    Replies: 3
    Last Post: 2006-10-11, 11:37 PM
  5. Single line Text or Multiline Text
    By Spenner in forum AutoCAD General
    Replies: 29
    Last Post: 2006-06-02, 11:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •