2017-06-08 05:50 AM
DIM _ac_new [][], _ac_index [] _max_coords = VARDIM1(ac_coords) _max_check = VARDIM1(ac_check) _delta = _max_coords - _max_check _new_index = 0 IF _delta = 0 THEN !No New or Deleted Points FOR i = 1 TO _max_coords _ac_new [1] = ac_coords [1] _ac_new [2] = ac_coords [2] _ac_new [3] = ac_coords [3] _ac_index = ac_index NEXT i ELSE !New or Deleted Points FOR i = 1 TO _max_coords !Check through all current points _new_point = 1 !Default is a new point FOR j = 1 TO _max_check !Check check against all previous points IF ac_coords [1] > ac_checkIt sorta works, but because the object doesn't rerun it's parameter script when you change the base polyline it produces errors if multiple changes are made to the line without getting the object to rerun it's parameter script (so it can store the new point data for checking prior to the next change).[1] - EPS & \ ac_coords [1] < ac_check [1] + EPS & \ ac_coords [2] > ac_check [2] - EPS & \ ac_coords [2] < ac_check [2] + EPS & \ ac_coords [3] > ac_check [3] - EPS & \ ac_coords [3] < ac_check [3] + EPS THEN !Point is the same _ac_new [1] = ac_coords [1] !Assign the previous values from current points _ac_new [2] = ac_coords [2] _ac_new [3] = ac_coords [3] _ac_index = ac_index !Assign the previous values from Previous settings _new_point = 0 !Point is NOT new ENDIF NEXT j IF _new_point = 1 THEN !Point is new _ac_new [1] = ac_coords [1] _ac_new [2] = ac_coords [2] _ac_new [3] = ac_coords [3] _ac_index = _new_index ENDIF NEXT i ENDIF ac_check = _ac_new !Store changed values ac_index = _ac_index PARAMETERS \ !Write parameters with changed values ac_check = ac_check, ac_index = ac_index FOR i = 1 TO VARDIM1(ac_coords) !Write index on each point HOTSPOT2 ac_coords[2], ac_coords[3] TEXT2 ac_coords[2], ac_coords[3], ac_index NEXT i
2017-06-09 01:33 AM