Chock-a-block

Discussion in 'AutoCAD' started by David Kozina, Feb 25, 2004.

  1. David Kozina

    David Kozina Guest

    Looking for the sanest solution to this problem - and I wouldn't be
    surprised if I'm overlooking something really simple.

    I've been working on a set of 'standard' details.

    I recently started working at a new company, but I don't yet have in place
    many of the routines I used to use for details - in particular routines for
    setting the correct layer, color, etc., before creating/inserting a block.
    Those routines are 'under construction'. But, in the interim, I've been
    accruing details little by little in a single file, (which has helped a
    great deal at the moment with regards to drawing consistency). After I
    finish a detail, I also have been saving it in it's own drawing - and herein
    lies the rub...

    Basically I need to get the details better organized - and I'm working on
    that, too - but I've encountered a fly in the ointment.

    I've now got a directory of a hundred or so single details, along with one
    biggie-sized drawing with everything. I've been trying to make good use of
    named plot styles in my drawings - and with some help in this group the
    other day, I finally became aware that if all or some of the objects
    comprising a block had their plot style set to 'ByBlock', the block insert
    object itself can be individually adjusted as the circumstances dictate.
    Which is cool - BUT it also means that all the block inserts I've been using
    in my details 'til now are almost-but-not-quite right. :-/

    I've worked out the code revisions for the block definitions themselves -
    which I *believe* is finally correct. (I've been working on creating the
    blocks programmatically, rather than maintain yet another library.)

    Furthermore, I've gone into the biggie drawing and corrected all the
    definitions there. At least I think they're right now.

    But I've still got dozens of smaller drawings where the blocks therein also
    need to be redefined. I want to do this as soon as possible, before things
    multiply more than they already have. (The #1 WORST thing about CAD, IMO -
    never-ending errors propagating exponentially.)


    My question is this:

    Assume that the big drawing DOES now contain correct definitions.
    Is there a quick and painless way to transfer the revised definitions in
    that drawing to the dozens of single detail drawings?

    I have a different idea that I *know* will work, via running some block
    redefinition code in a script over the set of drawings - but if I'm
    overlooking something obvious that already exists, I'd appreciate somebody
    pointing me in the right direction.

    I'm hoping this will be a 'one-time' fix [r-i-i-ght]. Nevertheless, if
    you've ever had to deal with something similar in the past, I'd also be
    interested to know how you handled it.

    Appreciatively,
    David Kozina
     
    David Kozina, Feb 25, 2004
    #1
  2. David Kozina

    Mark Propst Guest

    David,
    Are the block names in the biggie file the same as the file names in the
    single dwgs(without the dwg extension)?
    if so can you just wblock each block, overwriting the existing files?
    (Vlax-for block blocks
    (setq filename(strcat blockname ".dwg"))
    (wblock block filename overwrite=true)
    )

    or do the single files contain multiple blocks?
    in which case your mention of redefinition seems like it would work.
    (foreach dwg dwglist
    (vlax-for block blocks
    (setq blockname(vlax-get-property block 'name))
    (Redefine blockname filename)
    )
    )
    or

    (vlax-for block blocks
    (if(setq filename(findfile (strcat dir "\\" block ".dwg")))
    (progn
    (clearBlockDefinition block)
    (CopyObjectsFrom filename blockdef)
    )
    )
    )

    just some ideas, don't know if that helps at all?
    sounds like dbx could do what you want, depending on exactly what you need
    to do.
     
    Mark Propst, Feb 25, 2004
    #2
  3. David Kozina

    dean_bourke Guest

    Unless I missed something, why don't you XREF all the little dwgs into the big one?

    Dean
     
    dean_bourke, Feb 25, 2004
    #3
  4. David Kozina

    David Kozina Guest

    The big drawing is mostly for my convenience at the moment, until I have
    some better routines in place to provide sufficient consistency.

    Basically, it will be toast in the future - but for now I need it.

    Problem right now is that I need both sets: LP and Singles

    At any rate, I think I've about got a 'fix-the-blocks' routine set up that I
    can run via a script.
     
    David Kozina, Feb 25, 2004
    #4
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.