Sam Jones 162 Posted January 12 Is there a way to retrieve a list of records in the document. If I have nothing selected, there is a list of records in the Data pane of the th OIP, but I don't see any thing like FRecord from where I can start to build a list of records with NextObject(). It would be a real shame to have to query every object to see if it has a record. Quote Share this post Link to post
Peter Vandewalle 35 Posted January 12 BuildResourceList should do the trick. I don’t know the type number by heart but you’ll find it in the developers site appendix... Quote Share this post Link to post
Jesse Cogswell 9 Posted January 13 Peter is quite correct in that BuildResourceList will do the trick. 47 appears to be the Object Type for Record Formats. The one downside is that it will list the records for all plug-in objects in the drawing as well as the Record Formats in the Resource Manager, which can become a bit much if you have a lot of plug-in objects or different types in a drawing. Sample code I used to test is below. PROCEDURE GetRecordList; VAR recList,numRecords:LONGINT; i:INTEGER; test:STRING; BEGIN recList:=BuildResourceList(47,0,'',numRecords); FOR i:= 1 TO numRecords DO BEGIN test:=Concat(test,' | ',GetActualNameFromResourceList(recList,i)); END; Message('Num Records: ',numRecords,' ',test); END; Run(GetRecordList); Quote Share this post Link to post
Sam Jones 162 Posted January 13 Thank you Jesse. I didn't read the function reference carefully enough, and missed that "0" would yield just the document resources. Not the first time for that. 😕 Quote Share this post Link to post