Results 1 to 2 of 2

Thread: Change blocked text with multiple change it property

  1. #1
    100 Club
    Join Date
    2011-08
    Location
    Vadodara, India
    Posts
    147
    Login to Give a bone
    0

    Default Change blocked text with multiple change it property

    Hi!

    I want to change blocked text its width of text and add suffix, I have attached my Code to check where I am wrong?

    Thanks,

    Avinash patil

    Code:
    (defun c:PnXx(/ txtname sslen c1 txtnm txtnm1 opptxtnm opptxtnm2 e memno opptxtnm2 pnnewtext v2d)  (setq txtname (ssget (list (cons 0 "insert"))))
          (setq sslen (sslength txtname))
      (setq c1 0)
        (while (> sslen c1)
          (setq txtnm (entnext (ssname txtname c1))) ;selection for Attrib
          (setq txtnm1 (ssname txtname c1))	;selection for text
          (setq opptxtnm (entget txtnm))
          (setq opptxtnm2 (entget txtnm1))
          (if (= (cdr (assoc 0 (entget txtnm1))) "INSERT")
    	(progn
    	  (cdr (assoc 0 (setq e (entget txtnm))))
    	  (setq memno (cdr (assoc 1 e)))
    	)				;end progn
          )					;end if
    (if (= (cdr (assoc 0 opptxtnm)) "TEXT")
    	(setq memno (cdr (assoc 1 opptxtnm)))
          )
          (setq PNNewText (strcat memno "X"))
          (setq v2d (subst (cons 1 PNNewText) (assoc 1 e) e))
          (entmod v2d)
          (entupd txtnm)
          (if (= (cdr (assoc 0 opptxtnm2)) "TEXT")
            (setq memno1 (cdr (assoc 41 opptxtnm2)))
          )
          (setq v2d1 (subst (cons 41 0.65) (assoc 41 e) e))
          (entmod v2d1)
          (entupd txtnm1)
      (setq c1 (+ c1 1))
    )
      (princ)
      )
    Last edited by Opie; 2020-12-30 at 01:24 PM. Reason: [code] tags corrected.

  2. #2
    Active Member
    Join Date
    2015-12
    Location
    Western Europe
    Posts
    57
    Login to Give a bone
    0

    Default Re: Change blocked text with multiple change it property

    Are you trying to change TEXT entities in blocks, Attributes in blocks or both?

Similar Threads

  1. Tags atributes blocked (bloqueados)
    By goulart.arquitetura in forum ACA General
    Replies: 11
    Last Post: 2007-05-16, 06:49 PM
  2. Blocked Inserted is Wrong Scale
    By jruth in forum AutoCAD General
    Replies: 3
    Last Post: 2006-06-15, 07:35 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
  •