Project#

class ansys.mechanical.stubs.v242.Ansys.ACT.Automation.Mechanical.Project#

Bases: object

Defines a Project.

Overview#

SpecifyMetricTemperatureInKelvin

Specify the use of Kelvin thermal units for metric unit systems.

SpecifyMetricTemperatureInCelsius

Specify the use of Celsius thermal units for metric unit systems.

ClearGeneratedData

Run the ClearGeneratedData action.

Open

For Mechanical opened independently, without Workbench. Open an existing Mechanical project.

Save

For Mechanical opened independently, without Workbench. Save current Mechanical project.

SaveAs

For Mechanical opened independently, without Workbench. Save current Mechanical project to given filePath.

New

For Mechanical opened independently, without Workbench. Start a new Mechanical project.

Archive

For Mechanical opened independently, without Workbench. Archive a Mechanical project.

Unarchive

For Mechanical opened independently, without Workbench. Unarchive a Mechanical project and open it.

CombineTextFiles

Combines two text(.txt / .dmig / .inp / .dat) files. The secondary file will be appened to the primary file

GetChildren

Gets the list of children, filtered by type.

GetChildren

Gets the list of children, filtered by type.

AddComment

Creates a new child Comment.

AddImage

Creates a new child Image.

Activate

Activate the current object.

CopyTo

Copies all visible properties from this object to another.

Duplicate

Creates a copy of the current DataModelObject.

GroupAllSimilarChildren

Run the GroupAllSimilarChildren action.

GroupSimilarObjects

Run the GroupSimilarObjects action.

PropertyByName

Get a property by its unique name.

PropertyByAPIName

Get a property by its API name.

CreateParameter

Creates a new parameter for a Property.

GetParameter

Gets the parameter corresponding to the given property.

RemoveParameter

Removes the parameter from the parameter set corresponding to the given property.

Models

Gets the Model.

Model

Gets the Model.

CreationDate

Gets the CreationDate.

CreationTime

Gets the CreationTime.

UnitSystem

Change the Unit System.

ProjectDirectory

Gets the Project Directory

UserFiles

Gets the path of the user files folder of current project.

FilePath

Gets the Mechanical Project file path of current Mechanical session.

InternalObject

Gets the internal object. For advanced usage only.

Author

Gets or sets the Author.

FirstSaved

Gets the FirstSaved.

ImportedSource

Gets the ImportedSource.

ImportedVersion

Gets the ImportedVersion.

LastSaved

Gets the LastSaved.

PreparedFor

Gets or sets the PreparedFor.

ProductVersion

Gets the ProductVersion.

Subject

Gets or sets the Subject.

SaveProjectAfterSolution

Gets or sets the SaveProjectAfterSolution.

SaveProjectBeforeSolution

Gets or sets the SaveProjectBeforeSolution.

DataModelObjectCategory

Gets the current DataModelObject’s category.

Children

Gets the list of children.

Comments

Gets the list of associated comments.

Images

Gets the list of associated images.

InternalObject

Gets the internal object. For advanced usage only.

Properties

Gets the list of properties for this object.

VisibleProperties

Gets the list of properties that are visible for this object.

Property detail#

property Project.Models: System.Collections.Generic.IEnumerable[Ansys.ACT.Automation.Mechanical.Model] | None

Gets the Model.

property Project.Model: Ansys.ACT.Automation.Mechanical.Model | None

Gets the Model.

property Project.CreationDate: System.String | None

Gets the CreationDate.

property Project.CreationTime: System.String | None

Gets the CreationTime.

property Project.UnitSystem: Ansys.Mechanical.DataModel.Enums.UserUnitSystemType | None

Change the Unit System.

property Project.ProjectDirectory: System.String | None

Gets the Project Directory

property Project.UserFiles: System.String | None

Gets the path of the user files folder of current project.

property Project.FilePath: System.String | None

Gets the Mechanical Project file path of current Mechanical session.

property Project.InternalObject: Ansys.Common.Interop.DSObjectsAuto.IDSProjectAuto | None

Gets the internal object. For advanced usage only.

property Project.Author: System.String | None

Gets or sets the Author.

property Project.FirstSaved: System.String | None

Gets the FirstSaved.

property Project.ImportedSource: System.String | None

Gets the ImportedSource.

property Project.ImportedVersion: System.String | None

Gets the ImportedVersion.

property Project.LastSaved: System.String | None

Gets the LastSaved.

property Project.PreparedFor: System.String | None

Gets or sets the PreparedFor.

property Project.ProductVersion: System.String | None

Gets the ProductVersion.

property Project.Subject: System.String | None

Gets or sets the Subject.

property Project.SaveProjectAfterSolution: System.Boolean | None

Gets or sets the SaveProjectAfterSolution.

property Project.SaveProjectBeforeSolution: System.Boolean | None

Gets or sets the SaveProjectBeforeSolution.

property Project.DataModelObjectCategory: Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory | None

Gets the current DataModelObject’s category.

property Project.Children: System.Collections.Generic.IList[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] | None

Gets the list of children.

property Project.Comments: System.Collections.Generic.IEnumerable[Ansys.ACT.Automation.Mechanical.Comment] | None

Gets the list of associated comments.

property Project.Images: System.Collections.Generic.IEnumerable[Ansys.ACT.Automation.Mechanical.Image] | None

Gets the list of associated images.

property Project.InternalObject: System.Object | None

Gets the internal object. For advanced usage only.

property Project.Properties: System.Collections.Generic.IReadOnlyList[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties for this object.

property Project.VisibleProperties: System.Collections.Generic.IReadOnlyList[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties that are visible for this object.

Method detail#

Project.SpecifyMetricTemperatureInKelvin() System.Void

Specify the use of Kelvin thermal units for metric unit systems.

Project.SpecifyMetricTemperatureInCelsius() System.Void

Specify the use of Celsius thermal units for metric unit systems.

Project.ClearGeneratedData() System.Void

Run the ClearGeneratedData action.

Project.Open(filePath: System.String) System.Void

For Mechanical opened independently, without Workbench. Open an existing Mechanical project.

Project.Save() System.Void

For Mechanical opened independently, without Workbench. Save current Mechanical project.

Project.SaveAs(filePath: System.String, overwrite: System.Boolean) System.Void

For Mechanical opened independently, without Workbench. Save current Mechanical project to given filePath.

Project.New() System.Void

For Mechanical opened independently, without Workbench. Start a new Mechanical project.

Project.Archive(archivePath: System.String, overwrite: System.Boolean, settings: Ansys.ACT.Automation.Mechanical.ArchiveSettings) System.Void

For Mechanical opened independently, without Workbench. Archive a Mechanical project.

Project.Unarchive(archivePath: System.String, projectPath: System.String, overwrite: System.Boolean) System.String
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.
Project.CombineTextFiles(PrimaryFileName: System.String, SecondaryFileName: System.String) System.Void

Combines two text(.txt / .dmig / .inp / .dat) files. The secondary file will be appened to the primary file

Project.GetChildren(recurses: System.Boolean, children: System.Collections.Generic.IList[ChildrenType]) System.Collections.Generic.IList[ChildrenType]

Gets the list of children, filtered by type.

Project.GetChildren(category: Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory, recurses: System.Boolean, children: System.Collections.Generic.IList[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject]) System.Collections.Generic.IList[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject]

Gets the list of children, filtered by type.

Project.AddComment() Ansys.ACT.Automation.Mechanical.Comment

Creates a new child Comment.

Project.AddImage(filePath: System.String) Ansys.ACT.Automation.Mechanical.Image
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.
Project.Activate() System.Void

Activate the current object.

Project.CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject) System.Void

Copies all visible properties from this object to another.

Project.Duplicate() Ansys.Mechanical.DataModel.Interfaces.IDataModelObject

Creates a copy of the current DataModelObject.

Project.GroupAllSimilarChildren() System.Void

Run the GroupAllSimilarChildren action.

Project.GroupSimilarObjects() Ansys.ACT.Automation.Mechanical.TreeGroupingFolder

Run the GroupSimilarObjects action.

Project.PropertyByName(name: System.String) Ansys.ACT.Automation.Mechanical.Property

Get a property by its unique name.

Project.PropertyByAPIName(name: System.String) Ansys.ACT.Automation.Mechanical.Property
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.
Project.CreateParameter(propName: System.String) Ansys.ACT.Interfaces.Mechanical.IParameter

Creates a new parameter for a Property.

Project.GetParameter(propName: System.String) Ansys.ACT.Interfaces.Mechanical.IParameter

Gets the parameter corresponding to the given property.

Project.RemoveParameter(propName: System.String) System.Void

Removes the parameter from the parameter set corresponding to the given property.