Auto-freeze new xref'd layers on open?

Discussion in 'AutoCAD' started by Josh, Aug 20, 2004.

  1. Josh

    Josh Guest

    We have two departments who share data between them via xrefs. I xref their
    drawing and freeze the data I don't need and visa versa. However, when a
    new layer is created in an xref it shows up unwanted in the host drawing.
    Yes, it's the nature of the beast but there is no simple solution (freezing
    the newly created layer in the xref is not an option for us and neither is
    duplicating the data and keeping track of changes between depts).

    So, I was thinking of an app to freeze new xref layers upon. I figure that
    I'll have to store the present list of xref layers (separate lists for each
    xref) and fire off the app only if the lists are found. How to store the
    list? Dictionary perhaps? I'm also worried about any possible processing
    overhead as well as problems I haven't thought of yet.

    I would appreciate any ideas or concepts as to a reasonable and efficient
    approach to this little but annoying problem.

    Thanks,
    Josh
     
    Josh, Aug 20, 2004
    #1
  2. Josh

    mataeux Guest

    Xrefs are resolved before any custom code fires, therefore, if you are
    certain to unload the Xrefs before you close the drawing, (maybe interrupt
    the close operation to automatically unload xrefs), then you can run some
    code after a drawing is opened but before the Xrefs are loaded

    the code will note what xref layers exist, load the xrefs, then notice any
    new xref layers! this way, you wont need to store the list of layers
    separately from autocad. i cannot think of an easy way to run code before
    xrefs are resolved unless they had been previously unloaded. a drawback is
    not be able to distinguish xrefs that you want to remain unloaded! (that
    would require storing a separate list of xrefs (maybe thats easier than
    storing a list of layers))

    good luck
     
    mataeux, Aug 20, 2004
    #2
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.