Author Topic: Setting Custom Diagram Appearance from Script  (Read 1199 times)

potterm

  • EA User
  • **
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Setting Custom Diagram Appearance from Script
« on: March 06, 2025, 08:27:55 pm »
Hi All,

I've written a script to create a (large) package hierarchy with default diagrams.  I want some of these diagrams to have Custom Style enabled (as can be set in the Diagram Properties from the EA user interface) but I can't see a way of achieving this through the EA Automation interface.  I thought it might be buried in the StyleEx settings, but can't see anything obvious, even when comparing a diagram that does / does not have his setting enabled.

Has anyone managed this from a script?

Thanks,
Martin

potterm

  • EA User
  • **
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Setting Custom Diagram Appearance from Script
« Reply #1 on: March 06, 2025, 08:56:23 pm »
Have solved it, although not in a very elegant way.  I basically copied the StyleEx and ExtendedStyle attribute values for a diagram that does have Custom Style enabled and this seems to have worked.  I omitted the SaveTag vaue through, as this looks like it's some kind of tracking variable.   These attributes map to the StyleEx and PDATA columns in the t_diagram table if taking the values from the database directly.

Martin