ObjectDBX question relating to xrefs...

Discussion in 'AutoCAD' started by David Kozina, Dec 14, 2004.

  1. David Kozina

    David Kozina Guest

    Sometimes, due to unforseen circumstances, I need to add additional layers
    to a drawing that is referenced multiple times in a set of drawings - plans,
    plot sheets, etc. :-/ Almost always, the information on that layer should
    only appear in one or two of those drawings, and the referenced layer is
    off/frozen in the rest.

    When this happens, I end up having to take extra pains to turn off/freeze
    the layer in that referenced drawing. Save it. Then one by one open all
    the drawings that reference it, so that it will be added, but come in
    off/frozen. Then in those drawings where I need to see it, I just turn
    on/thaw it. (VISRETAIN = 1)
    This works, but as the number of plans increase, the time needed to do this
    increases geometrically. :-(

    My question is, would using ObjectDBX be a good way to speed this process
    up? I am thinking that all I need to do in this case is save the drawing
    with the new layers off/frozen, as before. Then via ObjectDBX, select the
    files that reference it, open them and re-save them - nothing more. Am I
    correct in assuming that the files would have the new referenced layers
    added (off and frozen as desired), but at blinding speed compared to the
    above process? Or is this idea so far off base as to be laughable?

    I'm about to set things up to attempt to do that - but I was just curious as
    to if anyone knew if this would work.

    Best regards,
    David Kozina
     
    David Kozina, Dec 14, 2004
    #1
  2. When you access DWGs via ObjectDBX, external references are
    not loaded, and I don't think you can freeze their layers that way.

    I haven't look at this in 2004/2005, but do know that there is
    now API functions for loading xrefs in drawings no open in the
    editor, but don't know if they're loaded when using ObjectDBX.
     
    Tony Tanzillo, Dec 14, 2004
    #2
  3. David Kozina

    David Kozina Guest

    Tony,
    <sigh>
    Could you be wrong just ONCE, please? :-/
    You are indeed correct, sir - I tried it, but it didn't work, apparently for
    the reasons you explained.

    What are the API functions you refer to, if I might ask?

    OK, then, with respects to the problem I explained in the original post -
    having to go back and add some new layers (unforseen) to a drawing which is
    referenced througout a project, does anyone know of a better way to update
    those other project drawings quickly? As I said, in almost all of them, the
    added referenced layer(s) will need to be off/frozen. ('Well, Dave, why
    don't you just put the new layers in the few drawings it applies to?'
    Because that's not how this particular system works - the reference drawing
    in question is an "Outer Limits" 'Core Plan' that 'controls the vertical'
    project elements (IOW walls/columns) and is referenced in all the rest of
    the plans. It works very well, since I can see immediately if things are
    out of alignment from floor to floor. Usually the layers are set at the
    beginning of the project, but sometimes unforseen developments result in the
    addition of a few more layers in this Core drawing - which can cause
    problems downstream, if I don't take special care to set things correctly as
    they are added.)

    I know I could just create a script for this open->close->next... - it would
    be a little quicker than doing things manually and less prone to user error,
    but I was hoping for something more elegant and fast.

    Anyone have any other ideas as to how such new referenced layers could be
    dealt with in this manner?
    This could save a lot of time whenever I end up having to do this.

    Thanks,
    David Kozina
     
    David Kozina, Dec 15, 2004
    #3
  4. David Kozina

    Joe Burke Guest

    Hi David,

    I think I appreciate what you want to do, and I understand the methods you've
    mentioned. That's what I would do. One question remains though. Why do you feel a
    need to open all the files which reference the modified base file, soon after layers
    are added to that file? Obviously all referencing files will update eventually, if
    for no other reason than to open and plot.

    I suspect the reason is the layer settings in the referenced file may change. For
    instance, users other than yourself might save the referenced file in a state which
    causes the referencing files to misbehave. Am I on the right track here?

    If so, I might suggest an alternative, which I find useful. A code solution which
    lets me copy xref layer settings from one file to another. Let's assume for
    discussion sake you've lost control of the xref layer update process, for whatever
    reason. You have a bunch of files which when opened, display the xref layers
    incorrectly. Let's also assume that xref may have 500 layers and it came from an
    outside source. So you are not familiar with the layer names in question.

    You could fix things in one of your files given a half hour. But doing that twenty
    times would take a day. Not to mention being error prone and boring.

    Code solution: fix things in one referencing file. Pick the corrected xref. Gather
    all its layer settings and put them in a blackboard list. Open the other 19 files. In
    each one pick the xref in question and apply the list of layer settings. I'm
    over-simplifying here, but let's let that pass for the moment.

    I guess someone might say you can do something similar by turning visretain off in
    the referencing files. Modify the source xref as needed, then turn visretain back on.
    That idea doesn't work for me given the files I'm dealing with.

    Or maybe I'm all wet and there's some other way...

    Joe Burke
     
    Joe Burke, Dec 16, 2004
    #4
  5. David Kozina

    j buzbee Guest

    Code solution: fix things in one referencing file. Pick the corrected
    "Open the other 19 Files" - I think that is what the OP was trying to avoid.

    However, for your solution, Save the layer settings in the Xref's LayerState
    Object. Then access it via ObjectDBX. That way your not having to stuff
    the BB each time with, 500 was it?, layers and their states.

    I use this method to propogate layer standards: One drawing containes all
    Layers and their several states. Just a thought.

    jb
     
    j buzbee, Dec 16, 2004
    #5
  6. David Kozina

    Joe Burke Guest

    James,

    That sounds like it might do the trick. I'll have to investigate.

    BTW, what I suggested doesn't stuff the BB each time, if I understand your meaning.
    It puts the xref layer settings once, then multiple files read that data.

    Regardless of the mechanism involved, my point was to suggest an alternate way of
    thinking about the question David asked. In that sense, your thoughts are most
    welcome.

    BTW, I don't know if it's true in David's case, but in my case I'm often presented
    with a situation where I cannot alter the source xref in any way.

    Thanks
    Joe Burke
     
    Joe Burke, Dec 16, 2004
    #6
  7. David Kozina

    David Kozina Guest

    Joe,
    Thanks for the comments, see below...


    "eventually" is the operative word here. What it means in this case is that
    if the new layers are not dealt with in a timely manner (i.e. immediately),
    one might fuhgetaboudit, only to later discover with chagrin 7th and 8th
    story walls/columns (the newly added layers) showing up on the footing &
    foundation plan... ;)
    So, in this particular case, I've got to strike while the iron is hot, so to
    speak, afore I forgets.

    Boring, yes.
    But the necessary fix is quite simple and straightforward - yet kind of hard
    to explain coding-wise.

    VISRETAIN REALLY doesn't work in this case. Each framing plan references
    the core plan in its own way. It's very systematic, but a different set of
    core layers are displayed for each plan. The core is there, as I explained
    earlier, to keep things lined up, up and down, through the building.

    <sheepish grin as light goes on> Ya know, I'm such an ID10t. I already
    *HAVE* a solution.
    The set of routines I have to create the core plan and control the core
    layers themselves will do the job just fine. (One is called LVLOFF, and
    asks for a floor level - if you're in the core plan itself it will adjust
    those layers - if you're in a framing plan that *references* the core plan,
    it will adjust *those* referenced layers. Makes working with this "core
    system" pretty easy.

    It would be a relatively simple matter to create a script to open the
    drawings, call the routine and make sure the offending layers are turned off
    via LVLOFF. Or even just open and close them, if I turn the layers off in
    the core plan first. Not that difficult.

    Thanks, Joe - maybe I just needed to 'talk things out'... :)

    Sure would've like to see an ObjectDBX solution though - that would've been
    cool, since I wouldn't have to open up the drawings in the editor at all
    that way.
     
    David Kozina, Dec 17, 2004
    #7
  8. David Kozina

    David Kozina Guest

    Thanks for the ideas - you are correct that I was trying to avoid opening up
    the other 19 files.
    I'll have to examine the LayerState Object more, but I'm afraid it might be
    a little more complicated than a 'one setting fits all' sort of thing, since
    each drawing referencing the 'core plan' needs it's own 'view' of it. See
    previous posts for (I hope) a little clearer explanation.

    Best regards,
    David Kozina
     
    David Kozina, Dec 17, 2004
    #8
  9. David Kozina

    Joe Burke Guest

    David,

    I'm glad kicking it around helped somewhat.

    I think there are many variations on the theme. And likewise, many possible
    solutions.

    Regards
    Joe Burke
     
    Joe Burke, Dec 19, 2004
    #9
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.