+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Full Member CHLUCFENG's Avatar
    Computer Details
    CHLUCFENG's Computer Details
    Operating System:
    Windows
    Using
    ADT 2006
    Join Date
    Jun 2010
    Location
    Altamonte Springs, FL
    Posts
    52

    Default Flag for Overlay vs. Attachment

    Registered forum members do not see this ad.

    For XREF's, I want to change overlays to attachments. Can someone tell me the dotted pair that denotes which is which?

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,882

    Default

    Bit coded group 70 in the block definition table
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  3. #3
    Full Member CHLUCFENG's Avatar
    Computer Details
    CHLUCFENG's Computer Details
    Operating System:
    Windows
    Using
    ADT 2006
    Join Date
    Jun 2010
    Location
    Altamonte Springs, FL
    Posts
    52

    Default

    Thanks,

    Chuck

  4. #4
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,882

    Default

    No worries Chuck
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  5. #5
    Full Member CHLUCFENG's Avatar
    Computer Details
    CHLUCFENG's Computer Details
    Operating System:
    Windows
    Using
    ADT 2006
    Join Date
    Jun 2010
    Location
    Altamonte Springs, FL
    Posts
    52

    Default

    I use this get.lsp fuction from an old AutoLisp book I had:

    Code:
     
    (defun c:get ()
      (SETQ ENT (ENTSEL))
      (SETQ ENT1 (ENTGET (CAR ENT)))
      (SETQ CT 0)
      (TEXTPAGE)
      (PRINC "\n  ENTGET OF SELECTED ENTITY:")
      (REPEAT (LENGTH ENT1)
        (PRINT (NTH CT ENT1))
        (SETQ CT (1+ CT)))
      (princ)
    )
    For the 70 bitcode, I get (70 . 0) for both Xref's that are attached and Xref's that are overlayed. Shouldn't I be getting a different value for one of them?

  6. #6
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,882

    Default

    Quote Originally Posted by Lee Mac View Post
    Bit coded group 70 in the block definition table
    Code:
    (defun GetBlockFlag ( blockname )
      (if (setq def (tblobjname "BLOCK" blockname))
        (cdr
          (assoc 70
            (entget def)
          )
        )
      )
    )
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  7. #7
    Full Member CHLUCFENG's Avatar
    Computer Details
    CHLUCFENG's Computer Details
    Operating System:
    Windows
    Using
    ADT 2006
    Join Date
    Jun 2010
    Location
    Altamonte Springs, FL
    Posts
    52

    Default

    Ah....

    (70 . 36) = attached
    (70 . 44) = overlay

    Thank You, Domo Arigato, Muchas Gracias, and Cheers...

    Chuck

  8. #8
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,882

    Default

    Slightly more complex than that...

    Code:
    (defun isXRef ( blockname )
      (= 4 (boole 1 4 (GetBlockFlag blockname)))
    )
    
    (defun isOverlay ( blockname )
      (= 8 (boole 1 8 (GetBlockFlag blockname)))
    )
    
    (defun GetBlockFlag ( blockname )
      (if (setq def (tblobjname "BLOCK" blockname))
        (cdr
          (assoc 70
            (entget def)
          )
        )
      )
    )
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  9. #9
    Full Member CHLUCFENG's Avatar
    Computer Details
    CHLUCFENG's Computer Details
    Operating System:
    Windows
    Using
    ADT 2006
    Join Date
    Jun 2010
    Location
    Altamonte Springs, FL
    Posts
    52

    Default

    I did the manual "double click" on all the overlays within some building plans yesterday. I am working on automating that portion for future updates from that architect. Had to start with which parameter to change.

    I plugged your code into the get function:

    Code:
     
    (defun GetBlockFlag ();\ blockname)
      (setq blockname (cdr (assoc 2 ENT1)))
      (if (= (cdr (assoc 0 ENT1)) "INSERT")
        (progn
          (setq def (tblobjname "BLOCK" blockname))
          (cdr (assoc 70 (entget def)))
        )
      )
    )
    (defun c:get ()
      (SETQ ENT (ENTSEL))
      (SETQ ENT1 (ENTGET (CAR ENT)))
      (SETQ CT 0)
      (TEXTPAGE)
      (PRINC "\n  ENTGET OF SELECTED ENTITY:")
      (REPEAT (LENGTH ENT1)
        (PRINT (NTH CT ENT1))
        (SETQ CT (1+ CT)))
      (getblockflag)  
      (princ)
    )
    I am still getting an error, but was able to copy/paste portions to the text editor to get the resulting values. I'm still trying to fix it up.

  10. #10
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,882

    Default

    Registered forum members do not see this ad.

    Code:
    (defun c:get ( / ss ) ;; Lee Mac
      (if (setq ss (ssget "_+.:E:S" '((0 . "INSERT"))))
        (print
          (GetBlockFlag
            (cdr
              (assoc 2
                (entget (ssname ss 0))
              )
            )
          )
        )
      )
      (princ)
    )
    
    (defun GetBlockFlag ( blockname ) ;; Lee Mac
      (if (setq def (tblobjname "BLOCK" blockname))
        (cdr
          (assoc 70
            (entget def)
          )
        )
      )
    )
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

Similar Threads

  1. Difference between attachment & overlay
    By rengised in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 6th Jun 2010, 06:23 pm
  2. X-ref.. Attachment Or Overlay
    By T704 in forum AutoCAD General
    Replies: 5
    Last Post: 14th Apr 2010, 08:08 pm
  3. making a flag
    By mossieramm in forum Rigging & Animation
    Replies: 1
    Last Post: 6th Oct 2009, 01:40 pm
  4. TAB flag
    By eldon in forum Feedback
    Replies: 3
    Last Post: 6th Aug 2007, 02:17 am
  5. Drawing a flag
    By Raider in forum AutoCAD General
    Replies: 2
    Last Post: 9th Oct 2006, 01:41 am

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