Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: GrahamL on June 17, 2021, 07:18:17 pm

Title: sql search to get the t_files entry for a class
Post by: GrahamL on June 17, 2021, 07:18:17 pm
Hi
I have limited sql experience but have a need to get the access to the t_files table for a give class
I would appreciate some help in getting started

thanks
Title: Re: sql search to get the t_files entry for a class
Post by: qwerty on June 17, 2021, 09:11:29 pm
What would you think to find in t_files? I never happend to find anything in there.

q.
Title: Re: sql search to get the t_files entry for a class
Post by: GrahamL on June 17, 2021, 09:18:23 pm
Hi
I want to get the code generation path
I have this
Code: [Select]
       private string getGenerationPath(EA.Repository Repository, string className)
        {
            XmlDocument results = new XmlDocument();
            string sql = "SELECT File FROM t_files WHERE  name = " + className;
            string xml = Repository.SQLQuery("SELECT File FROM dbo.t_files WHERE  name = Class1");
            results.LoadXml(xml);

But when it is executed in my addin I get incorret syntax near the keyword 'File' File
Title: Re: sql search to get the t_files entry for a class
Post by: Geert Bellekens on June 17, 2021, 09:39:48 pm
Code generation path is found in EA.Element.GenFile

I don't think you'll find anything useful in t_files.

Geert
Title: Re: sql search to get the t_files entry for a class
Post by: GrahamL on June 17, 2021, 09:41:21 pm
Thanks Geert
Title: Re: sql search to get the t_files entry for a class
Post by: qwerty on June 17, 2021, 09:42:42 pm
Well, you asked the very same question and got an answer from me and Eve. Maybe you should get some sleep first?

q.
Title: Re: sql search to get the t_files entry for a class
Post by: GrahamL on June 17, 2021, 09:46:57 pm
Probably   :(