2014-02-10 05:43 AM
ch1 = OPEN ("DATA", "RevisionControl.txt", "MODE = WA") OUTPUT ch1, GLOB_INTGUID, 1, LayoutID, LayoutNumber, LayoutName, RevID, RevSub, RevNote, RevDate, RevPerson CLOSE ch1I'm using the GLOB_INTGUID as the data key because this is then a unique number for each marker that can be updated in the database if the marker object is modified. The LayoutID, LayoutNumber and LayoutName variables are requested from the layout page by the object and the various Rev__ variables are user entered data.
ch1 = OPEN ("DATA", "RevisionControl.txt", "MODE = RO") RevData = INPUT (ch1, "???", 1, LayoutID, LayoutNumber, LayoutName, RevID, RevSub, RevNote, RevDate, RevPerson) CLOSE ch1Once I find a way to get multiple rows of data in (to an array?) I then need to be able to filter down to just the marker data for objects on this page of the layout book.
2014-02-10 08:21 PM
! Example to read all string values from a file ! and use it in a value list DIM sarray[] ! file in the library, containing parameter data filename = "ProjectNotes.txt" ch1 = OPEN ("text", filename, "MODE=RO, LIBRARY") i = 1 j = 1 sarray[1] = "" ! collect all strings DO n = INPUT (ch1, i, 1, var) IF n > 0 AND VARTYPE (var) = 2 THEN sarray= var j = j + 1 ENDIF i = i + 1 WHILE n > 0 CLOSE ch1 ! parameter popup with strings
2014-02-11 01:49 AM
2014-02-11 03:09 AM
2014-02-11 04:01 AM
2014-02-11 05:34 AM
2014-02-11 05:42 AM
2014-02-11 06:10 AM
MASTER SCRIPT n = REQUEST ("HomeDB_info", "", LayoutID, LayoutNumber, LayoutName, LayoutContext) index = (LayoutID * 100) + RevID + (RevSub / 100) ch1 = OPEN ("DATA", "RevisionControl.txt", "MODE = WA") OUTPUT ch1, index, 1, LayoutID, LayoutNumber, LayoutName, RevID, RevSub, RevNote, RevDate, RevPerson CLOSE ch1The Listing Object then reads this data;
MASTER SCRIPT n = REQUEST ("HomeDB_info", "", ThisLayoutID, ThisLayoutNumber, ThisLayoutName, ThisLayoutContext) ! Create an array to put the data in DIM RevArray[][5] i = 1 j = 1 RevArray[1][1] = "" ! Open the text file containing the Revision data ch1 = OPEN ("TEXT", "RevisionControl.txt", "MODE = RO") ! Collect all strings DO RevData = INPUT (ch1, i, 1, index, LayoutID, LayoutNumber, LayoutName, RevID, RevSub, RevNote, RevDate, RevPerson) IF LayoutID = ThisLayoutID AND RevData > 0 THEN RevArrayProblems that still exist;[1] = RevID RevArray [2] = RevSub RevArray [3] = RevNote RevArray [4] = RevDate RevArray [5] = RevPerson j = j + 1 ENDIF i = i + 1 WHILE RevData > 0 ! Close the data source CLOSE ch1
2014-02-11 02:50 PM
2014-02-11 06:13 PM