Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: charge on February 23, 2005, 04:13:41 am

Title: problem DDL generation on tables insered via add-i
Post by: charge on February 23, 2005, 04:13:41 am
I'm having a problem on generation DDL when i import the datatables via a Add-in


my code to insert a table in EA
---

eaElement = col.Addnew("TableX","Class")
eaElement.stereotype = "table"
eaElement.Gentype = "SQL Server 2000"
eaElement.Update

....
add fieds....
....

eaElement.Update


When I check the EA database on table t_object, field 'PDATA2' has also to be set to 'SQL Server 2000' to have correcr DDL generation, but it's not done via the Add-in inteface.
When I open the table element in theEA interface and close it agian, this value is set in the EA database and the DDL generation works fine... :-/

How can I set this 'PDATA2' field via the add-in interface ?

Thanks!
Title: Re: problem DDL generation on tables insered via a
Post by: KP on February 23, 2005, 09:57:41 pm
PDATA2 (and the other PDATAx) fields are represented in the Automation Interface by the Miscdata field. This is what the help says:

Quote
Read only. This low-level property provides information about the the contents of the PDATAx fields. These database fields are not documented and developers will need to gain understanding of these fields through their own endeavors to use this property.  
 
 MiscData is zero based so MiscData(0) corresponds to PDATA1, MiscData(1) to PDATA2 etc.  

Unfortunately, it looks like it's readonly  :(