Auditing tools

Discussion in 'AutoCAD' started by HT, Nov 18, 2004.

  1. HT

    HT Guest

    I am trying to create a tool that will run a series of audits on a drawing.
    What I want to start with specifically is blocks within a drawing. I want
    to be able to pull out a certain block name from a drawing and verify that
    all of the layer properties etc are correct and if they are not then the
    block will be changed to a "Flagged" layer. What I am specifically having
    trouble doing is writing the sequence that will actually look for the block
    in the drawing. If anyone has seen or done something similar that they are
    willing to share to get me rolling I would appreciate it. Thanks
     
    HT, Nov 18, 2004
    #1
  2. HT

    T.Willey Guest

    If you can use vla- functions then you could do something like:

    (setq ActDoc (vla-get-ActiveDocument (vlax-get-ACAD-Object)))
    (setq BlkColl (vla-get-Blocks ActDoc))
    (setq Blk2Chk (vla-Item BlkColl "blocknamehere"))

    If this won't work, then you could get it with

    (setq Blk2Chk (tblobjname "block" "blocknamehere"))

    This will give you the block definition.

    Hope that helped.
    Tim
     
    T.Willey, Nov 18, 2004
    #2
  3. HT

    Tom Smith Guest

    You may not realize how complicated it will be to check every property of
    every entity in a block, let alone multiple blocks.

    Why not simply replace the block with the correct version in all cases? This
    will save you a lot of programming time, and will actually fix the blocks
    rather than just flagging them for manual correction.
     
    Tom Smith, Nov 19, 2004
    #3
  4. HT

    HT Guest

    Actually I am trying to verify that certain object have been placed in the
    drawing and put on the correct layers. That is really the only variable
    that I want to pull out, but I need to be able to do that from a global
    standpoint. These are QA/QC auditing tool to help PM and designers run
    through a set of drawings at a much quicker rate
     
    HT, Nov 19, 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.