<div dir="ltr">Hello Team,<div><br></div><div>I am getting an error while using persistence_units.CloseAll() method of persistence_units module. of win32com</div><div><br></div><div>Error: <span class="gmail-ansi-red-intense-fg gmail-ansi-bold" style="font-size:14px;white-space:pre-wrap;box-sizing:border-box;color:rgb(178,43,49);font-weight:bold">AttributeError</span><span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap">: '<win32com.gen_py.erwin Data Modeler Script Client API Type Library.ISCPersistenceUnitCollection instance at 0x3171750852880>' object has no attribute 'CloseAll'</span></div><div><br></div><div>Below is my code where i am trying to access and erwin datamodel , check connection and close connection.<br><div><br></div><div>i<i>mport win32com.client as win32<br><br># Create an instance of the erwin API<br>erwin_api = win32.Dispatch("erwin9.SCAPI")<br><br># Connect to erwin Data Modeler Mart or local repository<br># Get the PersistenceUnits collection<br>persistence_units = erwin_api.PersistenceUnits<br><br># Open an existing persistence unit<br>existing_persistence_unit = persistence_units.Add(r"D:\\testdm.erwin")<br>print("Opened existing persistence unit:", existing_persistence_unit.Name)<br><br># Close all persistence units<br>persistence_units.CloseAll()<br>print("Closed all persistence units")<br><br># Save changes to all persistence units<br>#persistence_units.SaveAll()<br>print("Saved changes to all persistence units")</i><br></div><div><br></div><div>Can you please let me know, what is the correct method if CloseAll is not the correct method.</div><div>Is there any link where I can get all the methods of erwin_api.PersistenceUnits ?</div><div><br></div><div>Thanks,</div><div><br></div><div>Pranav</div></div></div>