Nested entities & XData.

Discussion in 'AutoCAD' started by river6822, Aug 11, 2004.

  1. river6822

    river6822 Guest

    I wrote a routine that attaches xdata to a 3d solid when it's drawn. Then the solids are blocked for use and retrieval as one part. this all works great
    The problem I'm having is recalling that xdata UNLESS the block is exploded.
    I need to retrieve the data in reference to the block name. How can I select all items in the drawing that have been registered to "APP-A" without exploding the upper level block?
     
    river6822, Aug 11, 2004
    #1
  2. river6822

    Doug Broad Guest

    XDATA attached to an entity in a block definition must
    be accessed by obtaining the block definition. You can
    store individual xdata on block references but not on
    entities within the block.

    To get the xdata of a block definition entity you can
    use either
    1) tblobjname and entnext until you get the entity desired
    or
    2) nentsel and pick a particular entity.

    Describe your application and you might get better answers.
    Is each block inserted only once?
    Would attributes work better for you?

    Regards,
    Doug Broad


    blocked for use and retrieval as one part. this all works great
    in the drawing that have been registered to "APP-A" without exploding the upper level
    block?
     
    Doug Broad, Aug 11, 2004
    #2
  3. river6822

    river6822 Guest

    The application is as follows.

    I have created a quick and easy way to draw different moldings around windows. Then the windows are blocked and inserted into different drawings. The moldings have Xdata attached to them - the length and type of molding.
    I can explode every window and get a schedule of each cut length and type of molding to cut without a problem but then I can't count the number of times that window shows up on the floor plan. So in an effort to not EXPLODE and UNDO every time I need to make a cut list, I'd like to extract that xdata without exploding.

    thanks
     
    river6822, Aug 11, 2004
    #3
  4. river6822

    Doug Broad Guest

    Then get the xdata by getting it from the block definition's
    entities as I described in my last post.


    different drawings. The moldings have Xdata attached to them - the length and type of molding.
    count the number of times that window shows up on the floor plan. So in an effort to not EXPLODE and UNDO every time I need to make
    a cut list, I'd like to extract that xdata without exploding.
     
    Doug Broad, Aug 11, 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.