This contains two macros which will import and export entity information and attachments to Excel. The format will be
Model Name, Owner Name, Entity Name, Column Name, Datatype, Attribute Definition, Attachment1, Attachment2, ... Attachmentn
I'm testing these using the Northwind Diagram (because it has attachment bindings for Privacy level with 4 possible values). I dump it out using the export macro, no problem. I make changes in the attachment column I want in the spreadsheet, then try to import. Import macro finishes, but value for attachment doesn't change. I have the diagram checked out, all objects show as such. Please help.
Sorry for the late response on this. The values are case sensitive so you'll want to make sure you use "Yes" instead of "YES" or "yes". I've ran this macro a few times and it works fine as long as the case is correct. Please try that and let me know.If you're still running into issues please let me know what values you're trying to use and on which columns.
I am using the correct values... 'Yes' and 'No'.... the problem is, even after the import macro finishes, the data shown by the GUI still reports the original values... but, when I run the export macro again, the 'Yes' and 'No' values all come out correctly. Another user responded to this about a week ago saying he reported it to Idera as a bug (ERS-25769)....
What version of ER/Studio are you using? Try commenting out the DiagramManager.EnableScreenUpdate statements on line 49 and 120 and see if that makes a difference. This may make the macro run a bit slowing because it's updating the GUI as it goes along but this should make it show up.
That worked, thanks!
OK, UBound(Header) is throwing an "Array index out of range"... what is missing from the model? I have attachments bound at the entity and attribute level.
Is this a local or an enterprise data dictionary? This macro only works with a local data dictionary.
I believe on line 206 you should have something like this:
Set dd = diag.Dictionary
You'll want to change it to the following where you will want to specify "Your EDD Name".
Set dd = diag.EnterpriseDataDictionaries.Item("Your EDD Name")
And this should work.
Yes, that worked. Thanks!
Is it possible for you to share your final export/import code?
gagnonp2, i made the 2 changes mentioned above to the import script:
comment out lines 49 and 120
change the dd variable to point to our Enterprise Data Dictionary.
Funny thing though, after commenting out lines 49 and 120 successfully, I decided to try it with them uncommented and it also worked... your mileage may vary, but it's working here now.