Author Topic: Retreive XData from a Grouped Object in an Xref  (Read 1498 times)

0 Members and 1 Guest are viewing this topic.

mmason

  • Guest
Retreive XData from a Grouped Object in an Xref
« on: April 29, 2009, 01:01:59 PM »
I need some wisdom from the masters...

I have sets of objects, each making up a component.  Objects making up the component are part of a group (Unnamed).  Each group contains one object with XData attached - usually a centerline.  One of the bits of info in the XData is a Part Number in the form of M-nnnn.

A material callout block contains an attribute for the material part number.  The idea is to get the part number from the XData and put into an attribute in the callout block.

I have succeeded in accomplishing that part.  Select the centerline, then select the block attribute and BAM, there it is.  (See .LSP attached.) However, real world is not that simple.  Not all components have the xdata in a centerline. 

I'd like to:
1. Select any object on the (grouped) component and find the one with xdata - and in this case, retreive the part number
2. Do this whether or not the 'model' is a (likely nested) xref.
I can't seem to get the 'poke around in groups' part - and I danged sure can't get the 'poke around in groups inside an xref' part. 

Any advice?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Retreive XData from a Grouped Object in an Xref
« Reply #1 on: April 29, 2009, 01:40:57 PM »
First, welcome to theSwamp.

If you select an entity, then you will notice that it has a dxf code 330 within the code 102.  This is where you can find if it's from a group.  If so, then the entity will be ' GROUP '.  Within that, all the code 340 seem to be entities within the group, so you could just step through those and find what you want.

If you need more help than that, let us know.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Retreive XData from a Grouped Object in an Xref
« Reply #2 on: April 29, 2009, 05:14:59 PM »
Welcome to The Swamp mlm.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.