3434from ansys .geometry .core .math import UNITVECTOR3D_Z , Plane , Point2D , Point3D , UnitVector3D , Vector3D
3535from ansys .geometry .core .misc import UNITS , Distance
3636from ansys .geometry .core .sketch import Sketch
37- from ansys .geometry .core .tools .unsupported import PersistentIdType
37+ from ansys .geometry .core .tools .unsupported import ExportIdData , PersistentIdType
3838
3939from .conftest import FILES_DIR , IMPORT_FILES_DIR
4040
@@ -212,6 +212,7 @@ def test_open_file(modeler: Modeler, tmp_path_factory: pytest.TempPathFactory):
212212 comp1 .extrude_sketch ("Top" , sketch , 5 )
213213
214214 if BackendType .is_core_service (modeler .client .backend_type ):
215+ # Set single export ids and verify
215216 modeler .unsupported .set_export_id (base_body .id , PersistentIdType .PRIME_ID , "1" )
216217 modeler .unsupported .set_export_id (wheel_body .id , PersistentIdType .PRIME_ID , "2" )
217218
@@ -238,6 +239,27 @@ def test_open_file(modeler: Modeler, tmp_path_factory: pytest.TempPathFactory):
238239 assert base_body .faces [0 ].id in [f .id for f in faces ]
239240 assert base_body .edges [0 ].id in [e .id for e in edges ]
240241
242+ # Set multiple export ids at once and verify
243+ export_data = [
244+ ExportIdData (
245+ moniker = base_body .faces [1 ].id , id_type = PersistentIdType .PRIME_ID , value = "5"
246+ ),
247+ ExportIdData (
248+ moniker = base_body .edges [1 ].id , id_type = PersistentIdType .PRIME_ID , value = "6"
249+ ),
250+ ]
251+ modeler .unsupported .set_multiple_export_ids (export_data )
252+
253+ faces2 = modeler .unsupported .get_face_occurrences_from_import_id (
254+ "5" , PersistentIdType .PRIME_ID
255+ )
256+ edges2 = modeler .unsupported .get_edge_occurrences_from_import_id (
257+ "6" , PersistentIdType .PRIME_ID
258+ )
259+
260+ assert base_body .faces [1 ].id in [b .id for b in faces2 ]
261+ assert base_body .edges [1 ].id in [b .id for b in edges2 ]
262+
241263 file = tmp_path_factory .mktemp ("test_design_import" ) / "two_cars.scdocx"
242264 design .download (str (file ))
243265
0 commit comments