Author Topic: (renamed) Selecting all overlayed xrefs.  (Read 3041 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7529
(renamed) Selecting all overlayed xrefs.
« on: September 29, 2004, 12:20:16 PM »
Why doesn't thi select all xrefs and overlays in a drawing?


(setq s1 (ssget "x"'((70 . 12))))


Code: [Select]
70 Block-type flags (bit coded values, may be combined):
0 = Indicates none of the following flags apply
1 = This is an anonymous block generated by hatching, associative
dimensioning, other internal operations, or an application
2 = This block has non-constant attribute definitions (this bit is not set if
the block has any attribute definitions that are constant, or has no
attribute definitions at all)
4 = This block is an external reference (xref)
8 = This block is an xref overlay
16 = This block is externally dependent
32 = This is a resolved external reference, or dependent of an external
reference (ignored on input)
64 = This definition is a referenced external reference (ignored
on input)




*Se7en edit: Renamed this thread. Orig title: "Why doesn't this select ..."

MP Edit: Fixed grammar of title; "Xrefs and Overlays" is like saying "Apples and Red ones".
[/i]

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

David Bethel

  • Swamp Rat
  • Posts: 656
(renamed) Selecting all overlayed xrefs.
« Reply #1 on: September 29, 2004, 12:33:20 PM »
(ssget) works with the inserts, not block table definitions.  

You will have to step, through the block table to find them.  -David
R12 Dos - A2K

David Bethel

  • Swamp Rat
  • Posts: 656
(renamed) Selecting all overlayed xrefs.
« Reply #2 on: September 29, 2004, 12:45:59 PM »
It would look something like this.  -David

Code: [Select]
 (while (setq tdef (tblnext "BLOCK" (not tdef)))
         (setq bn (cdr (assoc 2 tdef))
               fg (cdr (assoc 70 tdef)))
         (princ (strcat
          "\n" bn  " is "
         (if (= (logand fg  1)  1) "Anonymous " "")
         (if (= (logand fg  2)  2) "Attributed " "")
         (if (= (logand fg  4)  4) "XRef " "")
         (if (= (logand fg  8)  8) "Overlayed " "")
         (if (= (logand fg 16) 16) "External Dependent " "")
         (if (= (logand fg 32) 32) "Resolved External Dependent " "")
         (if (= (logand fg 64) 64) "Referenced " "")
         )))
R12 Dos - A2K

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
(renamed) Selecting all overlayed xrefs.
« Reply #3 on: September 29, 2004, 12:52:02 PM »
Side note: I feel the title of this thread should be changed.  ...I will rename it.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

t-bear

  • Guest
(renamed) Selecting all overlayed xrefs.
« Reply #4 on: September 29, 2004, 12:57:30 PM »
Arrogant little twit, ain't he?
Thanks, Se7en..........

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
(renamed) Selecting all overlayed xrefs.
« Reply #5 on: September 29, 2004, 01:49:22 PM »
Code: [Select]
If eq Who me? = "Yes"
 Then
    reply: "No, i jut feel that a proper title gets better results, so i renamed it for the benefit of ronjonp."
  Else
    reply: "Yes i agree with you."
 End If
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

M-dub

  • Guest
(renamed) Selecting all overlayed xrefs.
« Reply #6 on: September 29, 2004, 01:51:37 PM »
:lol:

ronjonp

  • Needs a day job
  • Posts: 7529
Re: (renamed) Selecting all overlayed xrefs.
« Reply #7 on: June 20, 2007, 11:27:02 AM »
I was just browsing around and found this topic......thanks for the help (3 years late)  :oops: :-D

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC