Hello Mark, Thank you for the response.
Just to share Erwin is an Data Modelling tool. I wanted to access Erwin through python and perform manipulations on DataModel through it. Regards, Pranav On Wed, May 17, 2023 at 6:21 PM Mark Hammond <mhamm...@skippinet.com.au> wrote: > I'm sorry, but you are very unlikely to find anyone on this list with > erwin experience. pywin32 is a general purpose library that allows talking > to *any* COM object, so there are literally hundreds and hundreds of > different apps it can work with. I've never even heard of erwin and have no > idea what it does :( You might fine someone else on this list has, and can > help you, but in the meantime... > > You really need to find support for the erwin app, not pywin32. Because > COM works in any language, you might find the help you need is written in > terms of a language other than Python, but the answer should translate > across to Python. > > Good luck, > > Mark > On 2023-05-17 5:39 a.m., Pranav S Pawar wrote: > > 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 API > erwin_api = win32.Dispatch("erwin9.SCAPI") # Connect to erwin Data Modeler > Mart or local repository # Get the PersistenceUnits collection > persistence_units = erwin_api.PersistenceUnits # Open an existing > persistence unit existing_persistence_unit = > persistence_units.Add(r"D:\\testdm.erwin") print("Opened existing > persistence unit:", existing_persistence_unit.Name) # Close all persistence > units persistence_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 > listpython-win32@python.orghttps://mail.python.org/mailman/listinfo/python-win32 > >
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32