4D View v14

PV OPEN DOCUMENT

Home

 
4D View v14
PV OPEN DOCUMENT

PV OPEN DOCUMENT 


 

PV OPEN DOCUMENT ( area ; document ; template ) 
Parameter Type   Description
area  Longint in 4D View area
document  String in Document name
template  Integer in 0 = Document; 1 = Template

The PV OPEN DOCUMENT command opens in area the requested document.

Pass in document the full path name of the document to open. If you pass an empty string ("") in this parameter, a standard open file dialog box appears and the user can select the document. If the user clicks Cancel in this case, no document will be opened.

The template parameter allows you to set whether the document should be opened as a standard document (template=0) or as a template (template=1).
When a document is opened as a template, a new document "Untitled" is actually created, containing a copy of the requested document. The original document remains intact.
If the value of template is 1, the document is opened as if it were a template regardless of its actual status (document or template), set by PV SAVE DOCUMENT.

Note: The "document" template mechanism is managed by the OS. It is different from the one used with 4D View "templates", attached to included areas (accessible using the Save as template menu command). For more information on area templates, refer to the 4D View User manual (PDF).

Example  

Open a standard open file dialog box, applied to 4D View:

 PV OPEN DOCUMENT(Area;"";0) `Document choice

The Document variable system contains either the name or the access path and the name of the last disk file opened (see the 4D Language Reference manual, System Variables section).

The system variable OK uses 1 as its value if the document was correctly opened.

 
PROPERTIES 

Product: 4D View
Theme: PV Document
Number: 15979

The OK variable is changed by the commandThis command modifies the system Document variable

 
HISTORY 

Created: 4D View 6.8

 
SEE ALSO 

PV SAVE DOCUMENT

 
ARTICLE USAGE

4D View Language ( 4D View v11.4)
4D View Language ( 4D View v12)
4D View Language ( 4D v13)
4D View Language ( 4D View v14 R2)
4D View Language ( 4D View v14)
4D View Language ( 4D View v14 R3)
4D View Language ( 4D View v14 R4)