Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: chacha on May 12, 2004, 05:32:25 pm
-
I have never used the automation capabilities before. Is it possible to automatically...
1. create a new diagram
2. copy the <<table>> classes in my data model to the new diagram
3. iiterate through the <<table>> classes in my new diagram and...
a) remove each stereotype from each <<table>> class
b) convert the sql types to their requisite c# types
c) remove the classes that correspond to a particular naming convention for lookup tables
4. generate the c# domain classes
Would anyone be willing to show me how to do this? I am short on both time and ingenuity :)
-
Hi there,
Your first port of call is the help file (damn, got to rtfm, what sort of programming is this...)
There is a sample for adding diagrams [Automation and Scripting,Reference,Code Samples]. This example includes adding a table (an element in automation speak).
You may want to create new elements and change the attributes etc in the copies before adding those items to the diagram - Elements don't have to be placed on a diagram to exist, diagrams hold references.
You may even just want to hack the access database in the background. Your tables are in t_object (I hope, haven't checked - something like that). Your table detail are held as Attributes and Methods, more samples for those too.
I haven't automated code generation