Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: bert dingemans on October 05, 2018, 08:57:10 pm

Title: Attributes black in projectbrowser when created via Automation
Post by: bert dingemans on October 05, 2018, 08:57:10 pm
Hi

Since version 14 when I create an attribute via scripting a black box appears in the projectbrowser and not the image of the scope. In the element browser the attribute is correct displayed. I looked in the t_attribute table but see no differences between the original attribute and the generated one?
Title: Re: Attributes black in projectbrowser when created via Automation
Post by: Geert Bellekens on October 05, 2018, 08:59:26 pm
Do the attributes have a specific stereotype?

Can you post the code that creates the attributes?

Geert
Title: Re: Attributes black in projectbrowser when created via Automation
Post by: bert dingemans on October 06, 2018, 04:48:40 pm
If Not IsNothing(objElement) And Not IsDBNull(objRow.Item("Attribute")) Then
                            Dim objAttribute As EA.Attribute
                            objAttribute = objElement.Attributes.AddNew(objRow.Item("Attribute"), "Variant")
                            objAttribute.Notes = strDocum
                            objAttribute.Update()
                            objElement.Update()
                            strDocum = ""
End If

Title: Re: Attributes black in projectbrowser when created via Automation
Post by: Eve on October 08, 2018, 08:12:10 am
From memory, it's public attributes/operations. It happens when DPI scaling is required.
Title: Re: Attributes black in projectbrowser when created via Automation
Post by: bert dingemans on October 08, 2018, 11:14:57 pm
Hello, I found the solution, setting the visibility of an attribute to Private did the trick