Hello Team,

I am getting an error while using persistence_units.CloseAll() method of
persistence_units module. of win32com

Error: AttributeError: '<win32com.gen_py.erwin Data Modeler Script Client
API Type Library.ISCPersistenceUnitCollection instance at 0x3171750852880>'
object has no attribute 'CloseAll'

Below is my code where i am trying to access and erwin datamodel , check
connection and close connection.

i


















*mport win32com.client as win32# Create an instance of the erwin
APIerwin_api = win32.Dispatch("erwin9.SCAPI")# Connect to erwin Data
Modeler Mart or local repository# Get the PersistenceUnits
collectionpersistence_units = erwin_api.PersistenceUnits# Open an existing
persistence unitexisting_persistence_unit =
persistence_units.Add(r"D:\\testdm.erwin")print("Opened existing
persistence unit:", existing_persistence_unit.Name)# Close all persistence
unitspersistence_units.CloseAll()print("Closed all persistence units")#
Save changes to all persistence
units#persistence_units.SaveAll()print("Saved changes to all persistence
units")*

Can you please let me know, what is the correct method if CloseAll is not
the correct method.
Is there any link where I can get all the methods of
erwin_api.PersistenceUnits ?

Thanks,

Pranav
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to