Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: mv01d on January 08, 2014, 01:43:30 am
-
How do I modify the default appearance of a specific object via the object model. As far as i can see. the object properties are stored in the t_object tabel (e.g t_object.Backcolor).
Thanks for your help!
-
For unknown reasons the API has a number of limitations. You can modify t_object columns via Repository.Execute ("UPDATE t_object..."):
(https://dl.dropboxusercontent.com/u/66691423/pic%202014-01-07%20um%2022.39.16.PNG)
(https://dl.dropboxusercontent.com/u/66691423/pic%202014-01-07%20um%2022.39.24.PNG)
From my Inside book.
q.
-
Tanks for your advice! I'm using Enterprise Architect 10. I just checked the EA.Repository object for a possibility but there is only a SQLQuery method which fails on update statements like UPDATE t_object SET Backcolor=-1 WHERE Object_ID=3 with:
DAO.QueryDef [3141]
The SELECT statement incluides a reserved word or anm argument name that is misspelled or missing, or the punctuation is incorrect.
-
As said: use Repository.Execute, not SQLquery.
q.
-
As said: use Repository.Execute, not SQLquery.
q.
Execute is a hidden, non documented operation, but it does exist and works just fine.
Geert
-
Ok, you are right. Execute is one of the [TypeLibFunc(64)] marked methods from the IDualRepository.
Thanks!
-
REMARK:
Indeed there is a method for altering the default appearance of EA objects:
SetAppearance (long Scope, long Item, long Value)
http://www.sparxsystems.com/enterprise_architect_user_guide/10/automation_and_scripting/element2.html