v2.26
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 Enable ()
 Re-enables the user interface of Renga (including the Close button in the title bar) and unblocks the user input. More...
 
HRESULT Disable ()
 Disables the user interface of Renga (including the Close button in the title bar) and blocks the user input. More...
 
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). More...
 
HRESULT GetCurrentLocale ([out, retval] BSTR *pLocale)
 Returns the current locale.
 
HRESULT CreateProject ([out, retval] int *pResult)
 Creates a new project based on the default template. More...
 
HRESULT CreateProjectFromTemplate ([in] BSTR fileName, [out, retval] int *pResult)
 Creates a new project based on the specified template. More...
 
HRESULT ImportIfcProject ([in] BSTR fileName, [out, retval] int *pResult)
 Creates a new project and import data from the specified IFC file. More...
 
HRESULT OpenProject ([in] BSTR fileName, [out, retval] int *pResult)
 Opens the project by the given filename. More...
 
HRESULT CloseProject ([in] VARIANT_BOOL discardChanges, [out, retval] int *pResult)
 Closes the current project. More...
 
HRESULT Quit ()
 Quits Renga. More...
 
HRESULT CreateIfcExportSettings ([out, retval] IIfcExportSettings **ppIfcExportSettings)
 Returns the instance of Ifc Extert Settings.
 

Properties

VARIANT_BOOL Enabled [get, set]
 Disables or enables the user interface of Renga. More...
 
IView ActiveView [get]
 The currently active view.
 
IUI UI [get]
 The UI interface.
 
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).
 
VARIANT_BOOL Visible [get, set]
 The visibility state of Renga's user interface. More...
 

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 IApplication::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 IApplication::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 IApplication::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 IApplication::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 IApplication::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 IApplication::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 IApplication::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 IApplication::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 IApplication::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 IApplication::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.

◆ Visible

VARIANT_BOOL IApplication::Visible
getset

The visibility state of Renga's user interface.

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