1

I have tried so much but I can't find an answer.
How do I open an existing File using Python? When I try running my script, Catia always says:

Document cannot be read

I've tried this:

CATIA.Documents.Open("z:\tmp\kge\444YYY\iso4017.CATPart")

also I have tried creating a Product and adding a existing part with: AddComponentsFromFiles

Kerim Gel
  • 31
  • 4
  • Well, I'm not an expert in Python, but I guess backslashes in string literals need some special handling like in most other languages. Try double backslashes. https://docs.python.org/3.0/reference/lexical_analysis.html#string-and-bytes-literals – gdir Aug 24 '17 at 19:11
  • Thank you very much @gdir!!! It worked perfectly!!! – Kerim Gel Aug 25 '17 at 05:43

0 Answers0