Author Topic: automate stereotype and attribute type conversion  (Read 4198 times)

chacha

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
automate stereotype and attribute type conversion
« 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 :)
« Last Edit: May 12, 2004, 06:09:59 pm by chacha »

Stephen

  • EA User
  • **
  • Posts: 54
  • Karma: +0/-0
    • View Profile
Re: automate stereotype and attribute type convers
« Reply #1 on: May 13, 2004, 02:26:33 am »
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