hi
see the PB's Help of Function "LibraryDirectory"
Here someone wrote a Function to list the objects in the pbl
eg:
//====================================================================
// Function: nvo_orca.of_listobjects()
//--------------------------------------------------------------------
// arguments:
// value string as_libname
// value libdirtype anum_objtype
// reference string as_objnames[]
// reference string as_times[]
// reference string as_comments[]
//--------------------------------------------------------------------
// return: integer
//--------------------------------------------------------------------
// Description:
//--------------------------------------------------------------------
// Author: Date: 2007.03.20
//--------------------------------------------------------------------
// CopyRight:
//--------------------------------------------------------------------
// History:
//
//
//====================================================================
string ls_objects, ls_line
long ll_pos1, ll_pos2, ll_tabpos1, ll_tabpos2, ll_index
string ls_objnames[], ls_times[], ls_comments[]
ls_objects = librarydirectory(as_libname, anum_objtype)
ll_pos1 = 1
ll_pos2 = pos(ls_objects, '~t~n', ll_pos1)
do while ll_pos2 > ll_pos1
ls_line = mid(ls_objects, ll_pos1, ll_pos2 - ll_pos1)
ll_tabpos1 = pos(ls_line, '~t')
ll_tabpos2 = pos(ls_line, '~t', ll_tabpos1 + 1)
ll_index ++
ls_objnames[ll_index] = left(ls_line, ll_tabpos1 - 1)
ls_times[ll_index] = mid(ls_line, ll_tabpos1 + 1, ll_tabpos2 - ll_tabpos1 - 1)
ls_comments[ll_index] = mid(ls_line, ll_tabpos2 + 1)
ll_pos1 = ll_pos2 + 2
ll_pos2 = pos(ls_objects, '~t~n', ll_pos1)
loop
as_objnames = ls_objnames
as_times = ls_times
as_comments = ls_comments
return ll_index