-
Hi, if I try the following lines of code, I get a "CAD import failed." error using the *.scdoc file. from ansys.meshing import prime
prime_client = prime.launch_prime()
model = prime_client.model
file_io = prime.FileIO(model)
import_params = prime.ImportCadParams(model=model)
file_io.import_cad(
file_name='some_model.scdoc',
params=import_params
)
prime_client.exit() Traceback: File "C:\Python310_64_ansys\lib\site-packages\ansys\meshing\prime\core\fileio.py", line 586, in import_cad
import_result = super().import_cad(temp_file_name, params)
File "C:\Python310_64_ansys\lib\site-packages\ansys\meshing\prime\autogen\fileio.py", line 692, in import_cad
result = self._comm.serve(self._model, command_name, self._object_id, args=args)
File "C:\Python310_64_ansys\lib\site-packages\ansys\meshing\prime\internals\error_handling.py", line 577, in wrapper_error_code
raise PrimeRuntimeError(
ansys.meshing.prime.internals.error_handling.PrimeRuntimeError: CAD import failed. The default seems to be: from ansys.meshing import prime
prime_client = prime.launch_prime()
model = prime_client.model
file_io = prime.FileIO(model)
import_params = prime.ImportCadParams(model=model, cad_reader_route=prime.CadReaderRoute.WORKBENCH)
file_io.import_cad(
file_name='some_model.scdoc',
params=import_params
)
prime_client.exit() Which reader is used if the default option PROGRAMCONTROLLED is use? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @dkowollik For SCDOC files with PROGRAMCONTROLLED the SPACECLAIM reader would be used. For a summary, see here. Is it only a particular file you mention that fails? |
Beta Was this translation helpful? Give feedback.
-
Now, the following code works fine for me. I tested this with 0.8.0 and Ansys 25R2.
|
Beta Was this translation helpful? Give feedback.
Now, the following code works fine for me. I tested this with 0.8.0 and Ansys 25R2.