logand function

Discussion in 'AutoCAD' started by Jtrainer, Jan 7, 2004.

  1. Jtrainer

    Jtrainer Guest

    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
     
    Jtrainer, Jan 7, 2004
    #1
  2. Jtrainer

    Mark Propst Guest

    The help files under dxf codes list such data depending on the specific item
    you're looking for

    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 ?
    bit is mapped to what state ????
     
    Mark Propst, Jan 7, 2004
    #2
  3. Jtrainer

    Jtrainer Guest

    CAN YOU GIVE ME A N EXAMPLE OF THIS? i CANT SEEM TO FIND ANYTHING, SUCH AS THIS ISXREF STATE FOR A BLOCK TABLE ENTRY AS IN THE EXAMPLE I INCLUDED.
    JT
     
    Jtrainer, Jan 7, 2004
    #3
  4. Jtrainer

    Jeff Mishler Guest

    Whoa! Hit that CAPSLOCK key, please.

    Straight from the DXF Reference, BLOCKS Section, BLOCK definition:
    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)


    HTH,
    Jeff

    SUCH AS THIS ISXREF STATE FOR A BLOCK TABLE ENTRY AS IN THE EXAMPLE I
    INCLUDED.
     
    Jeff Mishler, Jan 7, 2004
    #4
  5. Jtrainer

    rdi Guest

    List of DXF Codes (what you're asking for):
    http://www.afralisp.com/zip1/dxf.zip

    --

    RDI

    (remove the exclamation from the email address)

    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 ?
    bit is mapped to what state ????
     
    rdi, Jan 9, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.