Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Attribute replacing

  1. #11
    I could stop if I wanted to
    Join Date
    2009-03
    Location
    London, England
    Posts
    304
    Login to Give a bone
    0

    Default Re: Attribute replacing

    Perhaps?

    Code:
    (defun c:bump ( / a g ) ;; Lee Mac 2011
      (cond
        ( (setq a (ssget "_+.:S:E:L" '((0 . "INSERT") (66 . 1))))
          (setq a (vlax-invoke (vlax-ename->vla-object (ssname a 0)) 'getattributes))
          (princ "\nPress [+/-] to Bump Attributes Up & Down. <Done>")
          (while (member (setq g (grread nil 10)) '((2 45) (2 95) (2 43) (2 61)))
            (mapcar 'vla-put-textstring a
              (mapcar 'vla-get-textstring
                (if (member g '((2 45) (2 95))) (cons (last a) a) (append (cdr a) (list (car a))))
              )
            )
          )
        )
      )
      (princ)
    )
    (vl-load-com) (princ)
    Bump.gif
    Last edited by Lee Mac; 2011-07-26 at 03:06 PM.

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

    Default Re: Attribute replacing

    Quote Originally Posted by Lee Mac View Post
    [code]
    (while (member (setq g (grread nil 10)) '((2 45) (2 95) (2 43) (2 61)))......
    Brilliant

  3. #13
    I could stop if I wanted to
    Join Date
    2009-03
    Location
    London, England
    Posts
    304
    Login to Give a bone
    0

    Default Re: Attribute replacing

    Thanks pBe

  4. #14
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Attribute replacing

    Lee .

    The routine stops at the princ function without a movement unless I cancel the process

    Thanks.

  5. #15
    I could stop if I wanted to
    Join Date
    2009-03
    Location
    London, England
    Posts
    304
    Login to Give a bone
    0

    Default Re: Attribute replacing

    Quote Originally Posted by tharwat View Post
    The routine stops at the princ function without a movement unless I cancel the process
    Did you try to press '+' or '-' at the message? You can exit by pressing any key other than +/- or by clicking.

  6. #16
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Attribute replacing

    Quote Originally Posted by Lee Mac View Post
    Did you try to press '+' or '-' at the message?
    Of course I did and it is the place where it hangs.

    Quote Originally Posted by Lee Mac View Post
    You can exit by pressing any key other than +/- or by clicking.
    It does not allow me unless I hit the Esc button from the Keyboard .

    Could it be the cond function which cause this ?

  7. #17
    Active Member
    Join Date
    2015-08
    Posts
    59
    Login to Give a bone
    0

    Default Re: Attribute replacing

    Quote Originally Posted by Lee Mac View Post
    Did you try to press '+' or '-' at the message? You can exit by pressing any key other than +/- or by clicking.
    Sorry my friend, its not working for me either. + or - has no reaction.
    Steve

  8. #18
    I could stop if I wanted to
    Join Date
    2009-03
    Location
    London, England
    Posts
    304
    Login to Give a bone
    0

    Default Re: Attribute replacing

    That's odd - everything worked well in my tests

    Are you trying on blocks with more than 1 attrib?

  9. #19
    Active Member
    Join Date
    2015-08
    Posts
    59
    Login to Give a bone
    0

    Default Re: Attribute replacing

    Quote Originally Posted by Lee Mac View Post
    Did you try to press '+' or '-' at the message? You can exit by pressing any key other than +/- or by clicking.
    Quote Originally Posted by Lee Mac View Post
    That's odd - everything worked well in my tests

    Are you trying on blocks with more than 1 attrib?
    No sir. a very simple block, circle with one attribute (number) inside.

  10. #20
    I could stop if I wanted to
    Join Date
    2009-03
    Location
    London, England
    Posts
    304
    Login to Give a bone
    0

    Default Re: Attribute replacing

    Quote Originally Posted by steveo View Post
    No sir. a very simple block, circle with one attribute (number) inside.
    That explains the reason the code 'appears' to hang. The program is intended to shift the attribute values of multiple tags, hence when used on a block with one attribute, there would be no effect.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replacing attribute values via an excel file
    By jgardner.79905 in forum AutoLISP
    Replies: 9
    Last Post: 2010-07-28, 12:16 PM
  2. Replacing Blocks
    By jitesh789 in forum AutoLISP
    Replies: 2
    Last Post: 2008-04-05, 05:21 PM
  3. Replacing Doors
    By nsinha73 in forum Revit Architecture - General
    Replies: 3
    Last Post: 2007-01-29, 10:35 PM
  4. Replacing Text
    By masonjur in forum Revit Architecture - General
    Replies: 2
    Last Post: 2006-08-28, 03:46 PM
  5. Replacing Blocks
    By bwilliams.72594 in forum AutoCAD General
    Replies: 2
    Last Post: 2005-10-05, 05:52 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
  •