Jump to content
Developer Wiki and Function Reference Links ×

List of Records in Document


Sam Jones

Recommended Posts

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.

Link to comment

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);

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...