.. vale off :class:`Project` ================ .. py:class:: ansys.mechanical.stubs.v242.Ansys.ACT.Automation.Mechanical.Project(internalObject: Any) Bases: :py:obj:`object` Defines a Project. .. !! processed by numpydoc !! .. py:currentmodule:: Project Overview -------- .. tab-set:: .. tab-item:: Constructors .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~DetermineStandaloneAppletModeFromArchive` - DetermineStandaloneAppletModeFromArchive method. .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~Activate` - Activate the current object. * - :py:attr:`~AddComment` - Creates a new child Comment. * - :py:attr:`~AddImage` - Creates a new child Image. * - :py:attr:`~AddMaterial` - Add a material from a file to the project. * - :py:attr:`~Archive` - For Mechanical opened independently, without Workbench. Archive a Mechanical project. * - :py:attr:`~ClearGeneratedData` - Run the ClearGeneratedData action. * - :py:attr:`~CombineTextFiles` - Combines two text(.txt / .dmig / .inp / .dat) files. The secondary file will be appened to the primary file * - :py:attr:`~CopyTo` - Copies all visible properties from this object to another. * - :py:attr:`~CreateObjRef` - CreateObjRef method. * - :py:attr:`~CreateParameter` - Creates a new parameter for a Property. * - :py:attr:`~Duplicate` - Creates a copy of the current DataModelObject. * - :py:attr:`~Equals` - Equals method. * - :py:attr:`~ExportAssemblyManagerData` - Exports the data relevant to the Assembly Manager * - :py:attr:`~ForceUnlock` - ForceUnlock method. * - :py:attr:`~GetAPIName` - Property name bound to dispId. * - :py:attr:`~GetAllProperties` - GetAllProperties method. * - :py:attr:`~GetChildren` - Gets the list of children, filtered by type. * - :py:attr:`~GetEnumName` - Enum name bound to value * - :py:attr:`~GetHashCode` - GetHashCode method. * - :py:attr:`~GetIconFile` - GetIconFile method. * - :py:attr:`~GetLifetimeService` - GetLifetimeService method. * - :py:attr:`~GetObjectData` - GetObjectData method. * - :py:attr:`~GetParameter` - Gets the parameter corresponding to the given property. * - :py:attr:`~GetPath` - GetPath method. * - :py:attr:`~GetPropertyName` - GetPropertyName method. * - :py:attr:`~GetPropertyValue` - GetPropertyValue method. * - :py:attr:`~GetType` - GetType method. * - :py:attr:`~GetVisibleProperties` - GetVisibleProperties method. * - :py:attr:`~GetVisiblePropertyNames` - GetVisiblePropertyNames method. * - :py:attr:`~GroupAllSimilarChildren` - Run the GroupAllSimilarChildren action. * - :py:attr:`~GroupSimilarObjects` - Run the GroupSimilarObjects action. * - :py:attr:`~InitializeLifetimeService` - InitializeLifetimeService method. * - :py:attr:`~IsPropertyEditable` - IsPropertyEditable method. * - :py:attr:`~IsPropertyVisible` - IsPropertyVisible method. * - :py:attr:`~New` - For Mechanical opened independently, without Workbench. Start a new Mechanical project. * - :py:attr:`~Open` - For Mechanical opened independently, without Workbench. Open an existing Mechanical project. * - :py:attr:`~PropertyByAPIName` - Get a property by its API name. * - :py:attr:`~PropertyById` - PropertyById method. * - :py:attr:`~PropertyByName` - Get a property by its unique name. * - :py:attr:`~RemoveParameter` - Removes the parameter from the parameter set corresponding to the given property. * - :py:attr:`~ResetArchiveData` - For Mechanical opened independently, without Workbench. Resets the cached file path data for opening an archived project file. * - :py:attr:`~Save` - For Mechanical opened independently, without Workbench. Save current Mechanical project. * - :py:attr:`~SaveAs` - For Mechanical opened independently, without Workbench. Save current Mechanical project to given filePath. * - :py:attr:`~SpecifyMetricTemperatureInCelsius` - Specify the use of Celsius thermal units for metric unit systems. * - :py:attr:`~SpecifyMetricTemperatureInKelvin` - Specify the use of Kelvin thermal units for metric unit systems. * - :py:attr:`~ToString` - ToString method. * - :py:attr:`~Unarchive` - For Mechanical opened independently, without Workbench. Unarchive a Mechanical project and open it. .. tab-item:: Properties .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~Author` - Gets or sets the Author. * - :py:attr:`~Children` - Gets the list of children. * - :py:attr:`~Comments` - Gets the list of associated comments. * - :py:attr:`~CreationDate` - Gets the CreationDate. * - :py:attr:`~CreationTime` - Gets the CreationTime. * - :py:attr:`~DataModelObjectCategory` - Gets the current DataModelObject's category. * - :py:attr:`~EngineeringDataLibrary` - EngineeringDataLibrary property. * - :py:attr:`~FilePath` - Gets the Mechanical Project file path of current Mechanical session. * - :py:attr:`~FirstSaved` - Gets the FirstSaved. * - :py:attr:`~GroupingFolder` - GroupingFolder property. * - :py:attr:`~IconName` - IconName property. * - :py:attr:`~Images` - Gets the list of associated images. * - :py:attr:`~ImportedSource` - Gets the ImportedSource. * - :py:attr:`~ImportedVersion` - Gets the ImportedVersion. * - :py:attr:`~InternalObject` - Gets the internal object. For advanced usage only. * - :py:attr:`~IsArchive` - For Mechanical opened independently, without Workbench. Returns True when working in an opened archive project, otherwise, returns False. * - :py:attr:`~LastSaved` - Gets the LastSaved. * - :py:attr:`~Model` - Gets the Model. * - :py:attr:`~Models` - Gets the Model. * - :py:attr:`~Name` - Name property. * - :py:attr:`~ObjectId` - ObjectId property. * - :py:attr:`~ObjectState` - ObjectState property. * - :py:attr:`~ObjectTags` - ObjectTags property. * - :py:attr:`~OriginalArchiveFile` - For Mechanical opened independently, without Workbench. Returns the original archive file path opened in current session. * - :py:attr:`~Parent` - Parent property. * - :py:attr:`~PreparedFor` - Gets or sets the PreparedFor. * - :py:attr:`~ProductVersion` - Gets the ProductVersion. * - :py:attr:`~ProjectDirectory` - Gets the Project Directory * - :py:attr:`~Properties` - Gets the list of properties for this object. * - :py:attr:`~SaveProjectAfterSolution` - Gets or sets the SaveProjectAfterSolution. * - :py:attr:`~SaveProjectBeforeSolution` - Gets or sets the SaveProjectBeforeSolution. * - :py:attr:`~State` - State property. * - :py:attr:`~Subject` - Gets or sets the Subject. * - :py:attr:`~UnarchivedProjectFile` - For Mechanical opened independently, without Workbench. Returns the unarchived project file path of the current session. * - :py:attr:`~UnitSystem` - Change the Unit System. * - :py:attr:`~UserFiles` - Gets the path of the user files folder of current project. * - :py:attr:`~VisibleProperties` - Gets the list of properties that are visible for this object. Property detail --------------- .. py:property:: Author :type: Optional[str] Gets or sets the Author. .. !! processed by numpydoc !! .. py:property:: Children :type: Optional[List[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject]] Gets the list of children. .. !! processed by numpydoc !! .. py:property:: Comments :type: Optional[Iterable[Ansys.ACT.Automation.Mechanical.Comment]] Gets the list of associated comments. .. !! processed by numpydoc !! .. py:property:: CreationDate :type: Optional[str] Gets the CreationDate. .. !! processed by numpydoc !! .. py:property:: CreationTime :type: Optional[str] Gets the CreationTime. .. !! processed by numpydoc !! .. py:property:: DataModelObjectCategory :type: Optional[Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory] Gets the current DataModelObject's category. .. !! processed by numpydoc !! .. py:property:: EngineeringDataLibrary :type: Optional[Any] EngineeringDataLibrary property. .. !! processed by numpydoc !! .. py:property:: FilePath :type: Optional[str] Gets the Mechanical Project file path of current Mechanical session. .. !! processed by numpydoc !! .. py:property:: FirstSaved :type: Optional[str] Gets the FirstSaved. .. !! processed by numpydoc !! .. py:property:: GroupingFolder :type: Optional[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] GroupingFolder property. .. !! processed by numpydoc !! .. py:property:: IconName :type: Optional[str] IconName property. .. !! processed by numpydoc !! .. py:property:: Images :type: Optional[Iterable[Ansys.ACT.Automation.Mechanical.Image]] Gets the list of associated images. .. !! processed by numpydoc !! .. py:property:: ImportedSource :type: Optional[str] Gets the ImportedSource. .. !! processed by numpydoc !! .. py:property:: ImportedVersion :type: Optional[str] Gets the ImportedVersion. .. !! processed by numpydoc !! .. py:property:: InternalObject :type: Optional[Ansys.Common.Interop.DSObjectsAuto.IDSProjectAuto] Gets the internal object. For advanced usage only. .. !! processed by numpydoc !! .. py:property:: IsArchive :type: Optional[bool] For Mechanical opened independently, without Workbench. Returns True when working in an opened archive project, otherwise, returns False. .. !! processed by numpydoc !! .. py:property:: LastSaved :type: Optional[str] Gets the LastSaved. .. !! processed by numpydoc !! .. py:property:: Model :type: Optional[Ansys.ACT.Automation.Mechanical.Model] Gets the Model. .. !! processed by numpydoc !! .. py:property:: Models :type: Optional[Iterable[Ansys.ACT.Automation.Mechanical.Model]] Gets the Model. .. !! processed by numpydoc !! .. py:property:: Name :type: Optional[str] Name property. .. !! processed by numpydoc !! .. py:property:: ObjectId :type: Optional[int] ObjectId property. .. !! processed by numpydoc !! .. py:property:: ObjectState :type: Optional[Ansys.Mechanical.DataModel.Enums.ObjectState] ObjectState property. .. !! processed by numpydoc !! .. py:property:: ObjectTags :type: Optional[Iterable[Ansys.Mechanical.DataModel.Interfaces.IObjectTag]] ObjectTags property. .. !! processed by numpydoc !! .. py:property:: OriginalArchiveFile :type: Optional[str] For Mechanical opened independently, without Workbench. Returns the original archive file path opened in current session. .. !! processed by numpydoc !! .. py:property:: Parent :type: Optional[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] Parent property. .. !! processed by numpydoc !! .. py:property:: PreparedFor :type: Optional[str] Gets or sets the PreparedFor. .. !! processed by numpydoc !! .. py:property:: ProductVersion :type: Optional[str] Gets the ProductVersion. .. !! processed by numpydoc !! .. py:property:: ProjectDirectory :type: Optional[str] Gets the Project Directory .. !! processed by numpydoc !! .. py:property:: Properties :type: Optional[tuple[Ansys.ACT.Automation.Mechanical.Property]] Gets the list of properties for this object. .. !! processed by numpydoc !! .. py:property:: SaveProjectAfterSolution :type: Optional[bool] Gets or sets the SaveProjectAfterSolution. .. !! processed by numpydoc !! .. py:property:: SaveProjectBeforeSolution :type: Optional[bool] Gets or sets the SaveProjectBeforeSolution. .. !! processed by numpydoc !! .. py:property:: State :type: Optional[Ansys.Mechanical.DataModel.Enums.Legacy.State] State property. .. !! processed by numpydoc !! .. py:property:: Subject :type: Optional[str] Gets or sets the Subject. .. !! processed by numpydoc !! .. py:property:: UnarchivedProjectFile :type: Optional[str] For Mechanical opened independently, without Workbench. Returns the unarchived project file path of the current session. .. !! processed by numpydoc !! .. py:property:: UnitSystem :type: Optional[Ansys.Mechanical.DataModel.Enums.UserUnitSystemType] Change the Unit System. .. !! processed by numpydoc !! .. py:property:: UserFiles :type: Optional[str] Gets the path of the user files folder of current project. .. !! processed by numpydoc !! .. py:property:: VisibleProperties :type: Optional[tuple[Ansys.ACT.Automation.Mechanical.Property]] Gets the list of properties that are visible for this object. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: Activate() -> None Activate the current object. .. !! processed by numpydoc !! .. py:method:: AddComment() -> Ansys.ACT.Automation.Mechanical.Comment Creates a new child Comment. .. !! processed by numpydoc !! .. py:method:: AddImage(filePath: str) -> Ansys.ACT.Automation.Mechanical.Image .. code-block:: text 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. .. !! processed by numpydoc !! .. py:method:: AddMaterial(url: str, urn: str, name: str) -> str Add a material from a file to the project. .. !! processed by numpydoc !! .. py:method:: Archive(archivePath: str, overwrite: bool, settings: Ansys.ACT.Automation.Mechanical.ArchiveSettings) -> None For Mechanical opened independently, without Workbench. Archive a Mechanical project. .. !! processed by numpydoc !! .. py:method:: ClearGeneratedData() -> None Run the ClearGeneratedData action. .. !! processed by numpydoc !! .. py:method:: CombineTextFiles(PrimaryFileName: str, SecondaryFileName: str) -> None Combines two text(.txt / .dmig / .inp / .dat) files. The secondary file will be appened to the primary file .. !! processed by numpydoc !! .. py:method:: CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject) -> None Copies all visible properties from this object to another. .. !! processed by numpydoc !! .. py:method:: CreateObjRef(requestedType: type) -> System.Runtime.Remoting.ObjRef CreateObjRef method. .. !! processed by numpydoc !! .. py:method:: CreateParameter(propName: str) -> Ansys.ACT.Interfaces.Mechanical.IParameter Creates a new parameter for a Property. .. !! processed by numpydoc !! .. py:method:: DetermineStandaloneAppletModeFromArchive(archiveFile: str) -> None :classmethod: DetermineStandaloneAppletModeFromArchive method. .. !! processed by numpydoc !! .. py:method:: Duplicate() -> Ansys.Mechanical.DataModel.Interfaces.IDataModelObject Creates a copy of the current DataModelObject. .. !! processed by numpydoc !! .. py:method:: Equals(other: Ansys.Mechanical.DataModel.Interfaces.IDataModelObject) -> bool Equals method. .. !! processed by numpydoc !! .. py:method:: ExportAssemblyManagerData(destinationDir: str, exportFormat: Ansys.Mechanical.DataModel.Enums.AssemblyManagerExportFormat, exportSettings: Ansys.ACT.Automation.Mechanical.AssemblyManagerExportSettings) -> None Exports the data relevant to the Assembly Manager .. !! processed by numpydoc !! .. py:method:: ForceUnlock(projectFilePath: str) -> None ForceUnlock method. .. !! processed by numpydoc !! .. py:method:: GetAPIName(dispId: int) -> str Property name bound to dispId. .. !! processed by numpydoc !! .. py:method:: GetAllProperties() -> List[Ansys.ACT.Automation.Mechanical.AutomationPropertyWrapper] GetAllProperties method. .. !! processed by numpydoc !! .. py:method:: GetChildren(recurses: bool, children: List[ChildrenType]) -> List[ChildrenType] Gets the list of children, filtered by type. .. !! processed by numpydoc !! .. py:method:: GetEnumName(enumType: type, value: int, dispId: int) -> str Enum name bound to value .. !! processed by numpydoc !! .. py:method:: GetHashCode() -> int GetHashCode method. .. !! processed by numpydoc !! .. py:method:: GetIconFile() -> System.Byte GetIconFile method. .. !! processed by numpydoc !! .. py:method:: GetLifetimeService() -> Any GetLifetimeService method. .. !! processed by numpydoc !! .. py:method:: GetObjectData(info: System.Runtime.Serialization.SerializationInfo, context: System.Runtime.Serialization.StreamingContext) -> None GetObjectData method. .. !! processed by numpydoc !! .. py:method:: GetParameter(propName: str) -> Ansys.ACT.Interfaces.Mechanical.IParameter Gets the parameter corresponding to the given property. .. !! processed by numpydoc !! .. py:method:: GetPath() -> str GetPath method. .. !! processed by numpydoc !! .. py:method:: GetPropertyName(dispId: int) -> str GetPropertyName method. .. !! processed by numpydoc !! .. py:method:: GetPropertyValue(name: str) -> Any GetPropertyValue method. .. !! processed by numpydoc !! .. py:method:: GetType() -> type GetType method. .. !! processed by numpydoc !! .. py:method:: GetVisibleProperties() -> List[System.Reflection.PropertyInfo] GetVisibleProperties method. .. !! processed by numpydoc !! .. py:method:: GetVisiblePropertyNames() -> List[str] GetVisiblePropertyNames method. .. !! processed by numpydoc !! .. py:method:: GroupAllSimilarChildren() -> None Run the GroupAllSimilarChildren action. .. !! processed by numpydoc !! .. py:method:: GroupSimilarObjects() -> Ansys.ACT.Automation.Mechanical.TreeGroupingFolder Run the GroupSimilarObjects action. .. !! processed by numpydoc !! .. py:method:: InitializeLifetimeService() -> Any InitializeLifetimeService method. .. !! processed by numpydoc !! .. py:method:: IsPropertyEditable(dispId: int) -> bool IsPropertyEditable method. .. !! processed by numpydoc !! .. py:method:: IsPropertyVisible(dispId: int) -> bool IsPropertyVisible method. .. !! processed by numpydoc !! .. py:method:: New() -> None For Mechanical opened independently, without Workbench. Start a new Mechanical project. .. !! processed by numpydoc !! .. py:method:: Open(filePath: str) -> None For Mechanical opened independently, without Workbench. Open an existing Mechanical project. .. !! processed by numpydoc !! .. py:method:: PropertyByAPIName(name: str) -> Ansys.ACT.Automation.Mechanical.Property .. code-block:: text 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. .. !! processed by numpydoc !! .. py:method:: PropertyById(dispId: int) -> Ansys.ACT.Automation.Mechanical.Property PropertyById method. .. !! processed by numpydoc !! .. py:method:: PropertyByName(name: str) -> Ansys.ACT.Automation.Mechanical.Property Get a property by its unique name. .. !! processed by numpydoc !! .. py:method:: RemoveParameter(propName: str) -> None Removes the parameter from the parameter set corresponding to the given property. .. !! processed by numpydoc !! .. py:method:: ResetArchiveData() -> None For Mechanical opened independently, without Workbench. Resets the cached file path data for opening an archived project file. .. !! processed by numpydoc !! .. py:method:: Save() -> None For Mechanical opened independently, without Workbench. Save current Mechanical project. .. !! processed by numpydoc !! .. py:method:: SaveAs(filePath: str, overwrite: bool) -> None For Mechanical opened independently, without Workbench. Save current Mechanical project to given filePath. .. !! processed by numpydoc !! .. py:method:: SpecifyMetricTemperatureInCelsius() -> None Specify the use of Celsius thermal units for metric unit systems. .. !! processed by numpydoc !! .. py:method:: SpecifyMetricTemperatureInKelvin() -> None Specify the use of Kelvin thermal units for metric unit systems. .. !! processed by numpydoc !! .. py:method:: ToString() -> str ToString method. .. !! processed by numpydoc !! .. py:method:: Unarchive(archivePath: str, projectPath: str, overwrite: bool) -> str .. code-block:: text 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. .. !! processed by numpydoc !! .. vale on