Author Topic: unique entities between two files  (Read 3650 times)

0 Members and 1 Guest are viewing this topic.

curmudgeon

  • Newt
  • Posts: 194
unique entities between two files
« on: July 17, 2009, 02:39:54 PM »
the real world intrudes.

when working with other peoples' files as base drawings and they send you updated files, I am often left to my own devices to figure out exactly what changed. there has been a remove duplicates in express tools for a long time. has anyone done the inverse, and created a routine to look for UNIQUE entities?

say I insert the new file into ( a copy of ) the old file and search for every entity that does not have a duplicate.
what would that look like, and how might it work?
Never express yourself more clearly than you are able to think.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: unique entities between two files
« Reply #1 on: July 17, 2009, 02:50:31 PM »
This sounds like a job for... Da da da daaaaa.... DRAWING COMPARE MODULE  MODULE  MODULE  MODULE


http://autocadmepblog.ebimsolutions.com/2008/04/drawing-compare-subscription-module-for.html
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

T.Willey

  • Needs a day job
  • Posts: 5251
Re: unique entities between two files
« Reply #2 on: July 17, 2009, 02:52:17 PM »
I would think you could step through each drawing and make a list of all handles.  Then just compare the two lists.
Tim

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

Please think about donating if this post helped you.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: unique entities between two files
« Reply #3 on: July 17, 2009, 02:57:43 PM »
I would think you could step through each drawing and make a list of all handles.  Then just compare the two lists.

Yeah, except some utilities rebase the handles so they aren't as permanent as one might think
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: unique entities between two files
« Reply #4 on: July 17, 2009, 03:21:35 PM »
I would think you could step through each drawing and make a list of all handles.  Then just compare the two lists.

Yeah, except some utilities rebase the handles so they aren't as permanent as one might think

Well that just sucks then.  I guess you could check the handle and object type, but beyond that I'm not sure how else one would do a simple check.
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: unique entities between two files
« Reply #5 on: July 17, 2009, 05:28:27 PM »
If the handles were changed then you would get a lot of false warnings. I could live with that.
But what if an object was moved or modified? Handle would remain the same.
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.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: unique entities between two files
« Reply #6 on: July 17, 2009, 06:10:17 PM »
If the handles were changed then you would get a lot of false warnings. I could live with that.
But what if an object was moved or modified? Handle would remain the same.


True.  I was thinking more of new/deleted objects only.  I guess you could get the bounding box points, and test those along with object name/type.
Tim

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

Please think about donating if this post helped you.

curmudgeon

  • Newt
  • Posts: 194
Re: unique entities between two files
« Reply #7 on: July 17, 2009, 06:19:57 PM »
If the handles were changed then you would get a lot of false warnings. I could live with that.
But what if an object was moved or modified? Handle would remain the same.

point taken.
I was leaning toward brute force. put all the revision's entities in one layer.
go through the old set one entity at a time and search with a ssget "CP" and filters based on the entity your checking for.

I think it would fly, but I have certainly not thought it all the way through. for example, if you were checking for a duplicate circle you would have to do something like calculate a point on the circle from the radius and center point and calculate the crossing polygon to insure you would find a duplicate.

must put this on the back burner, other things pushed ahead of it.

OOPS
this would find things removed, but I have to go through the other set too to catch additions.
« Last Edit: July 17, 2009, 06:23:25 PM by curmudgeon »
Never express yourself more clearly than you are able to think.

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: unique entities between two files
« Reply #8 on: July 17, 2009, 08:36:06 PM »
Just thinking aloud, but, say you copied the contents of each file into a single drawing, could you not create two selection sets of each set of entities, and, compare the DXF data for each entity in SelSet 1, with that of entities in SelSet 2, and if a match is found, remove both entities from the SelSets?

Of course, this is a completely "brute-force-sledge-hammer" approach... but then, if handles do not live up to their expectations, then this may be another option.

EDIT: this wouldn't work as all the locations would be different... stupid idea.

New Idea!

Ok, how about finding a base point and copying all the entities into one drawing, and sitting both copies on top of one another. Then use OVERKILL to remove duplicates, leaving you with the uniques :-)
« Last Edit: July 17, 2009, 08:43:28 PM by Lee Mac »

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8691
  • AKA Daniel
Re: unique entities between two files
« Reply #9 on: July 17, 2009, 08:54:26 PM »
... compare the DXF data ...

This is how I might go about it

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: unique entities between two files
« Reply #10 on: July 17, 2009, 09:37:56 PM »
Compare handles between drawings
This will give you :
Missing items to report
Added Items to report
Matched items, Compare "Matched Items" & report any discrepancies


My 2 cents
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.