Hi All,
I completed a few group projects via using IDEA macro, while I need to export the history, PDF version, from databases manaually for documentation purposes.
I read Language Browser for help, and it seems no introduction on that is about history export.
How could I get the history from databases automatically rather than manaually exporting them one by one?
Seeking for your advice.
Regards
jennylam
Offline
Last seen: 9 months 1 week ago
Joined: 03/11/2017 - 21:18
Hi Jennylam,
Unfortunately there is no easy way to do this. IDEA didn't allow us access to reading the history through IDEAScript. There is a way to get around this but it isn't easy. If you look in the project folder there is a file called PorjectOverview.sdf which is a SQL Server Compact Database File, in this file there is a field that has the history, this is the history you see when you open the Project Overview. You can access it via script but it isn't that easy. I did do something when I was learning about it, I will see if I can find the script.
Brian
Hi Brian,
Any update about accessing PorjectOverview.sdf to get history via script? :)
Thanks and regards
Hi Jenny,
Sorry I haven't had a chance to look at this. It will take a bit of time to put this together as I will have to research how to access the sdf file and figure out how to make it work. Unfortunately this is something that is IDEAScript + in that I have to access other objects. Hopefully I will have some time in the near future to put this together.
Brian
Hi Jenny,
Ok, I was able to figure out the code to access the history. Can you tell me what you are looking for.
Thanks
Brian
Hi Brian,
Sorry to hijack post, but I would be interested in the Idea code needed to connect to the sdf history file and also the code needed to query against it (i.e. SELECT * FROM ????). I can do this in excel vba, but haven't figured out how to with IDEA.
Hi Scot,
I am givng some training right now so when I have a bit of free time I will put something together how you can incorporate this in your scripts.
Thanks
Brian
Hi Scott,
Here is some code that should get you on the right track. The sdf database contains two tables, the Overview which I am access and the Parent. The Parent table shows the parent child relationship between the files through the ChildGUID and ParentGUID. This shows how to access the table and some basic SQL to read all the records into an array which can be changed to access specific information. I have also attached the script. I am using a program called CompactView to view the database.
That's awesome. I know it's already been said, but you are the best.
Glad to help.
Hi Brian,
Thank you for sharing. I could see the history thru msgbox(ProjectInfo(i).HistoryLog).
But things I still can not figure out is how could I export the full array at one times in a PDF. Do I have to write in txt line by line first? Even that, the info been outputed is a clean version without any format, not like the PDF version that I export from IDEA database manually. About file convertion and format things, it will be greatly appreciated if you could give some advices.:)
Kind Regards
Pages