Book a Demo

Author Topic: Generating element type: Table in VBscript  (Read 4990 times)

qal

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Generating element type: Table in VBscript
« on: February 02, 2017, 09:50:52 pm »
Hello,

I was trying to generate some tables with Vbscript and I was using command: EA.Package.Elements.AddNew("name",[type]) , but it seems that there is no type "Table" to choose. Is there a way to create new element as table by script, or for example create class element and afterwards alter it to Table ?

Also are there any important differences between Class object with stereotype table and Table object ? Because i've already got some table objects in my project (they were createdy by right clicking on package and choosing "Add Element..." -> Table) and I want them to be consistent with new table objects created by scripts, but if there is no significant differences maybe I don't need them to be exact the same ?

And my EA version is 12.1

I would appreciate any hints.

Thanks,
Pawel


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Generating element type: Table in VBscript
« Reply #1 on: February 03, 2017, 01:54:03 am »
Probably it's enough to create a Class and assign it the stereotype "table".

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Generating element type: Table in VBscript
« Reply #2 on: February 03, 2017, 05:55:27 am »
Probably it's enough to create a Class and assign it the stereotype "table".

q.

It is, just make sure you use StereotypeEx to assign the stereotype.
Also make sure to set the Element.GenType to the database type.

Geert

qal

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Generating element type: Table in VBscript
« Reply #3 on: February 03, 2017, 06:07:19 pm »
Ok, Thanks for the info.