Are there new xref layers in a drawing??

Discussion in 'AutoCAD' started by Matt W, Oct 5, 2004.

  1. Matt W

    Matt W Guest

    Is there a way to determine if there are any new layers in a drawing (coming
    from xrefs) and if so, freeze them?
    Microstation has this cool feature which will allow you to essentially set
    up a list of "acceptable" layers. If there are any new ones from other
    xrefs, they won't display.

    I'm not even sure where I'd begin with this one so any help will be greatly
    appreciated.
     
    Matt W, Oct 5, 2004
    #1
  2. Automate the CAD Standards - Layer Manager.
    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Oct 6, 2004
    #2
  3. Matt W

    Matt W Guest

    Not sure I completely follow you.
    Are you talking about a DWS file?

    --
    I support two teams: the Red Sox and whoever beats the Yankees.


    | Automate the CAD Standards - Layer Manager.
    | -- Mike
    | ___________________________
    | Mike Tuersley
    | CADalyst's CAD Clinic
    | Rand IMAGINiT Technologies
    | ___________________________
    | the trick is to realize that there is no spoon...
     
    Matt W, Oct 6, 2004
    #3
  4. Matt W

    AKS Guest

    We deal with this with an automation scheme based upon the
    OLD layer manager. The scheme saves the desired layer
    display state as <a name>+<thefilename> so to produce a
    unique layer state name. Then, when there is a file update
    (new undesired layers are showing up etc.), we turn off all
    layers and then restore the saved layer state. AutoCAD will
    restore the display state for only those previously known
    layers. All the new layers are not turned on because they
    were not present when the layer state was previously
    saved.

    Since AutoCAD layers by default contain the xref file name,
    all the layers in an xref that was previously loaded but now
    went through a file name change as part of an update ( to
    reflect a revision for example) are "new". To circumvent that
    problem we change the xref block name to a static name
    since it is the xref block name, not really the file name, that
    AutoCAD uses to start the layer name. Now the xref layer
    names will always remain the same regardless of any xref
    file name change and the layer state restore scheme will
    continue to remember the previously known layer names.

    All of this process is automated, but not in VBA. I'm not sure
    the same can be done with the NEW layer state manager.
     
    AKS, Oct 6, 2004
    #4
  5. Matt W

    Matt W Guest

    Is this done every time a drawing is opened?

    --
    I support two teams: the Red Sox and whoever beats the Yankees.


    | We deal with this with an automation scheme based upon the
    | OLD layer manager. The scheme saves the desired layer
    | display state as <a name>+<thefilename> so to produce a
    | unique layer state name. Then, when there is a file update
    | (new undesired layers are showing up etc.), we turn off all
    | layers and then restore the saved layer state. AutoCAD will
    | restore the display state for only those previously known
    | layers. All the new layers are not turned on because they
    | were not present when the layer state was previously
    | saved.
    |
    | Since AutoCAD layers by default contain the xref file name,
    | all the layers in an xref that was previously loaded but now
    | went through a file name change as part of an update ( to
    | reflect a revision for example) are "new". To circumvent that
    | problem we change the xref block name to a static name
    | since it is the xref block name, not really the file name, that
    | AutoCAD uses to start the layer name. Now the xref layer
    | names will always remain the same regardless of any xref
    | file name change and the layer state restore scheme will
    | continue to remember the previously known layer names.
    |
    | All of this process is automated, but not in VBA. I'm not sure
    | the same can be done with the NEW layer state manager.
     
    Matt W, Oct 6, 2004
    #5
  6. Matt W

    AKS Guest

    No. This is not a scheme to detect new layers, nor is it a
    scheme intended to automatically reset a file to a particular
    display state upon file open. The scheme is used for xref
    updates comming from a client that are used in either plotting
    files. It is also used for working files. Typically, when used
    in working files (files not intended for plotting), a current
    display state is saved prior to switching to a temporary
    display state with a single button control. The "current"
    display state is then restored sometime later with another
    single button control.
     
    AKS, Oct 7, 2004
    #6
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.