Hello,
is there a good way to compare two objects, if they are the same one ?
Like the function in the screenshot by the link.
But i need this function inside a script.
So far i compare the type, class, 3DCTNR an others.
But this is only a bad way, because the can be many mistakes.
CompareObjects:=TRUE;
IF GetTypeN(halt)<>GetTypeN(hneu) THEN CompareObjects:=FALSE;
IF GetClass(halt)<>GetClass(hneu) THEN CompareObjects:=FALSE;
Get3DCntr(halt,x1,y1,z1);
Get3DCntr(hneu,x2,y2,z2);
IF (ABS(x1-x2)>1) OR (ABS(y1-y2)>1) OR (ABS(z1-z2)>1) THEN CompareObjects:=FALSE;
IF CompareObjects=FALSE THEN GOTO 100;
Get3DInfo(halt,x1,y1,z1);
Get3DInfo(hneu,x2,y2,z2);
IF (ABS(x1-x2)>1) OR (ABS(y1-y2)>1) OR (ABS(z1-z2)>1) THEN CompareObjects:=FALSE;
IF CompareObjects=FALSE THEN GOTO 100;
IF GetTypeN(halt)=15 THEN { Symbol in Dokument }
IF GetSymName(halt)<>GetSymName(hneu) THEN CompareObjects:=FALSE;
IF GetTypeN(halt)=11 THEN BEGIN { tracking Gruppe }
h1:=FInGroup(halt);h2:=FInGroup(hneu);
bool:=CompareObjects(h1,h2);
IF bool=FALSE THEN CompareObjects:=FALSE;
END;
HCenter(halt,x1,y1);
HCenter(Hneu,x2,y2);
IF (ABS(x1-x2)>1) OR (ABS(y1-y2)>1) THEN CompareObjects:=FALSE;
IF CompareObjects=FALSE THEN GOTO 100;
GetBBox(halt,x1,y1,z1,r1);
GetBBox(hneu,x2,y2,z2,r2);
IF (ABS(x1-x2)>1) OR (ABS(y1-y2)>1) OR (ABS(z1-z2)>1) OR (ABS(z1-z2)>1) THEN CompareObjects:=FALSE;
100:
https://www.dropbox.com/s/ouw2uukhbr1fym0/Bildschirmfoto%202013-12-16%20um%2010.03.46.png