v2.4
IProject Interface Reference

Provides methods to query the current project. This interface can be obtained from IApplication interface. More...

Inheritance diagram for IProject:

Public Member Functions

HRESULT HasFile ([out, retval] VARIANT_BOOL *pResult)
 Indicates whether the project has ever been saved. More...
 
HRESULT HasUnsavedChanges ([out, retval] VARIANT_BOOL *pResult)
 Indicates whether the project has unsaved changes. More...
 
HRESULT Save ([out, retval] int *pResult)
 Saves the project under its current filename. More...
 
HRESULT SaveAs ([in] BSTR filePath, [in] enum ProjectType projectType, [in] VARIANT_BOOL overwrite, [out, retval] int *pResult)
 Saves the project under the given filename. More...
 
HRESULT ExportToIfc ([in] BSTR filePath, [in] VARIANT_BOOL overwrite, [out, retval] int *pResult)
 Exports the project to the IFC file format. More...
 
HRESULT ExportToCsv ([in] BSTR folderPath, [in] VARIANT_BOOL overwrite, [out, retval] int *pResult)
 Exports the project data to CSV format. This method creates several CSV files in the given folder. More...
 
HRESULT ExportDrawingsToPdf ([in] SAFEARRAY(GUID) drawingIds, [in] BSTR filePath, [in] VARIANT_BOOL overwrite, [out, retval] int *pResult)
 Exports the collection of drawings to the PDF file format. More...
 

Properties

BSTR FilePath [get]
 The path of a previously-saved project file, or an empty string for a never-saved project.
 
IModel Model [get]
 The project model.
 
IPropertyManager PropertyManager [get]
 The property manager.
 
IMaterialManager MaterialManager [get]
 The material manager.
 
ILayeredMaterialManager LayeredMaterialManager [get]
 The layered material manager.
 
IDataExporter DataExporter [get]
 The data exporter.
 
IReinforcementUnitStyleManager ReinforcementUnitStyleManager [get]
 The reinforcement unit style manager.
 
ProjectType ProjectType [get]
 Returns the project type.
 
IDrawingCollection Drawings [get]
 Returns the collection of all the drawings in the project. More...
 
IProfileDescriptionManager ProfileDescriptionManager [get]
 The profile description manager.
 
IBeamStyleManager BeamStyleManager [get]
 The beam style manager.
 
IColumnStyleManager ColumnStyleManager [get]
 The column style manager.
 

Detailed Description

Provides methods to query the current project. This interface can be obtained from IApplication interface.

Member Function Documentation

HRESULT IProject::ExportDrawingsToPdf ( [in] SAFEARRAY(GUID)  drawingIds,
[in] BSTR  filePath,
[in] VARIANT_BOOL  overwrite,
[out, retval] int *  pResult 
)

Exports the collection of drawings to the PDF file format.

Parameters
[in]drawingIdsAn array of identifiers of drawings to export.
[in]filePathFile path.
[in]overwriteA flag that controls the behavior in the case the PDF file with the same name already exists: VARIANT_TRUE to overwrite, VARIANT_FALSE to return a failure code.
[out]pResultOperation result.
Returns
Zero if the project was successfully exported, a non-zero value otherwise.
HRESULT IProject::ExportToCsv ( [in] BSTR  folderPath,
[in] VARIANT_BOOL  overwrite,
[out, retval] int *  pResult 
)

Exports the project data to CSV format. This method creates several CSV files in the given folder.

Parameters
[in]folderPathFile path.
[in]overwriteA flag that controls the behavior in the case one of the CSV file with the same name already exists: VARIANT_TRUE to overwrite, VARIANT_FALSE to return a failure code.
[out]pResultOperation result.
Returns
Zero if the project was successfully exported, a non-zero value otherwise.
HRESULT IProject::ExportToIfc ( [in] BSTR  filePath,
[in] VARIANT_BOOL  overwrite,
[out, retval] int *  pResult 
)

Exports the project to the IFC file format.

Parameters
[in]filePathFile path.
[in]overwriteA flag that controls the behavior in the case an IFC file with the same name already exists: VARIANT_TRUE to overwrite, VARIANT_FALSE to return a failure code.
[out]pResultOperation result.
Returns
Zero if the project was successfully exported, a non-zero value otherwise.
HRESULT IProject::HasFile ( [out, retval] VARIANT_BOOL *  pResult)

Indicates whether the project has ever been saved.

Use this function to distinguish new projects from ones that have already been saved.

Returns
FALSE for a new project (that has not been saved yet), TRUE otherwise.
HRESULT IProject::HasUnsavedChanges ( [out, retval] VARIANT_BOOL *  pResult)

Indicates whether the project has unsaved changes.

Returns
TRUE if there are unsaved changes in the project, FALSE otherwise.
HRESULT IProject::Save ( [out, retval] int *  pResult)

Saves the project under its current filename.

If there is no project open or there is no current filename, no prompts are shown to user, and a non-zero value is returned.

Returns
Zero if the project was successfully saved, non-zero otherwise.
HRESULT IProject::SaveAs ( [in] BSTR  filePath,
[in] enum ProjectType  projectType,
[in] VARIANT_BOOL  overwrite,
[out, retval] int *  pResult 
)

Saves the project under the given filename.

Parameters
[in]filePathThe file name of the project.
[in]projectTypeThe file format to save the project in: either a template (*.rnt) or a project (*.rnp).
[in]overwriteA flag that controls the behavior in the case the project file already exists: pass VARIANT_TRUE to overwrite or VARIANT_FALSE to return a failure code.
[out]pResultOperation result.
Returns
Zero if the project was successfully saved, non-zero otherwise.

Property Documentation

IDrawingCollection IProject::Drawings
get

Returns the collection of all the drawings in the project.

Returns
Collection of drawings.