+ Reply to Thread
Results 1 to 6 of 6

Thread: Atrribute width

  1. #1
    Full Member
    Using
    MEP 2010
    Join Date
    Apr 2010
    Posts
    28

    Default Atrribute width

    Registered forum members do not see this ad.

    We use this lisp routine to change the attribute width in a block but since we have converted our block to being annotative it does not function correctly. When selecting a block the attribute gets really large and I’m not sure how to fix the routine so that the attribute does not get bigger in size.
    Would someone point me in the right direction?



    Code:
    ; WIDEDIT.LSP    c.2000  Rob Herr
    ; 'Edit Nested Attribute Width'    v 1.0    17 Feb 2000
    ;
    ; This routine lets you modify the width of and attribute in a block 
    ; without exploding the attribute
    ;
    ; Pick one attribute. The current width is given and you are prompted
    ; for a new width. Works with Attributes also Attributes within blocks.
    ; 
    ;  ___________________________________________________________________
    ;  |     PERMISSION HEREBY GRANTED BLA, BLA, BLA, TO MODIFY ETC.     |
    ;  |   As long as name and email remain with the original program    |
    ;  | unaltered. However I would like to know of any bugs or problems |
    ;  |   that arise with the actual program. And of course I take no   |
    ;  |  responsibility for lost limbs, auto repair bills, mechanical   |
    ;  |         or electronic difficulties, or snake venom.             |
    ;  -------------------------------------------------------------------
    
    (defun c:widedit (/ attent typ wd uwd)
     (setvar "CMDECHO" 0)
     (setq attent (entget (car (nentsel "\nSelect attribute: "))))
     (setq typ (cdr (assoc 0 attent)))
     (if
      (cond
       ((= typ "ATTRIB"))
       ((= typ "T"))
      )
      (progn
       (setq wd (rtos (cdr (assoc 41 attent)) 2))
       (prompt (strcat "\nCurrent Width is <"wd"> "))
       (setq uwd (getreal "\nEnter new width... "))
       (setq attent (subst (cons 41 uwd) (assoc 41 attent) attent))
       (entmod attent)
       (command "REGEN")
      )
      (prompt "\nNo Attributes Selected")
     )
     (setvar "CMDECHO" 1)
     (prompt "\nBy Rob Herr")(print)
    )

    Thanks,
    Sean

  2. #2
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2013
    Join Date
    Apr 2008
    Posts
    6,144

    Default

    It will be based on a percentage of the cannoscale or cannoscalevalue.

    eg.
    Instead of 1.6 for 20 scale (0.8 times scale), it would be 0.8 for 20 scale. In code, you could just divide the 1.6 by your scale to get the correct number.
    DropBox | finding the light...
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

  3. #3
    Forum Newbie
    Using
    AutoCAD 2014
    Join Date
    Oct 2008
    Location
    the Netherlands
    Posts
    9

    Default

    I think you've also made the attribute annotative. You must only make the block annotatative, not the attribute!
    If you have also made the attribute annotative it will scale twice (=quadratic): with the block and on it's own.

  4. #4
    Full Member
    Using
    MEP 2010
    Join Date
    Apr 2010
    Posts
    28

    Default

    Quote Originally Posted by alanjt View Post
    It will be based on a percentage of the cannoscale or cannoscalevalue.

    eg.
    Instead of 1.6 for 20 scale (0.8 times scale), it would be 0.8 for 20 scale. In code, you could just divide the 1.6 by your scale to get the correct number.

    Sorry I'm not following your example.

  5. #5
    Full Member
    Using
    MEP 2010
    Join Date
    Apr 2010
    Posts
    28

    Default

    Quote Originally Posted by Crank View Post
    I think you've also made the attribute annotative. You must only make the block annotatative, not the attribute!
    If you have also made the attribute annotative it will scale twice (=quadratic): with the block and on it's own.

    I verified the block and the attributes are not annotative just the block is.

  6. #6
    Full Member
    Using
    MEP 2010
    Join Date
    Apr 2010
    Posts
    28

    Default

    Registered forum members do not see this ad.

    One thing I did notice is that if the anno scale is 1:1 it works correctly but if it is any other anno scale not so much.

Similar Threads

  1. DCL text and box width
    By guitarguy1685 in forum AutoLISP, Visual LISP & DCL
    Replies: 13
    Last Post: 26th Mar 2010, 10:06 pm
  2. Multiple Atrribute Edit
    By _dk_ in forum AutoLISP, Visual LISP & DCL
    Replies: 13
    Last Post: 9th Nov 2009, 08:19 pm
  3. Polyline Width
    By Tconn in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 19th Apr 2006, 05:51 pm
  4. Polyline width
    By viriato79 in forum AutoCAD Beginners' Area
    Replies: 5
    Last Post: 31st Mar 2006, 02:10 pm
  5. Arc with width
    By SpeedCAD in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 17th Jan 2004, 02:57 pm

Bookmarks

Posting Permissions

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