LibraryExport

Description

Exports an object from a library. The object is exported as syntax.

Syntax

LibraryExport ( libraryname, objectname, objecttype )

Argument

Description

libraryname

A string whose value is the name of the PowerBuilder library from which you want to export an object. If you do not specify a full path, LibraryExport uses the system's standard file search order to find the file.

objectname

A string whose value is the name of the object you want to export

objecttype

A value of the LibExportType enumerated datatype identifying the type of objects you want to export:

  • ExportApplication! -- Application object

  • ExportDataWindow! -- DataWindow object

  • ExportFunction! -- Function object

  • ExportMenu! -- Menu object

  • ExportPipeline! -- Pipeline objects

  • ExportProject! -- Project objects

  • ExportQuery! -- Query objects

  • ExportStructure! -- Structure object

  • ExportUserObject! -- User objects

  • ExportWindow! -- Window object


Return value

String.

Returns the syntax of the object if it succeeds. The syntax is the same as the syntax returned when you export an object in the Library painter except that LibraryExport does not include an export header. Returns the empty string ("") if an error occurs. If any argument's value is null, LibraryExport returns null.

Examples

These statements export the DataWindow object dw_emp from the library called dwTemp to a string named ls_dwsyn and then use it to create a DataWindow:

String ls_dwsyn, ls_errors
ls_dwsyn = LibraryExport("c:\pb\dwTemp.pbl", &
    "d_emp", ExportDataWindow!)
dw_1.Create(ls_dwsyn, ls_errors)

See also

Create method for DataWindows in the section called “Create” in DataWindow Reference.

LibraryCreate

LibraryDelete

LibraryDirectory

LibraryImport