I've imported a PowerDesigner LDM into ER/Studio and run a macro to extract attachments and their default values to Excel. None of the imported default values appear in the Excel, only those I've added or edited since the import.
Any idea why, and what I can do to sort it?
I'm accessing dictionary.attachmenttypes.attachment.valuedefault
Dim diag As Diagram
Dim dict As Dictionary
Dim AttType As AttachmentType
Dim Atts As Attachments
Dim Att As Attachment
Set diag = DiagramManager.ActiveDiagram
Set dict = diag.Dictionary
For Each AttType In dict.AttachmentTypes
For Each Att In AttType.Attachments
Debug.Print AttType.Name & "," & Att.Name
'Debug.Print " -- " & Att.Description
Debug.Print " -- default value -- " & Att.ValueDefault
Are you trying to get a list of attachments assigned to Data Dictionary objects, or to your tables / columns?
I don't mind what they've been bound to, I just want the attachments themselves
What they've been bound to is important, as it determines which objects your macro needs to interrogate. There is an Attachment Binding Export to Excel macro under Meta Data Management Macros that may give you what you want.
At the moment I just want to export the attachments with their default values so I can check the Dictionary import worked okay - I could possibly also use this to update those default values with a macro. It's annoying that the imported default values aren't exported by the macro.
I think this is a bug, by the way.
So I'm a bit confused - I have an Enterprise DD that contains a list of attachments, some of which contain defaults. When I run your macro, I get the attachment default value as shown on the Value tab (if the attachment type has one). What is it that you're not getting?
If the default value was imported, the macro does not access it - see this sample (shows the value for enttResourceType). I have a simple PowerDesigner LDM anyone can import to try it
Perhaps it's a bug in 18.4 - I'm running 17.1 and it's working properly
Powered by IDERA