Std Open: Difference between revisions

From LabRPS Documentation
Jump to navigation Jump to search
(Created page with "{{Docnav |Std New 3DPlot |RecentFiles |Std File Menu |IconL=Std_New_3DPlot.svg |IconR= |IconC=Labrps.svg }} {{GuiCommand |Name=Std Open |MenuLocation=File → Open... |Workbenches=All |Shortcut={{KEY|Ctrl}}+{{KEY|O}} |SeeAlso=Std Import, Std New }} ==Description== The '''Std Open''' command opens a file. If the file is not a native LabRPS file (*.RPSStd) its content will be imported in...")
 
No edit summary
 
Line 11: Line 11:
|Name=Std Open
|Name=Std Open
|MenuLocation=File → Open...
|MenuLocation=File → Open...
|Workbenches=All
|Phenomena=All
|Shortcut={{KEY|Ctrl}}+{{KEY|O}}
|Shortcut={{KEY|Ctrl}}+{{KEY|O}}
|SeeAlso=[[Std_Import|Std Import]], [[Std_New|Std New]]
|SeeAlso=[[Std_Import|Std Import]], [[Std_New|Std New]]

Latest revision as of 05:27, 25 July 2024

Std Open.svg Std Open

Menu location
File → Open...
Phenomena
All
Default shortcut
Ctrl+O
Introduced in version
-
See also
Std Import, Std New

Description

The Std Open command opens a file. If the file is not a native LabRPS file (*.RPSStd) its content will be imported into a new document. See Std Import for more information.

Usage

  1. There are several ways to invoke the command:
    • Press the Std Open.svg Open... button.
    • Select the File → Std Open.svg Open... option from the menu.
    • Use the keyboard shortcut: Ctrl+O.
  2. Optionally select the correct file format in the dialog box.
  3. Select a file.
  4. Press the Open button.

Options

  • Press Esc or the Cancel button to abort the command.

Scripting

See also: Autogenerated API documentation and LabRPS Scripting Basics.

To open a document use the open(filepath) method or the openDocument(filepath, [hidden=False]) method of the LabRPS application.

These methods create and return a document and load a project file into it. The filepath argument must be a string pointing to an existing file. If the file doesn't exist or the file cannot be loaded an I/O exception is thrown. In this case the created document is kept, but will be empty. If hidden=True is used, the document won't be displayed in the GUI and no tab will appear for it. This allows performing automatic operations on a document and closing it without disrupting the user interface.

For a scripting example see Std New.