Jump to content

cadtischler

Member
  • Posts

    7
  • Joined

  • Last visited

Reputation

0 Neutral

Personal Information

  • Occupation
    Construction
  • Location
    Germany
  1. Hello, thanks for your answers. @Raymond: This is the real perfect way. But to 'expensive' in time for this problem. There i had also to track in Groups, Symbols, and differ nearly 20 Types. @Frank: Yes, there is the problem of complexity. It is n^2 for n Objects. But it?s easy to make lists of objects in the same class, type or area, or anything else, to beware of 1000*1000=10^6 compares. So there are two ways: 1) "dirty compare" of some characteristics, ignore the details. 2) look for 3rd Party. I believe you, that a 3rd Party-Tool is better than 2 days working, or use the men?-command in an other turnarround. So i search the web. Thank you and greetings Uwe.
  2. 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
  3. Hello, Yes, surely it can be done by DYNARRAY[] OF STRUCTURE. My idea is, if anyone do it in the past, he can share his experience. If not, but possible, i had to do it by myself. To have this Type in a Library, will reduce the complexity of the main code. I am right, that the call with ...compare,swap:PROCEDURE) is not possible ? Ok, it is not the main feature of this lib-idea. Thank you.
  4. Hello, have anyone implemented an abstract datatype List in Vectorscript ? In the kind of http://en.wikipedia.org/wiki/List_(abstract_data_type) Now i save my datas in Arrays of Structures and have a lot of work to manage them. But an abtract list will save many work, if there are the functions List_delete, List_IsEmpty, ... first, next, remove, insert and so on. Also the List can expand dynamic. Also there can be a function List_sort(list:LIST; compare,swap:PROCEDURE) to sort the List. Have anyone an experience with these implementation ? Greetings, Uwe.
  5. Hello, thanks for this great and fast answers. @Maarten: You are right. In VW2013 it will work fine, also on a Mac. @Raymond: After your posting, i tested it in 2013. The SelectTreeControlItem(...) works too. On Mac there is also a new Design of TreeControl-Items, so it is really possible, that there will be an old bug in 2012. So there is no big problem. In the next days i will change my Worksspace to VW 2013. And the Procedure SetTreeControlItemData() and GetTreeControlItemData() works also fine now in 2013. I dont know, for what to use, but they works. @All Please exuse me for my broken english. Thank you all very much, Uwe.
  6. Hello, i want to expands or collapses an item in a tree control item by the Script. I can create, display and manage all of my tree control. But at the start, i want to 'close' all the Folders in the List, like shown in the Screenshot by the red oval. I try to do ExpandTreeControlItem(dialog1,4,0,FALSE); ExpandTreeControlItem(dialog1,4,7,TRUE); and similar, in many places of the script, but always the Folders are 'open', when i call RunLayoutDialog(...). What is my Mistake ? Best regards, Uwe.
  7. Hello, an alternative Version for the Test: FUNCTION ClassExistTest(s:STRING):BOOLEAN; VAR l:LONGINT; BEGIN ClassExistTest:=FALSE; FOR l:=1 TO ClassNum DO IF ClassList(l)=s THEN ClassExistTest:=TRUE; END;
×
×
  • Create New...