v2.37
 
IProject Interface Reference

Provides methods to work with a Renga project. This interface can be obtained from IApplication interface. To edit Renga project use IOperation class. More...

Inheritance diagram for IProject:

Public Member Functions

HRESULT CreateOperation ([out, retval] IOperation **ppOperation)
 Creates an operation.
 
HRESULT CreateOperationWithUndo ([in] GUID modelId, [out, retval] IOperation **ppOperation)
 Creates an operation with undo history.
 
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.
 
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.
 
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 ExportObjectsToIFC ([in] BSTR filePath, [in] SAFEARRAY(int) objectToExportIds, [in] VARIANT_BOOL overwrite, [in] IIfcExportSettings *pIfcExportSettings, [out, retval] int *pResult)
 Exports the given set of objects to the IFC file format.
 
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.
 
HRESULT ExportToIfc ([in] BSTR filePath, [in] VARIANT_BOOL overwrite, [out, retval] int *pResult)
 Exports the project to the IFC file format.
 
HRESULT ExportToIfc2 ([in] BSTR filePath, [in] VARIANT_BOOL overwrite, [in] IIfcExportSettings *pIfcExportSettings, [out, retval] int *pResult)
 Exports the project to the IFC file format.
 
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.
 
HRESULT GetUndoStack ([in] GUID modelId, [out, retval] IUndoStack **ppUndoStack)
 The undo stack of the model See IProject::CreateOperationWithUndo.
 
HRESULT HasActiveOperation ([out, retval] VARIANT_BOOL *pResult)
 Indicates whether the project has active operation.
 
HRESULT HasFile ([out, retval] VARIANT_BOOL *pResult)
 Indicates whether the project has ever been saved.
 
HRESULT HasUnsavedChanges ([out, retval] VARIANT_BOOL *pResult)
 Indicates whether the project has unsaved changes.
 
HRESULT ImportCategory ([in] GUID entityTypeId, [in] BSTR filePath, [out, retval] IEntity **ppResult)
 Import category from STDL file.
 
HRESULT ImportCategoryS ([in] BSTR entityTypeId, [in] BSTR filePath, [out, retval] IEntity **ppResult)
 Same as ImportCategory, but accepting GUID as a string.
 
HRESULT Save ([out, retval] int *pResult)
 Saves the project under its current filename.
 
HRESULT SaveAs ([in] BSTR filePath, [in] enum ProjectType projectType, [in] VARIANT_BOOL overwrite, [out, retval] int *pResult)
 Saves the project under the given filename.
 

Properties

IEntityCollection Assemblies [get]
 Assemblies.
 
IBeamStyleManager BeamStyleManager [get]
 The beam style manager.
 
IEntityCollection BeamStyles [get]
 Beam styles.
 
IBuildingInfo BuildingInfo [get]
 The building information.
 
IColumnStyleManager ColumnStyleManager [get]
 The column style manager.
 
IEntityCollection ColumnStyles [get]
 Column styles.
 
IDataExporter DataExporter [get]
 The data exporter.
 
IEntityCollection DoorStyles [get]
 Door styles.
 
IDrawingCollection Drawings [get]
 Returns the collection of all the drawings in the project.
 
IEntityCollection Drawings2 [get]
 Returns the collection of all the drawings in the project as IEntity.
 
IEntityCollection DuctAccessoryCategories [get]
 Duct accessory categories.
 
IEntityCollection DuctAccessoryStyles [get]
 Duct accessory styles.
 
IEntityCollection DuctFittingCategories [get]
 Duct fitting categories.
 
IEntityCollection DuctFittingStyles [get]
 Duct fitting styles.
 
IEntityCollection DuctStyles [get]
 Duct styles.
 
IEntityCollection ElectricalCircuitLineStyles [get]
 Electrical circuit line styles.
 
IEntityCollection ElectricalConductorStyles [get]
 Electrical conductor styles.
 
IEntityCollection ElectricDistributionBoardCategories [get]
 Electric distribution board categories.
 
IEntityCollection ElectricDistributionBoardStyles [get]
 Distribution board styles.
 
IEntityCollection ElementStyles [get]
 Element styles.
 
IEntityCollection EquipmentCategories [get]
 Equipment categories.
 
IEquipmentStyleManager EquipmentStyleManager [get]
 
IEntityCollection EquipmentStyles [get]
 Equipment styles.
 
BSTR FilePath [get]
 The path of a previously-saved project file, or an empty string for a never-saved project.
 
IEntityCollection HoleStyles [get]
 Hole styles.
 
BSTR JournalPath [get]
 The path of a journal file.
 
ILandPlotInfo LandPlotInfo [get]
 The land plot information.
 
ILayeredMaterialManager LayeredMaterialManager [get]
 The layered material manager.
 
IEntityCollection LayeredMaterials [get]
 Layered materials.
 
IEntityCollection LayoutStyles [get]
 Layout styles.
 
IEntityCollection LightingFixtureCategories [get]
 Lighting fixture categories.
 
IEntityCollection LightingFixtureStyles [get]
 Lighting fixture styles.
 
IMaterialManager MaterialManager [get]
 The material manager.
 
IEntityCollection Materials [get]
 Materials.
 
IEntityCollection MechanicalEquipmentCategories [get]
 Mechanical equipment categories.
 
IEntityCollection MechanicalEquipmentStyles [get]
 Mechanical equipment styles.
 
IModel Model [get]
 The building model.
 
IEntityCollection PageFormatStyles [get]
 Page form styles.
 
IEntityCollection PipeAccessoryCategories [get]
 Pipe accessory categories.
 
IEntityCollection PipeAccessoryStyles [get]
 Pipe accessory styles.
 
IEntityCollection PipeFittingCategories [get]
 Pipe fitting categories.
 
IEntityCollection PipeFittingStyles [get]
 Pipe fitting styles.
 
IEntityCollection PipeStyles [get]
 Pipe styles.
 
IEntityCollection PlateStyles [get]
 Plate styles.
 
IEntityCollection PlumbingFixtureCategories [get]
 Plumbing fixture categories.
 
IPlumbingFixtureStyleManager PlumbingFixtureStyleManager [get]
 The plumbing fixture style manager.
 
IEntityCollection PlumbingFixtureStyles [get]
 Plumbing fixture styles.
 
IProfileDescriptionManager ProfileDescriptionManager [get]
 The profile description manager.
 
IEntityCollection Profiles [get]
 Profiles.
 
IProjectInfo ProjectInfo [get]
 The project information.
 
ProjectType ProjectType [get]
 Returns the project type.
 
IPropertyManager PropertyManager [get]
 The property manager.
 
IEntityCollection RebarStyles [get]
 Rebar styles.
 
IEntityCollection ReinforcementGrades [get]
 Reinforcement grades.
 
IEntityCollection ReinforcementStyles [get]
 Reinforcement styles.
 
IReinforcementUnitStyleManager ReinforcementUnitStyleManager [get]
 The reinforcement unit style manager.
 
IEntityCollection ReinforcementUnitStyles [get]
 Reinforcement unit styles.
 
ISystemStyleManager SystemStyleManager [get]
 The system style manager.
 
IEntityCollection SystemStyles [get]
 System styles.
 
IEntityCollection Topics [get]
 Topics.
 
IEntityCollection WindowStyles [get]
 Window styles.
 
IEntityCollection WiringAccessoryCategories [get]
 Wiring accessory categories.
 
IEntityCollection WiringAccessoryStyles [get]
 Wiring accessory styles.
 

Detailed Description

Provides methods to work with a Renga project. This interface can be obtained from IApplication interface. To edit Renga project use IOperation class.

Member Function Documentation

◆ CreateOperation()

HRESULT 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.

◆ CreateOperationWithUndo()

HRESULT CreateOperationWithUndo ( [in] GUID modelId,
[out, retval] IOperation ** ppOperation )

Creates an operation with undo history.

Same as CreateOperation, but with Undo history

Each model (IModel) has associated undo history stack. For example Building model, Assembly model, Drawing model have different undo history stacks. Changes in one model may cause changes in another one but all the changeset will form one undo item and will belong to concrete undo stack. The plugin developer can control where this item will be placed. It should also be understood that the undo operation is disabled for project based Renga entities, e.g. styles, materials, etc. The undo operation is applicable only for model objects.

Parameters
[in]modelIdID of the model that will own the undo history item. See IModel::Id.
Returns
The newly created operation.

◆ ExportDrawingsToOpenXpsS()

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.

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

◆ ExportObjectsToIFC()

HRESULT ExportObjectsToIFC ( [in] BSTR filePath,
[in] SAFEARRAY(int) objectToExportIds,
[in] VARIANT_BOOL overwrite,
[in] IIfcExportSettings * pIfcExportSettings,
[out, retval] int * pResult )

Exports the given set of objects to the IFC file format.

Parameters
[in]filePathFile path.
[in]objectToExportIdsIds of objects to export.
[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.

◆ ExportToCsv()

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.

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

◆ HasActiveOperation()

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

Indicates whether the project has active operation.

If there is an active operation then the plugin can not start another one.

Returns
TRUE if there is an active operation in the project, FALSE otherwise.

◆ HasFile()

HRESULT 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 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.

◆ ImportCategory()

HRESULT ImportCategory ( [in] GUID entityTypeId,
[in] BSTR filePath,
[out, retval] IEntity ** ppResult )

Import category from STDL file.

See also
ImportCategoryS

◆ ImportCategoryS()

HRESULT ImportCategoryS ( [in] BSTR entityTypeId,
[in] BSTR filePath,
[out, retval] IEntity ** ppResult )

Same as ImportCategory, but accepting GUID as a string.

See also
ImportCategory

◆ Save()

HRESULT 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 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 Drawings
get

Returns the collection of all the drawings in the project.

Returns
Collection of drawings.

◆ Drawings2

IEntityCollection Drawings2
get

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

Returns
Collection of drawings.

◆ EquipmentStyleManager

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

◆ PlumbingFixtureStyleManager

IPlumbingFixtureStyleManager PlumbingFixtureStyleManager
get

The plumbing fixture style manager.

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

◆ SystemStyleManager

ISystemStyleManager SystemStyleManager
get

The system style manager.

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