Where are the brains here?

Discussion in 'AutoCAD' started by Bruce Sheldon, May 11, 2004.

  1. Hi Bobby,

    Long time since we've seen your posts
    around these parts....


    ;;;My version of massoc
    ;;;The keys are left with the data
    ;;;but can easily be removed with:
    ;;;(mapcar 'cdr (massoc lst key))
    (defun assoc (lst key) ; <<<<<<<-----------
    (vl-remove-if-not '(lambda (x) (= (car x) key)) lst)
    )


    --

    Autodesk Discussion Group Facilitator


    <snip>
     
    Jason Piercey, May 12, 2004
    #21
  2. Bruce Sheldon

    Rudy Tovar Guest

    Actually....



     
    Rudy Tovar, May 12, 2004
    #22
  3. Hey Jason,
    I still lurk a bit. I'll eventually find out if you're talking bad about me
    <g>
     
    Bobby C. Jones, May 12, 2004
    #23
  4. Bruce Sheldon

    Jeff Mishler Guest

    ?????????????
    Could you explain this?

    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 this bit and bit 16 are both 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)
     
    Jeff Mishler, May 12, 2004
    #24
  5. Bruce Sheldon

    Rudy Tovar Guest

    You'd better take a closer look...

     
    Rudy Tovar, May 12, 2004
    #25
  6. Bruce Sheldon

    Rudy Tovar Guest

    Don't ask me to explain. It's just the way the combination of dxf 70 and 62
    are used to record whether a layer is off, frozen, thawed, on, vport, etc.

    Back in R12 I created my first layer manager, about 13 or so years ago, and
    thats the way the it was being used. The combination of those two dxf codes
    70 and 62 could tell you the current settings for those layers in that
    vport, etc.

    I wrote the all the possible combinations down on a notepad but can't
    remember where I put it, its been a long time.
     
    Rudy Tovar, May 12, 2004
    #26
  7. Bruce Sheldon

    Jeff Mishler Guest

    I have one PS viewport in which the layer "BORDER" is frozen in that
    viewport. Layer "BORDER" is NOT frozen in general, JUST in that view port.
    Fot the life of me I cannot see how the two code below can tell me that it
    is frozen in my current viewport....

    _$ (setq lay (tblobjname "layer" "BORDER"))
    <Entity name: 400e6930>
    _$ (entget lay)
    ((-1 . <Entity name: 400e6930>) (0 . "LAYER") (330 . <Entity name:
    400c8c98>) (5 . "756") (100 . "AcDbSymbolTableRecord") (100 .
    "AcDbLayerTableRecord") (2 . "BORDER") (70 . 0) (62 . 15) (6 . "CONTINUOUS")
    (290 . 1) (370 . -3) (390 . <Entity name: 400e5d08>))

    Assoc 70 is 0
    Assoc 62 is 15

    I get the same listing no matter which viewport is active.

    I still say you need to use the Xdata or 331/341 codes of the Viewport
    entity,
    Jeff
     
    Jeff Mishler, May 12, 2004
    #27
  8. Actually, what? Please explain.
     
    Jason Piercey, May 12, 2004
    #28
  9. Show me.
     
    Jason Piercey, May 12, 2004
    #29
  10. And also thanks to Luis who provided some really nice code that reads these
    bits!

    Bruce
     
    Bruce Sheldon, May 12, 2004
    #30
  11. Rudy,
    If you ever find these notes, I would love to have them!

    Bruce
     
    Bruce Sheldon, May 12, 2004
    #31
  12. Ok Jason,

    Go up to Luis Esquivel's code and run it. Be sure you are in the MS of the
    VP, and you will see how these flags work. Good stuff!

    Bruce
     
    Bruce Sheldon, May 12, 2004
    #32
  13. Bruce Sheldon

    Jeff Mishler Guest

    And if you look at Luis' code he is using the XDATA of the VP entity! No
    special bit codes or anything else for layers frozen in that viewport......
    And his restore utility does not restore the layer's frozen/thawed state in
    a viewport.......

    Jeff
     
    Jeff Mishler, May 12, 2004
    #33
  14. Bruce Sheldon

    Jeff Mishler Guest

    I understood that Luis. I was just pointing it out, in case anyone missed
    it, so they could make the appropriate modifications to make it work.
    Especially since in other fragments of this thread there is talk of 'bits'
    to change.....

    :)
    Jeff
     
    Jeff Mishler, May 12, 2004
    #34
  15. Bruce Sheldon

    Rudy Tovar Guest

    Remember which version I was talking about?


     
    Rudy Tovar, May 12, 2004
    #35
  16. Jeff,
    You have to read the combinations of DXF codes 62 and 70 in order to get the
    VP status from the LAYER table. These are "bits" that are being read, and
    changed in the event of a restore. Of course, a person could easily use
    the -vplayer command itself to RESTORE ONLY, but I don't know how the
    command itself could ever be used to READ the status of the LAYER table in a
    viewport.

    If there's a better method, I'm all ears.

    Bruce
     
    Bruce Sheldon, May 12, 2004
    #36
  17. Bruce Sheldon

    Jeff Mishler Guest

    Bruce, the dxf codes 62 and 70 have absolutely nothing to do with the status
    of a layer within a viewport, see my post to Rudy. Code 70 DOES control how
    the layer is to be treated when creating a new viewport, but that is it.
    If I am incorrect, as Rudy seems to keep saying in not so many words, please
    show me the error of my thinking.

    Jeff
     
    Jeff Mishler, May 12, 2004
    #37
  18. Bruce Sheldon

    Rudy Tovar Guest

    Forget what I said, since what I encountered occured several versions ago.

    I found combinations being applied for -value and +values, both codes 62 70
    or what ever.

    It's been too long for me to even remember, so who care, the past is dead,
    so live with the present.

    Times change, as did the dxf code for the polyline to lwpolyline, with more
    to follow, like the block reference in entmake for dimensionstyles.

    Better to keep an eye open with all the new changes and those to come.
     
    Rudy Tovar, May 12, 2004
    #38
  19. Bruce Sheldon

    Devin Guest

    Bobby,

    Paranoid? :(
     
    Devin, May 12, 2004
    #39
  20. Well, perhaps all the details did not get sorted out properly, yet I did
    finally get the code I needed.
    Jeff, you are right, but the supplied code fills my need for all the layer
    manipulation that I was looking for. Thanks for your input, this discussion
    would not have been the same without it!

    Bruce
     
    Bruce Sheldon, May 12, 2004
    #40
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.