Results 1 to 4 of 4

Thread: Block Attribute Update

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    2021-08
    Posts
    23
    Login to Give a bone
    0

    Default Block Attribute Update

    I am trying to create a lisp that will update a title block 'SNP-00A1AH00PW'

    I have a block named "SNP-00A1AH00PW".

    There are 2 specific attributes which I want to change in it.

    The attribute names are...

    TITLE1 & TITLE2

    TITLE1 will = SIP
    TITLE2 will = STAGE_2

    I have currently put together the following. However, this does not seem to work. Any help would be appreciated.
    Code:
    (if ;;retrieve a set of attributed blocks
            (setq s ;; Assign the selection set pointer to variable 's'
                (ssget "_X" ;; Search entire database
                   '(
                        (0 . "INSERT") ;; Block References
                        (66 . 1) ;; Attributed
                        (2 . "SNP-00A1AH00PW") ;; with name SNP-00A1AH00PW
                    )
                ) ;; end SSGET
            ) ;; end SETQ
    
               
                (if (setq x )
                        (setq l
                            (cons
                               '(
                                    ("TITLE1"  . "SIP")
                                    ("TITLE2" .  "STAGE_2")
                                )
                            ) ;; end CONS
                        ) ;; end SETQ
    Last edited by Opie; 2023-09-26 at 03:47 PM. Reason: [code] tags added

Similar Threads

  1. Replies: 8
    Last Post: 2018-11-19, 06:05 AM
  2. Update "Prompt" tab in an existing Block Attribute.
    By joelnishan605002 in forum ARX
    Replies: 0
    Last Post: 2014-03-24, 09:04 PM
  3. Copy previous Block Attribute Value to next Block Attribute
    By CADfunk MC in forum VBA/COM Interop
    Replies: 8
    Last Post: 2009-02-27, 09:46 PM
  4. Replies: 27
    Last Post: 2006-10-06, 01:04 PM
  5. Replies: 5
    Last Post: 2006-08-11, 01:32 PM

Tags for this Thread

Posting Permissions

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