Michael,
It looks like I need to study your code first before attempting
modifications. :-(
It doesn't work.
Can what I have attempted to do be done?
Don
"Don Butler" wrote in message
news:4075be16$1_3@newsprd01...
> Michael:
>
> I hope you don't mind, but I have created a general purpose routine
> utilizing your code.
>
> ;|TABLE70 Bits
>
> BLOCK
> 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)
>
> LAYER
> 70 Standard flags (bit-coded values):
> 1 = Layer is frozen; otherwise layer is thawed
> 2 = Layer is frozen by default in new viewports
> 4 = Layer is locked
> 16 = If set, table entry is externally dependent on an xref
> 32 = If both this bit and bit 16 are set, the externally dependent xref
has
> been successfully resolved
> 64 = If set, the table entry was referenced by at least one entity in the
> drawing the last time the drawing was edited. (This flag is for the
benefit
> of AutoCAD commands. It can be ignored by most programs that read DXF
files
> and need not be set by programs that write DXF files)
>
> LTYPE
> 70 Standard flag values (bit-coded values):
> 16 = If set, table entry is externally dependent on an xref
> 32 = If both this bit and bit 16 are set, the externally dependent xref
has
> been successfully resolved
> 64 = If set, the table entry was referenced by at least one entity in the
> drawing the last time the drawing was edited. (This flag is for the
benefit
> of AutoCAD commands. It can be ignored by most programs that read DXF
files
> and need not be set by programs that write DXF files)
>
> STYLE
> 70 Standard flag values (bit-coded values):
> 1 = If set, this entry describes a shape
> 4 = Vertical text
> 16 = If set, table entry is externally dependent on an xref
> 32 = If both this bit and bit 16 are set, the externally dependent xref
has
> been successfully resolved
> 64 = If set, the table entry was referenced by at least one entity in the
> drawing the last time the drawing was edited. (This flag is for the
benefit
> of AutoCAD commands. It can be ignored by most programs that read DXF
files
> and need not be set by programs that write DXF files)
>
> UCS
> 70 Standard flag values (bit-coded values):
> 16 = If set, table entry is externally dependent on an xref
> 32 = If both this bit and bit 16 are set, the externally dependent xref
has
> been successfully resolved
> 64 = If set, the table entry was referenced by at least one entity in the
> drawing the last time the drawing was edited. (This flag is for the
benefit
> of AutoCAD commands. It can be ignored by most programs that read DXF
files
> and need not be set by programs that write DXF files)
>
> VIEW
> 70 Standard flag values (bit-coded values):
> 1 = If set, this is a paper space view
> 16 = If set, table entry is externally dependent on an xref
> 32 = If both this bit and bit 16 are set, the externally dependent xref
has
> been successfully resolved
> 64 = If set, the table entry was referenced by at least one entity in the
> drawing the last time the drawing was edited. (This flag is for the
benefit
> of AutoCAD commands. It can be ignored by most programs that read DXF
files
> and need not be set by programs that write DXF files)
>
> VPORT
> 70 Standard flag values (bit-coded values):
> 16 = If set, table entry is externally dependent on an xref
> 32 = If both this bit and bit 16 are set, the externally dependent xref
has
> been successfully resolved
> 64 = If set, the table entry was referenced by at least one entity in the
> drawing the last time the drawing was edited. (This flag is for the
benefit
> of AutoCAD commands. It can be ignored by most programs that read DXF
files
> and need not be set by programs that write DXF files)
>
> (table70 "LAYER" 5)
> (table70 "BLOCK" 21)...This is the same result as GetPrimaryBlockNames
>
> |;
>
> (defun table70 (table bit / data result)
> (while (setq data (tblnext table (null data)))
> (if (zerop (logand bit (cdr (assoc 70 data))))
> (setq result
> (cons (cdr (assoc 2 data))
> result
> )
> )
> )
> )
> (if (< 1 (length result))
> (acad_strlsort result)
> result
> )
> )
>
> I'd appreciate any comments you may have about potential problems using
this
> approach.
>
> Thanks,
>
> Don
>
>
>
>
> "Don Butler" wrote in message
> news:4075adde$1_2@newsprd01...
> > Very nice!
> >
> > Don
> >
> > "michael puckett" wrote in message
> news:40755a00$1_1@newsprd01...
> > > If what you are saying is that you only want primary
> > > blocks, that is, no xrefs, no xref dependent blocks,
> > > and no anonymous blocks then perhaps ... [code]
> > >
> > > (defun GetPrimaryBlockNames ( / data result )
> > > (while (setq data (tblnext "block" (null data)))
> > > ;; if it's not [xref, xref dependent, anonymous] ...
> > > (if (zerop (logand 21 (cdr (assoc 70 data))))
> > > (setq result
> > > (cons (cdr (assoc 2 data))
> > > result
> > > )
> > > )
> > > )
> > > )
> > > ;; assume for this case that
> > > ;; sorted would be preferred
> > > (if (< 1 (length result))
> > > (acad_strlsort result)
> > > result
> > > )
> > > )
> > >
> > > Note: 21 = 01 (anonymous) + _
> > > 04 (xref) + _
> > > 16 (xref dependent)
> > >
> > > [/code]
> > >
> > > PS: Thank you Jason :)
> > >
> > > "dave2" wrote in message
> > news:25899225.1081425756600.JavaMail.jive@jiveforum2.autodesk.com...
> > > Don,
> > >
> > > I'm having trouble getting this code
> > >
> > > (vl-remove-if (function (lambda (x) (wcmatch x "*|*")))(table
"BLOCK"))
> > >
> > > to remove XREF's from the list. I need it to remove all unnamed blocks
> > like (*X40 etc.) from the list as well.
> > >
> > > Any suggestions?
> > >
> > >
> >
> >
>
>