LlProjectOpen

Syntax:

INT LlProjectOpen(HLLJOB hJob, UINT nObjType, LPCTSTR pszObjName, UINT nOpenMode);

Task:

This function is only available starting with the Professional Edition! Opens the specified project file. Call LlDomGetProject() to retrieve the DOM handle for the project object afterwards. This object is the basis for all further DOM functions. Detailed application examples can be found in chapter DOM Functions.

Parameter:

hJob: List & Label job handle

nObjType:

Value

Meaning

LL_PROJECT_LABEL

for labels

LL_PROJECT_CARD

for index cards

LL_PROJECT_LIST

for lists

 

pszObjName: Project file name with path and file extension

nOpenMode: Combination (ORing) of a flag from each of the following three groups:

Value

Meaning

LL_PRJOPEN_CD_OPEN_EXISTING

File must already exist, otherwise error code will be returned.

LL_PRJOPEN_CD_CREATE_ALWAYS

File is always newly created. If it already exists, the content is deleted.

LL_PRJOPEN_CD_CREATE_NEW

File is newly created if it does not exist. If file already exists, error code is returned.

LL_PRJOPEN_CD_OPEN_ALWAYS

If file exists the content is used, otherwise file is newly created.

 

Value

Meaning

LL_PRJOPEN_AM_READWRITE

File is opened for read/write access.

LL_PRJOPEN_AM_READONLY

File is only opened for read access.

 

Value

Meaning

LL_PRJOPEN_EM_IGNORE_
FORMULAERRORS

Syntax errors are ignored. See notes.

 

Return value:

Error code

Hints

If the flag LL_PRJOPEN_EM_IGNORE_FORMULAERRORS is used, syntax errors in the project are ignored. This has the advantage that projects can be successfully opened and edited even if the data structure is unknown or undefined. As the formulas in the project are then treated as placeholders, the section with the used variables (see LlGetUsedIdentifiers()) cannot be correctly written, if you e.g. add further columns to a table. The content of this section is left unchanged when saving. The same applies for the case where a new table, which has not previously been used, is inserted in a report container. Therefore, LL_PRJOPEN_EM_IGNORE_FORMULAERRORS must not be set for such cases. If the flag is not set, LL_NTFY_EXPRERROR can be used to collect the error messages for display.

Example:

See chapter DOM Functions.

See also:

LlProjectSave, LlProjectClose, LlDomGetProject