how to search the DB

Discussion in 'AutoCAD' started by kemp, Jul 16, 2004.

  1. kemp

    kemp Guest

    I am creating a lisp routine that will insert details at the proper
    scale based on an attribute value "SCALE" held in a block inside of the
    detail block. This detail block will be xref'd into a new drawing - So
    basically what i want is to find the attribute value of a block inside
    of an xref.

    Can anyone give me some ideas on how to search the DB of the detail to
    get this value? Please no raw code, I am learning and would prefer
    general direction.

    Thanks!
    kemp
     
    kemp, Jul 16, 2004
    #1
  2. Allow me to correct myself. You will encounter a
    seqend only in the insert definition, not the block
    definition as I said. Nil will be returned when you
    have reached the end of the block definition.
     
    Jason Piercey, Jul 16, 2004
    #2
  3. kemp

    Mark Propst Guest

    assuming you want to run the lisp from within the 'target' drawing - your
    "new drawing" - then you could use ObjectDbx to read the xref detail
    drawing, find the block, get the attribute value for the "scale" tag, save
    that value to a variable, then close the dbx dwg and xref the detail dwg in
    using your scale variable accordingly.
    there....no code!
    :)
    happy coding
    Mark
     
    Mark Propst, Jul 16, 2004
    #3
  4. kemp

    Jim Claypool Guest

    Look at my response to "Extract attribute values from xref" dated 7/7/2004
    in this forum.
     
    Jim Claypool, Jul 16, 2004
    #4
  5. kemp

    kemp Guest

    Some great ideas in here. Should be fun to figure it out! Thanks everyone.

    kemp
     
    kemp, Jul 16, 2004
    #5
  6. kemp

    kemp Guest

    Do I need to have a c++ compiler for this method? From what I've read it
    sound like I might...

    Thanks,
    kemp
     
    kemp, Jul 16, 2004
    #6
  7. No. You may, however, be required to register
    the objectDBX services depending on what version
    of AutoCAD you are running.
     
    Jason Piercey, Jul 16, 2004
    #7
  8. kemp

    Mark Propst Guest

    You may be thinking of ObjectArx, rather than ObjectDbx.
    as Jason pointed out, you can use lisp to run ObjectDbx, you can also use
    vb/a

    try a google search on ObjectDbx and see what you come up with,
    There's a little bit to learn at first to use it, but once you have the
    basics you can grow incrementally in your ability and ease with which you
    will be able to access, either to read or to write drawings without having
    to open them in the editor window.
    have fun
    :)
    Mark
     
    Mark Propst, Jul 17, 2004
    #8
  9. kemp

    kemp Guest

    Thanks everyone, with your help it works!

    kemp

     
    kemp, Jul 20, 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.