I've written a simple macro to tell me how many Business Data Objects there are in a Model, and it doesn't work. Whenever I try to access mdl.BusinessDataObjects.Count the response is (10510) Not an Object Reference.
I have a similar macro for list subtype clusters that works fine.
Dim diag As Diagram
Dim mdl As Model
Dim submdl As SubModel
Dim bdo As BusinessDataObject
Dim msg As String
Set diag = DiagramManager.ActiveDiagram
Set mdl = diag.ActiveModel
Set submdl = mdl.ActiveSubModel
Debug.Print "Working with " & diag.FileName
Debug.Print " --- " & mdl.Name
If mdl.BusinessDataObjects.Count > 0 Then
Debug.Print "There are " & mdl.BusinessDataObjects.Count & " Business Data Objects"
For Each bdo In mdl.BusinessDataObjects
msg = "[" & bdo.LogicalName
Debug.Print "The model does not have any Business Data Objects"
I just ran your macro on a brand new model in which I inserted 4 Business Data Objects, and it ran fine in both the Logical and Physical model. There's nothing wrong with your code...
I've tried the macro with a sample model, a model imported from PowerDesigner, and a brand new model - same result with all of them.
I'm using ER/Studio 18.4.0 (build 11183) - perhaps it's a new feature.
I'll have to raise it with support - it's years since I did that, must find the right web page ...
Support have confirmed that it doesn't work in 18.4, and they're investigating
Powered by IDERA