    

 ## On this page

  

 

 # `GeometryImport`

 Last update: 09.03.2026 

<a id="ansys.mechanical.stubs.v252.Ansys.ACT.Automation.Mechanical.GeometryImport"></a>

#### *class* Ansys.ACT.Automation.Mechanical.GeometryImport

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

Defines a GeometryImport.

<a id="overview"></a>

## Overview

### Methods

NameDescription[`Activate`](#GeometryImport.Activate)Activate the current object.[`AddComment`](#GeometryImport.AddComment)Creates a new child Comment.[`AddFigure`](#GeometryImport.AddFigure)Creates a new child Figure.[`AddImage`](#GeometryImport.AddImage)Creates a new child Image.[`CopyTo`](#GeometryImport.CopyTo)Copies all visible properties from this object to another.[`CreateParameter`](#GeometryImport.CreateParameter)Creates a new parameter for a Property.[`Duplicate`](#GeometryImport.Duplicate)Creates a copy of the current DataModelObject.[`GetChildren`](#GeometryImport.GetChildren)Gets the list of children, filtered by type.[`GetFormat`](#GeometryImport.GetFormat)Gets the format of the geometry file/data for the most recent import.[`GetGeometryURI`](#GeometryImport.GetGeometryURI)Gets the Geometry URI for the most recent import. The Universal Resource Identifier,[`GetParameter`](#GeometryImport.GetParameter)Gets the parameter corresponding to the given property.[`GetPreferences`](#GeometryImport.GetPreferences)Gets the preferences for most recent import operations with the geometry file/data.[`GroupAllSimilarChildren`](#GeometryImport.GroupAllSimilarChildren)Run the GroupAllSimilarChildren action.[`GroupSimilarObjects`](#GeometryImport.GroupSimilarObjects)Run the GroupSimilarObjects action.[`Import`](#GeometryImport.Import)Import/reload geometry from the CAD file using the provided preferences.   
  
`<br>**<br>`  
  
\* If no[`PropertyByAPIName`](#GeometryImport.PropertyByAPIName)Get a property by its API name.[`PropertyByName`](#GeometryImport.PropertyByName)Get a property by its unique name.[`RemoveParameter`](#GeometryImport.RemoveParameter)Removes the parameter from the parameter set corresponding to the given property.### Properties

NameDescription[`Children`](#GeometryImport.Children)Gets the list of children.[`Comments`](#GeometryImport.Comments)Gets the list of associated comments.[`DataModelObjectCategory`](#GeometryImport.DataModelObjectCategory)Gets the current DataModelObject’s category.[`Figures`](#GeometryImport.Figures)Gets the list of associated figures.[`Images`](#GeometryImport.Images)Gets the list of associated images.[`InternalObject`](#GeometryImport.InternalObject)Gets the internal object. For advanced usage only.[`Parts`](#GeometryImport.Parts)List of parts created by the most recent import operation.[`Properties`](#GeometryImport.Properties)Gets the list of properties for this object.[`VisibleProperties`](#GeometryImport.VisibleProperties)Gets the list of properties that are visible for this object.<a id="property-detail"></a>

## Property detail

<a id="GeometryImport.Children"></a>

### *property* GeometryImport.Children *: List\[[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject](../../../Mechanical/DataModel/Interfaces/IDataModelObject.md#ansys.mechanical.stubs.v252.Ansys.Mechanical.DataModel.Interfaces.IDataModelObject)\] | [None](https://docs.python.org/3/library/constants.html#None)*

Gets the list of children.

<a id="GeometryImport.Comments"></a>

### *property* GeometryImport.Comments *: Iterable\[[Ansys.ACT.Automation.Mechanical.Comment](Comment.md#ansys.mechanical.stubs.v252.Ansys.ACT.Automation.Mechanical.Comment)\] | [None](https://docs.python.org/3/library/constants.html#None)*

Gets the list of associated comments.

<a id="GeometryImport.DataModelObjectCategory"></a>

### *property* GeometryImport.DataModelObjectCategory *: [Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory](../../../Mechanical/DataModel/Enums/DataModelObjectCategory.md#ansys.mechanical.stubs.v252.Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory) | [None](https://docs.python.org/3/library/constants.html#None)*

Gets the current DataModelObject’s category.

<a id="GeometryImport.Figures"></a>

### *property* GeometryImport.Figures *: Iterable\[[Ansys.ACT.Automation.Mechanical.Figure](Figure.md#ansys.mechanical.stubs.v252.Ansys.ACT.Automation.Mechanical.Figure)\] | [None](https://docs.python.org/3/library/constants.html#None)*

Gets the list of associated figures.

<a id="GeometryImport.Images"></a>

### *property* GeometryImport.Images *: Iterable\[[Ansys.ACT.Automation.Mechanical.Image](Image.md#ansys.mechanical.stubs.v252.Ansys.ACT.Automation.Mechanical.Image)\] | [None](https://docs.python.org/3/library/constants.html#None)*

Gets the list of associated images.

<a id="GeometryImport.InternalObject"></a>

### *property* GeometryImport.InternalObject *: Ansys.Common.Interop.DSObjectsAuto.IDSGeometryImportAuto | [None](https://docs.python.org/3/library/constants.html#None)*

Gets the internal object. For advanced usage only.

<a id="GeometryImport.Parts"></a>

### *property* GeometryImport.Parts *: List\[Any\] | [None](https://docs.python.org/3/library/constants.html#None)*

List of parts created by the most recent import operation.

<a id="GeometryImport.Properties"></a>

### *property* GeometryImport.Properties *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[Ansys.ACT.Automation.Mechanical.Property\] | [None](https://docs.python.org/3/library/constants.html#None)*

Gets the list of properties for this object.

<a id="GeometryImport.VisibleProperties"></a>

### *property* GeometryImport.VisibleProperties *: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[Ansys.ACT.Automation.Mechanical.Property\] | [None](https://docs.python.org/3/library/constants.html#None)*

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

<a id="method-detail"></a>

## Method detail

<a id="GeometryImport.Activate"></a>

### GeometryImport.Activate() → [None](https://docs.python.org/3/library/constants.html#None)

Activate the current object.

<a id="GeometryImport.AddComment"></a>

### GeometryImport.AddComment() → [Ansys.ACT.Automation.Mechanical.Comment](Comment.md#ansys.mechanical.stubs.v252.Ansys.ACT.Automation.Mechanical.Comment)

Creates a new child Comment.

<a id="GeometryImport.AddFigure"></a>

### GeometryImport.AddFigure() → [Ansys.ACT.Automation.Mechanical.Figure](Figure.md#ansys.mechanical.stubs.v252.Ansys.ACT.Automation.Mechanical.Figure)

Creates a new child Figure.

<a id="GeometryImport.AddImage"></a>

### GeometryImport.AddImage(filePath: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [Ansys.ACT.Automation.Mechanical.Image](Image.md#ansys.mechanical.stubs.v252.Ansys.ACT.Automation.Mechanical.Image)

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

```

<a id="GeometryImport.CopyTo"></a>

### GeometryImport.CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject) → [None](https://docs.python.org/3/library/constants.html#None)

Copies all visible properties from this object to another.

<a id="GeometryImport.CreateParameter"></a>

### GeometryImport.CreateParameter(propName: [str](https://docs.python.org/3/library/stdtypes.html#str)) → Ansys.ACT.Interfaces.Mechanical.IParameter

Creates a new parameter for a Property.

<a id="GeometryImport.Duplicate"></a>

### GeometryImport.Duplicate() → [Ansys.Mechanical.DataModel.Interfaces.IDataModelObject](../../../Mechanical/DataModel/Interfaces/IDataModelObject.md#ansys.mechanical.stubs.v252.Ansys.Mechanical.DataModel.Interfaces.IDataModelObject)

Creates a copy of the current DataModelObject.

<a id="GeometryImport.GetChildren"></a>

### GeometryImport.GetChildren(recurses: [bool](https://docs.python.org/3/library/functions.html#bool), children: List\[ChildrenType\]) → List\[ChildrenType\]

Gets the list of children, filtered by type.

<a id="GeometryImport.GetFormat"></a>

### GeometryImport.GetFormat() → [Ansys.Mechanical.DataModel.Enums.GeometryImportPreference.Format](../../../Mechanical/DataModel/Enums/GeometryImportPreference/Format.md#ansys.mechanical.stubs.v252.Ansys.Mechanical.DataModel.Enums.GeometryImportPreference.Format)

Gets the format of the geometry file/data for the most recent import.

<a id="GeometryImport.GetGeometryURI"></a>

### GeometryImport.GetGeometryURI() → [str](https://docs.python.org/3/library/stdtypes.html#str)

```text
Gets the Geometry URI for the most recent import. The Universal Resource Identifier,
which on disk would be "file://..."

```

<a id="GeometryImport.GetParameter"></a>

### GeometryImport.GetParameter(propName: [str](https://docs.python.org/3/library/stdtypes.html#str)) → Ansys.ACT.Interfaces.Mechanical.IParameter

Gets the parameter corresponding to the given property.

<a id="GeometryImport.GetPreferences"></a>

### GeometryImport.GetPreferences() → [Ansys.ACT.Mechanical.Utilities.GeometryImportPreferences](../../Mechanical/Utilities/GeometryImportPreferences.md#ansys.mechanical.stubs.v252.Ansys.ACT.Mechanical.Utilities.GeometryImportPreferences)

Gets the preferences for most recent import operations with the geometry file/data.

<a id="GeometryImport.GroupAllSimilarChildren"></a>

### GeometryImport.GroupAllSimilarChildren() → [None](https://docs.python.org/3/library/constants.html#None)

Run the GroupAllSimilarChildren action.

<a id="GeometryImport.GroupSimilarObjects"></a>

### GeometryImport.GroupSimilarObjects() → [Ansys.ACT.Automation.Mechanical.TreeGroupingFolder](TreeGroupingFolder.md#ansys.mechanical.stubs.v252.Ansys.ACT.Automation.Mechanical.TreeGroupingFolder)

Run the GroupSimilarObjects action.

<a id="GeometryImport.Import"></a>

### GeometryImport.Import(geometryURI: [str](https://docs.python.org/3/library/stdtypes.html#str), format: [Ansys.Mechanical.DataModel.Enums.GeometryImportPreference.Format](../../../Mechanical/DataModel/Enums/GeometryImportPreference/Format.md#ansys.mechanical.stubs.v252.Ansys.Mechanical.DataModel.Enums.GeometryImportPreference.Format), preferences: [Ansys.ACT.Mechanical.Utilities.GeometryImportPreferences](../../Mechanical/Utilities/GeometryImportPreferences.md#ansys.mechanical.stubs.v252.Ansys.ACT.Mechanical.Utilities.GeometryImportPreferences)) → [None](https://docs.python.org/3/library/constants.html#None)

```text
Import/reload geometry from the CAD file using the provided preferences. *** If no
preference argument is provided, i.e., null is used (also the default argument), then
default values from Mechanical preferences will be used (Mechanical: File -&gt; Options:
Import; this will need to be implemented). Previously used preferences are always purged
during an import operation. *** The parts will be read into the Geometry.

```

<a id="GeometryImport.PropertyByAPIName"></a>

### GeometryImport.PropertyByAPIName(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → Ansys.ACT.Automation.Mechanical.Property

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

```

<a id="GeometryImport.PropertyByName"></a>

### GeometryImport.PropertyByName(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → Ansys.ACT.Automation.Mechanical.Property

Get a property by its unique name.

<a id="GeometryImport.RemoveParameter"></a>

### GeometryImport.RemoveParameter(propName: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None)

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