v2.25
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...
 
HRESULT ExportToIfc2 ([in] BSTR filePath, [in] VARIANT_BOOL overwrite, [in] IIfcExportSettings *pIfcExportSettings, [out, retval] int *pResult)
 Exports the project to the IFC file format. More...
 
HRESULT ExportDrawingsToPdfS ([in] SAFEARRAY(BSTR) drawingIds, [in] BSTR filePath, [in] VARIANT_BOOL overwrite, [out, retval] int *pResult)
 Same as ExportDrawingsToPdf, but accepting GUID as a string.
 
HRESULT ExportDrawingsToOpenXpsS ([in] SAFEARRAY(BSTR) drawingIds, [in] BSTR filePath, [in] VARIANT_BOOL overwrite, [out, retval] int *pResult)
 Exports the collection of drawings to the OpenXPS file format. More...
 
HRESULT CreateOperation ([out, retval] IOperation **ppOperation)
 Creates an operation. More...
 
HRESULT GetEntityNumberInTopic ([in] GUID entityId, [out, retval] int *pResult)
 Returns the number of the specified entity in it's Topic.
 
HRESULT GetEntityNumberInTopicS ([in] BSTR entityId, [out, retval] int *pResult)
 Same as GetEntityNumberInTopic, but accepting GUID as a string.
 

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 building 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.
 
ISystemStyleManager SystemStyleManager [get]
 The system style manager. More...
 
IPlumbingFixtureStyleManager PlumbingFixtureStyleManager [get]
 The plumbing fixture style manager. More...
 
IEquipmentStyleManager EquipmentStyleManager [get]
 
IProjectInfo ProjectInfo [get]
 The project information.
 
IBuildingInfo BuildingInfo [get]
 The building information.
 
ILandPlotInfo LandPlotInfo [get]
 The land plot information.
 
IEntityCollection PipeAccessoryStyles [get]
 Pipe accessory styles.
 
IEntityCollection PipeStyles [get]
 Pipe styles.
 
IEntityCollection PipeFittingStyles [get]
 Pipe fitting styles.
 
IEntityCollection MechanicalEquipmentStyles [get]
 Mechanical equipment styles.
 
IEntityCollection DuctStyles [get]
 Duct styles.
 
IEntityCollection DuctFittingStyles [get]
 Duct fitting styles.
 
IEntityCollection DuctAccessoryStyles [get]
 Duct accessory styles.
 
IEntityCollection LightFixtureStyles [get]
 Duct accessory styles.
 
IEntityCollection WiringAccessoryStyles [get]
 Wiring accessory styles.
 
IEntityCollection ElectricDistributionBoardStyles [get]
 Distribution board styles.
 
IEntityCollection ElectricalConductorStyles [get]
 Electrical conductor styles.
 
IEntityCollection ElectricalCircuitLineStyles [get]
 Distribution board styles.
 
IEntityCollection SystemStyles [get]
 System styles.
 
IEntityCollection PlumbingFixtureStyles [get]
 Plumbing fixture styles.
 
IEntityCollection EquipmentStyles [get]
 Equipment styles.
 
IEntityCollection Assemblies [get]
 Assemblies.
 
IEntityCollection Drawings2 [get]
 Returns the collection of all the drawings in the project as IEntity. More...
 
IEntityCollection ElementStyles [get]
 Element styles.
 
IEntityCollection BeamStyles [get]
 Beam styles.
 
IEntityCollection ColumnStyles [get]
 Column styles.
 
IEntityCollection PlateStyles [get]
 Plate styles.
 
IEntityCollection Materials [get]
 Materials.
 
IEntityCollection WindowStyles [get]
 Window styles.
 
IEntityCollection DoorStyles [get]
 Door styles.
 
IEntityCollection LayeredMaterials [get]
 Layered materials.
 
IEntityCollection Profiles [get]
 Profiles.
 
IEntityCollection Topics [get]
 Topics.
 
IEntityCollection LayoutStyles [get]
 Layout styles.
 
IEntityCollection PageFormatStyles [get]
 Page form styles.
 
BSTR JournalPath [get]
 The path of a journal file.
 

Detailed Description

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

Member Function Documentation

◆ CreateOperation()

HRESULT IProject::CreateOperation ( [out, retval] IOperation **  ppOperation)

Creates an operation.

To modify any project entity it is necessary to create an operation and start it before the modifications are done, and apply it afterwards.

Returns
The newly created operation.

◆ ExportDrawingsToOpenXpsS()

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

Exports the collection of drawings to the OpenXPS 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 OXPS 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.

◆ ExportDrawingsToPdf()

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.

◆ ExportToCsv()

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.

◆ ExportToIfc()

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.
Deprecated:
This method is deprecated, use IProject::ExportToIfc2 instead

◆ ExportToIfc2()

HRESULT IProject::ExportToIfc2 ( [in] BSTR  filePath,
[in] VARIANT_BOOL  overwrite,
[in] IIfcExportSettings pIfcExportSettings,
[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.
[in]pIfcExportSettingsThe IFC export settings.
[out]pResultOperation result.
Returns
Zero if the project was successfully exported, a non-zero value otherwise.

◆ HasFile()

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.

◆ HasUnsavedChanges()

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.

◆ Save()

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.

◆ SaveAs()

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

◆ Drawings

IDrawingCollection IProject::Drawings
get

Returns the collection of all the drawings in the project.

Returns
Collection of drawings.

◆ Drawings2

IEntityCollection IProject::Drawings2
get

Returns the collection of all the drawings in the project as IEntity.

Returns
Collection of drawings.

◆ EquipmentStyleManager

IEquipmentStyleManager IProject::EquipmentStyleManager
get
Deprecated:
This property is deprecated, use IProject::EquipmentStyles instead

◆ PlumbingFixtureStyleManager

IPlumbingFixtureStyleManager IProject::PlumbingFixtureStyleManager
get

The plumbing fixture style manager.

Deprecated:
This property is deprecated, use IProject::PlumbingFixtureStyles instead

◆ SystemStyleManager

ISystemStyleManager IProject::SystemStyleManager
get

The system style manager.

Deprecated:
This property is deprecated, use IProject::SystemStyles instead