Author Topic: Storing entity data somewhere in the drawing  (Read 2056 times)

0 Members and 1 Guest are viewing this topic.

Viktor

  • Guest
Storing entity data somewhere in the drawing
« on: October 29, 2009, 08:10:58 PM »
Odd question, and odd scenario here. So I'm in beta testing with this audit application we created to keep our drawings straight. So far so good. But I have run into a scenario where I shouldn't be checking large sections of drawings because they could have parts of vendor drawings or very old stuff that is not to be brought up to standard. I was wondering, is there some native way in autocad to select a bunch of entities and set some property that later I could filter out in code? Kind of like layering but without using layers. XData maybe? are there other ways?

Now that I think about it more maybe I should just have them block those parts which could have other benefits too, but if there's a better way i'm all ears.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Storing entity data somewhere in the drawing
« Reply #1 on: October 29, 2009, 08:31:49 PM »
you can tag with xdata, but it adds bulk to the drawings a bit.
You could also lump the data together in a list of handles stored in the dwg dictionary - essentially a saved selection set...
That is pretty common actually.
As I recall, if you use xdata, you can select by registered application name, so that is pretty handy as it works as you select, no filtering loops after.
I believe this is how the application ID "virus" got started.  Someone separated entities by using lots of app id names for seleciton reasons.  So stick to just a few, or maybe just one if you just need to distinguish between one group and another.
James Maeding

MickD

  • King Gator
  • Posts: 3637
  • (x-in)->[process]->(y-out) ... simples!
Re: Storing entity data somewhere in the drawing
« Reply #2 on: October 29, 2009, 09:00:48 PM »
xrecords perhaps?
"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

Viktor

  • Guest
Re: Storing entity data somewhere in the drawing
« Reply #3 on: October 30, 2009, 01:55:06 PM »
you can tag with xdata, but it adds bulk to the drawings a bit.
You could also lump the data together in a list of handles stored in the dwg dictionary - essentially a saved selection set...
That is pretty common actually.
As I recall, if you use xdata, you can select by registered application name, so that is pretty handy as it works as you select, no filtering loops after.
I believe this is how the application ID "virus" got started.  Someone separated entities by using lots of app id names for seleciton reasons.  So stick to just a few, or maybe just one if you just need to distinguish between one group and another.

The handle idea you talk about, that sounds interesting, but overall I think this maybe more hassle than I anticipated. Because with xdata and handles there's really no way for the user to see which objects are the ones that belong to that special set. User may start copying and mixing entities without his/her knowledge. I'll have to think about this more...