v2.37
 
IApplication Interface Reference

Top-level Renga API object. Gives access to all the functionality of the API. More...

Inheritance diagram for IApplication:

Public Member Functions

HRESULT CloseProject ([in] VARIANT_BOOL discardChanges, [out, retval] int *pResult)
 Closes the current project.
 
HRESULT CreateIfcExportSettings ([out, retval] IIfcExportSettings **ppIfcExportSettings)
 Returns the instance of Ifc Extert Settings.
 
HRESULT CreateProject ([out, retval] int *pResult)
 Creates a new project based on the default template.
 
HRESULT CreateProjectFromTemplate ([in] BSTR fileName, [out, retval] int *pResult)
 Creates a new project based on the specified template.
 
HRESULT Disable ()
 Disables the user interface of Renga (including the Close button in the title bar) and blocks the user input.
 
HRESULT Enable ()
 Re-enables the user interface of Renga (including the Close button in the title bar) and unblocks the user input.
 
HRESULT GetCurrentLocale ([out, retval] BSTR *pLocale)
 Returns the current locale.
 
HRESULT GetMainWindowHandle ([out, retval] int *pHwnd)
 Returns the HWND of the main window.
 
HRESULT HasProject ([out, retval] VARIANT_BOOL *pResult)
 Indicates if the application has an open project (either loaded from a file, or a newly created one).
 
HRESULT ImportIfcProject ([in] BSTR fileName, [out, retval] int *pResult)
 Creates a new project and import data from the specified IFC file.
 
HRESULT OpenProject ([in] BSTR fileName, [out, retval] int *pResult)
 Opens the project by the given filename.
 
HRESULT Quit ()
 Quits Renga.
 

Properties

IView ActiveView [get]
 The currently active view.
 
VARIANT_BOOL Enabled [get, set]
 Disables or enables the user interface of Renga.
 
VARIANT_BOOL HasLastError [get]
 Returns VARIANT_TRUE if there was an error, VARIANT_FALSE otherwise.
 
BSTR LastError [get, set]
 The last error message or empty string if there is no error.
 
IProject Project [get]
 The currently opened project.
 
ISelection Selection [get]
 The selection interface. Selection will work with the currently active view (now only with View3D or LevelView).
 
IUI UI [get]
 The UI interface.
 
ProductVersion Version [get]
 Returns the product version.
 
BSTR VersionS [get]
 Same as Version, but returning version as a string.
 
VARIANT_BOOL Visible [get, set]
 The visibility state of Renga's user interface.
 

Detailed Description

Top-level Renga API object. Gives access to all the functionality of the API.

See _IApplicationEvents for a list of supported events.

Member Function Documentation

◆ CloseProject()

HRESULT CloseProject ( [in] VARIANT_BOOL discardChanges,
[out, retval] int * pResult )

Closes the current project.

Parameters
[in]discardChangesA flag that controls the behavior in the case there are unsaved changes in the project: VARIANT_TRUE to discard changes, VARIANT_FALSE to return a failure code.
[out]pResultOperation result.
Returns
Zero if the project was successfully closed, non-zero otherwise.

◆ CreateProject()

HRESULT CreateProject ( [out, retval] int * pResult)

Creates a new project based on the default template.

In case there is a project already open, no prompts are shown to user, and a non-zero value is returned.

Returns
Zero if the project was successfully created, non-zero otherwise.

◆ CreateProjectFromTemplate()

HRESULT CreateProjectFromTemplate ( [in] BSTR fileName,
[out, retval] int * pResult )

Creates a new project based on the specified template.

In case there is a project already open, no prompts are shown to user, and a non-zero value is returned.

Parameters
[in]fileNameThe template file name.
[out]pResultOperation result.
Returns
Zero if the project was successfully created, non-zero otherwise.

◆ Disable()

HRESULT Disable ( )

Disables the user interface of Renga (including the Close button in the title bar) and blocks the user input.

Plugins can call this function to prevent users from interacting with Renga while performing some custom activity.

Note
In order to simulate proper modal dialog behavior, plugins should also maintain the Z-ordering of their windows.
Deprecated
This method is deprecated, use IApplication::Enabled instead

◆ Enable()

HRESULT Enable ( )

Re-enables the user interface of Renga (including the Close button in the title bar) and unblocks the user input.

This method reverts the effect of Disable().

Deprecated
This method is deprecated, use IApplication::Enabled instead

◆ HasProject()

HRESULT HasProject ( [out, retval] VARIANT_BOOL * pResult)

Indicates if the application has an open project (either loaded from a file, or a newly created one).

Returns
VARIANT_TRUE if there is an open project, VARIANT_FALSE - otherwise.

◆ ImportIfcProject()

HRESULT ImportIfcProject ( [in] BSTR fileName,
[out, retval] int * pResult )

Creates a new project and import data from the specified IFC file.

In case there is a project already open, no prompts are shown to user, and a non-zero value is returned.

Parameters
[in]fileNameFile name of the IFC project to import.
[out]pResultOperation result.
Returns
Zero if the project was successfully created, non-zero otherwise.

◆ OpenProject()

HRESULT OpenProject ( [in] BSTR fileName,
[out, retval] int * pResult )

Opens the project by the given filename.

In case there is a project already open, no prompts are shown to user, and a non-zero value is returned.

Parameters
[in]fileNameThe project file name.
[out]pResultOperation result.
Returns
Zero if the project was successfully opened, non-zero otherwise.

◆ Quit()

HRESULT Quit ( )

Quits Renga.

In case there is a project open, the user will be shown a prompt to save the project.

Property Documentation

◆ Enabled

VARIANT_BOOL Enabled
getset

Disables or enables the user interface of Renga.

Plugins can call set this property to FALSE to prevent users from interacting with Renga while performing some custom activity.

Note
In order to simulate proper modal dialog behavior, plugins should also maintain the Z-ordering of their windows.

◆ HasLastError

VARIANT_BOOL HasLastError
get

Returns VARIANT_TRUE if there was an error, VARIANT_FALSE otherwise.

See also
LastError

◆ LastError

BSTR LastError
getset

The last error message or empty string if there is no error.

See also
HasLastError

◆ Version

ProductVersion Version
get

Returns the product version.

See also
VersionS

◆ VersionS

BSTR VersionS
get

Same as Version, but returning version as a string.

See also
Version

◆ Visible

VARIANT_BOOL Visible
getset

The visibility state of Renga's user interface.

VARIANT_TRUE if the user interface of Renga is visible, VARIANT_FALSE otherwise.