Class: Project

Defines a Project.

Methods

Name Description
Activate() Activate the current object.
AddComment() Creates a new child Comment.
AddImage(String) Creates a new child Image. If a filePath is provided, the image will be loaded from that file, if not, the image will be a screen capture of the Geometry window.
Archive(String, Boolean, ArchiveSettings) For Mechanical opened independently, without Workbench. Archive a Mechanical project.
ClearGeneratedData() Run the ClearGeneratedData action.
CombineTextFiles(String, String) Combines two text(.txt / .dmig / .inp / .dat) files. The secondary file will be appened to the primary file
CopyTo(DataModelObject) Copies all visible properties from this object to another.
CreateParameter(String) Creates a new parameter for a Property.
Duplicate() Creates a copy of the current DataModelObject.
GetParameter(String) Gets the parameter corresponding to the given property.
GetPath() Gets the path of the object.
GroupAllSimilarChildren() Run the GroupAllSimilarChildren action.
GroupSimilarObjects() Run the GroupSimilarObjects action.
New() For Mechanical opened independently, without Workbench. Start a new Mechanical project.
Open(String) For Mechanical opened independently, without Workbench. Open an existing Mechanical project.
PropertyByAPIName(String) Get a property by its API name. If multiple properties have the same API Name, only the first property with that name will be returned.
PropertyByName(String) Get a property by its unique name.
RemoveParameter(String) Removes the parameter from the parameter set corresponding to the given property.
Save() For Mechanical opened independently, without Workbench. Save current Mechanical project.
SaveAs(String, Boolean) For Mechanical opened independently, without Workbench. Save current Mechanical project to given filePath.
SpecifyMetricTemperatureInCelsius() Specify the use of Celsius thermal units for metric unit systems.
SpecifyMetricTemperatureInKelvin() Specify the use of Kelvin thermal units for metric unit systems.
Unarchive(String, String, Boolean) For Mechanical opened independently, without Workbench. Unarchive a Mechanical project and open it. If projectPath is provided, the project will be unarchived to this given projectPath. If projectPath is not provided or is null or empty, the project will be unarchived to a temporary folder. Returns a path to the unarchived project database file.

Properties

Name Description
Author Gets or sets the Author.
Comments Gets the list of associated comments.
CreationDate Gets the CreationDate.
CreationTime Gets the CreationTime.
DataModelObjectCategory Gets the name of the current DataModelObject's category.
FilePath Gets the Mechanical Project file path of current Mechanical session.
FirstSaved Gets the FirstSaved.
Images Gets the list of associated images.
ImportedSource Gets the ImportedSource.
ImportedVersion Gets the ImportedVersion.
InternalObject Gets the internal object. For advanced usage only.
LastSaved Gets the LastSaved.
Model Gets the Model.
Models ***OBSOLETE*** Use 'Model' property instead. Gets the Model.
Name Gets the name of the object.
ObjectId Gets the internal id of the object.
ObjectTags Gets an IEnumerable object of the tags that 'this' is a part of.
Parent Gets the parent object.
PreparedFor Gets or sets the PreparedFor.
ProductVersion Gets the ProductVersion.
ProjectDirectory Gets the Project Directory
Properties Gets the list of properties for this object.
SaveProjectAfterSolution Gets or sets the SaveProjectAfterSolution.
SaveProjectBeforeSolution Gets or sets the SaveProjectBeforeSolution.
Subject Gets or sets the Subject.
UnitSystem Change the Unit System.
UserFiles Gets the path of the user files folder of current project.
VisibleProperties Gets the list of properties that are visible for this object.