I was looking up the function of "logand " and reading up on the "bitwise and". What I need to know is where can I find a comprehensive list indicating the various binary numbers for particular autocad states, is there a table somewhere ? For instance I found this routine on ACADX.com and need help knowing which bit is mapped to what state ????
(defun listxrefs
(apply
'append
(mapcar
'(lambda (x / elist code)
(if
(= (logand (setq code
(cdr
(assoc 70
(setq elist (entget (tblobjname "block" x)))
)
)
)
4
)
4
)
; obviously 4 is the binary number here indidcating that bit 3 is a 1 !!!!!!! ; so where do I find a list of these things??????
(list (list (cdr (assoc 2 elist))
(if (= (logand code 8) 8)
"Overlay"
"Attachment"
)
; likewise for the 4th bit indicating its an overlay !!!!! (if (= (logand code 32) 32) "Loaded" "Unloaded" ) (cdr (assoc 1 elist)) ) ) ) ) (table "block") ) )
)
Thanks for any help on this!
Jim Trainer
CAD Manager
R.W.Beck,Inc.
Seattle , Wa.
206-695-4749
(defun listxrefs
(apply
'append
(mapcar
'(lambda (x / elist code)
(if
(= (logand (setq code
(cdr
(assoc 70
(setq elist (entget (tblobjname "block" x)))
)
)
)
4
)
4
)
; obviously 4 is the binary number here indidcating that bit 3 is a 1 !!!!!!! ; so where do I find a list of these things??????
(list (list (cdr (assoc 2 elist))
(if (= (logand code 8) 8)
"Overlay"
"Attachment"
)
; likewise for the 4th bit indicating its an overlay !!!!! (if (= (logand code 32) 32) "Loaded" "Unloaded" ) (cdr (assoc 1 elist)) ) ) ) ) (table "block") ) )
)
Thanks for any help on this!
Jim Trainer
CAD Manager
R.W.Beck,Inc.
Seattle , Wa.
206-695-4749