Author Topic: EA Object Model and using methods to set properties  (Read 8527 times)

rabyvf

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
EA Object Model and using methods to set properties
« on: October 26, 2021, 11:44:09 pm »
I use VBscript or Javascript to access and update objects in the repository using the automation interface described in the Enterprise Architect Object Model. One example is that we recently updated to Sparx EA v15.2 and we need to use the Diagram property "Freeze Visible" connectors. We have approx. 500 diagrams stored in the repository where we want to update this Diagram property but there is no method available in the Diagram class to update "Freeze Visible".

I researched other threads in the Forum and discovered that the property is actually set as part of the StyleEx attribute. To publish methods in the EA Object Model would be greatly appreciated by many Sparx practitioners. From my perspective this seems to be a reasonably simple wish that really adds value to current Sparx customers especially if they update to a newer version.

@Sparx employees: Is this something that is being considered in later releases for the Diagram class and other classes? If not, please explain why so I can explain to other non-Sparx practitioners.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA Object Model and using methods to set properties
« Reply #1 on: October 26, 2021, 11:57:30 pm »
Hi rabyvf,

I think you are right, it would be nice to have a more functional API. Currently it's only a thing layer on top of the database.

If you want your request to have any chance of being implemented, make sure to actually send a feature request using the link on the bottom of this very page.

Some of us have stopped waiting for sparx to do something, and have started developing our own, more functional API, that hides all the StyleEx ugliness.

You can find my efforts on github:
For C# https://github.com/GeertBellekens/Enterprise-Architect-Add-in-Framework
For VBScript: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library

Geert

GeistBW

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: EA Object Model and using methods to set properties
« Reply #2 on: December 11, 2021, 04:25:39 am »
Hi, of your 500 diagrams, do you have sequence diagrams?  The Freeze Visible isn't a property you should set. I have found issues with setting this property on sequence diagrams.  It is a known bug/issue. 

So would the API need to know to skip sequence diagrams?
Thanx
Sharon