Author Topic: Attribute or Xdata  (Read 2528 times)

0 Members and 1 Guest are viewing this topic.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Attribute or Xdata
« on: April 27, 2006, 02:30:51 PM »
Attribute Extraction or XData?  Pros or Cons of one or both.  I have been asked to create an 'Automated Material Takeoff' for the 3d model of our substations.  What do you guys think?  I know how to do attribute extraction thru VBA and fill up an excel spreadsheet.  Better ideas?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Draftek

  • Guest
Re: Attribute or Xdata
« Reply #1 on: April 27, 2006, 02:47:27 PM »
If your dealing with block counts then attribute extraction would be fine.
If your dealing with something like lengths of objects then xdata works much better and can be dynamic.

I prefer xdata myself due to the fact it's hidden from most users and as a plus, your app looks like magic...

Let us know which way you go.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attribute or Xdata
« Reply #2 on: April 27, 2006, 02:53:49 PM »
Depends on how much data and to what degree I want the data to visable and/or open to end users. Between attributes, xdata, xdictionaries, xrecords and dictionaries there's a lot one can do. Generally speaking I start with all the deliverables (concrete or anticipated) and design backwards to data structures / relationships that will facilitate. Me 2¢.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attribute or Xdata
« Reply #3 on: April 27, 2006, 03:41:44 PM »
The goal is to extract a BOM out of a 3d model. See the DWF for an example of model. 
Next question, having never really worked with a 3d model like this, how could I extract a length out of a piece of electrical bus? (the tube looking piece running parallel to the ground)?  Also, the transitions from low to high bus are made up of 5 pieces, the 2 lower pieces, the upper piece and the tube connecting the 3.  What would be the best way to capture the BOM for that block?
« Last Edit: April 27, 2006, 03:45:08 PM by CmdrDuh »
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

MickD

  • King Gator
  • Posts: 3653
  • (x-in)->[process]->(y-out) ... simples!
Re: Attribute or Xdata
« Reply #4 on: April 27, 2006, 06:12:34 PM »
I use xdata, mainly because I don't work with blocks.

Have a look here David -> http://www.theswamp.org/index.php?topic=9775.msg125724#msg125724

If you are dealing with 3d solids you will only be able to attach xdata anyway unless you create a block (I think).
Also, to get the length you only need 1 direction vector for xforming the objects to wcs and back.
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attribute or Xdata
« Reply #5 on: April 28, 2006, 09:08:57 PM »
I use xdata, mainly because I don't work with blocks.

Have a look here David -> http://www.theswamp.org/index.php?topic=9775.msg125724#msg125724

If you are dealing with 3d solids you will only be able to attach xdata anyway unless you create a block (I think).

You can add an xdictionary. The link shows how to make a hard owned xdictionary (will survive wblocking, purging etc).

Cheers.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MickD

  • King Gator
  • Posts: 3653
  • (x-in)->[process]->(y-out) ... simples!
Re: Attribute or Xdata
« Reply #6 on: April 28, 2006, 09:47:19 PM »
Yes you're right Michael, I actually use xdict's quite a bit. They can also store up to 2gb of data!
The problem for me though which forced me back to xdata (for world points anyway) was the updating of the stored world points. These dictionary entries don't get updated when an object is transformed (move, rotate etc.) whereas  xData.transformBy() gets called for every object and if it has world points or similar as xdata these also get xformed which updates your direction vectors without the user/programmer worrying about them.

I haven't tried wblocking out objects with xdata though, this may be a problem if this is required :(
off to the test bench...
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attribute or Xdata
« Reply #7 on: April 28, 2006, 10:01:02 PM »
They can also store up to 2gb of data!

Holy carp, I knew it dwarfed xdata's meager 16k limit but didn't know it was that high!

The problem for me though which forced me back to xdata (for world points anyway) was the updating of the stored world points ...

Nodding, I can see that.

I haven't tried wblocking out objects with xdata though, this may be a problem if this is required  ...  off to the test bench ...

Hmmm, wonder (doubt it, but what) if you can add xdata to an xdictionary / xrecord entry ...  :lol:
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MickD

  • King Gator
  • Posts: 3653
  • (x-in)->[process]->(y-out) ... simples!
Re: Attribute or Xdata
« Reply #8 on: April 28, 2006, 10:50:53 PM »
Hmmm, wonder (doubt it, but what) if you can add xdata to an xdictionary / xrecord entry ... :lol:

looking at the xrecord object (see below) you probably could but you're back to how to transforming the xrecords :)

This is another reason I'll be exporting 'object' information to a db or xml.
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien