Lock a Layer

Discussion in 'AutoCAD' started by Mike Tuersley, Jan 22, 2004.

  1. Locking a layer is easy enough - I believe its oLayer.Lock = True. You
    could then try finding out if an event is fired whenever a layer is
    unlocked, test for your layer name and relock it. You could also check
    the endcommand event, test to see if it was one of the layer commands
    and, again, test the status of your locked layer. Not sure if these
    suggestions will work, but that's what I'd try.
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 22, 2004
    #1
  2. Mike Tuersley

    Ralf Davi Guest

    Hi.
    I'd like to know if is possible to lock a layer and deny users to unlock
    it.
    Does anybody know how to do it or just if it's possible ?

    Thanks,

    Ralf Davi.
     
    Ralf Davi, Jan 22, 2004
    #2
  3. Well you didn't state you were going to send this somewhere. If that is
    the case you have two options: export or third party

    Export - save the file to dwf, pdf or another file type
    3rd Party - look at CADLock or another security tool

    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 22, 2004
    #3
  4. Mike Tuersley

    Joe Sutphin Guest

    No, for this one customer you can embed the macro with the drawing.

    Joe
     
    Joe Sutphin, Jan 22, 2004
    #4
  5. Yeah, he could, but it isn't secure - that's why I didn't list it as an
    option.
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 22, 2004
    #5
  6. Mike Tuersley

    Ralf Davi Guest

    Maybe this would work, but it will work just for the AutoCAD that have
    this macro running.
    Now, imagine that I wann send the document to my client and he cannot
    change one of three layers. He hasn't the macro running on his machine.
    I think that I have to do it in the document...but have no ideia...
     
    Ralf Davi, Jan 22, 2004
    #6
  7. Mike Tuersley

    Mark Propst Guest

    can you use an embedded dvb? then it's in the dwg.
     
    Mark Propst, Jan 22, 2004
    #7
  8. Mike Tuersley

    Joe Sutphin Guest

    Put a password on the DVB.

    Joe
     
    Joe Sutphin, Jan 22, 2004
    #8
  9. Sure but it depends on the level of security he wants. Its way too easy
    to crack a dvb password. I guess he never explained why he wants the
    security. If he's worried about a liability/legality issue with the
    client, I'd still pursue the first two opts I gave. If its just a 'don't
    touch our stuff' thing, embedding the dvb w/ a password would fulfill
    his need. I had 'read' the first case into his request.
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 22, 2004
    #9
  10. Mike Tuersley

    Joe Sutphin Guest

    My personal vote is for the PDF, but then like you said, he may have a
    reason for allowing them to access the actual DWG file.

    Joe
     
    Joe Sutphin, Jan 22, 2004
    #10
  11. Mike Tuersley

    Ralf Davi Guest

    But I don't understand how can I embed a macro with the drawing ?
    Can u explain me better ?
     
    Ralf Davi, Jan 22, 2004
    #11
  12. Mike Tuersley

    Doug Broad Guest

    To embed:
    vbaman at the command line.
    Select the vba project from the list
    Choose embed.

    Embeded projects require the permission of the one
    opening the drawing to enable the macros. So this
    is of little value if you are trying to force the user to
    behave a certain way.
     
    Doug Broad, Jan 22, 2004
    #12
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.