Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - blue5teel

Pages: 1 [2]
16
Automation Interface, Add-Ins and Tools / Server is busy in EA
« on: January 21, 2009, 07:32:27 pm »
Hello there,
some time ago i posted about a "server is busy"-dialog when i used ms word in my C#-addin (reporting-addin) for EA. I didnt find a solution for it.

Now i have a simliar problem with EA itself.

My addin exports the currently opened project, starts a second instance of EA and imports the lately exported project into it.
Then i apply the RTF-Documentation of EA to several packages in the second instance of EA. If the computation takes to much time a dialog appears with the message "server is busy" and the execution stops until i press "retry" on the dialog. How can i prevent this Dialog from popping up.

Why do i use a second instance of EA and not the original one:
I move elements and diagrams between packages. I had some problems after restoring the original locations of the elements: i didnt get the original structure back, but a persistent projectstructure is critical.

thank you in advance.


17
Thx, this works for me  :)

But is it even possible to COPY elements, diagrams and packages ?
The solution above just moves objects the objects between packages.

18
Hello,

are there any commands in the automation interface to copy or move elments from one package to another?

thx in advance

19
Hello,

i know my question is no EA stuff.

But does anybody know how to delay or block the "server busy"-dialog of word ? It appears when it takes to long to open a doc in addin-background.

thx

20
Hello,

still doing my Reporting-Addin.
This Addin uses the built-in RTF-Reporting of EA, internally.
I use specific RTF-Templates for the Addin. But I dont want that every user has to import these templates for each of their EA-Files manually.

The RTF-templates are located in the "t_document"-table of an EA-File (when you open it with access).
Well, if EA-files are databases, why not using the Repository.Execute("SQL-Statement") of the EA-API, to update the t_documents-table ?

And this is what i have at the moment:

I fill the content of my RTF-documents into byte-arrays and try to deploy these arrays to the bincontent-column of the t_document-table.
Here is the code.

Code: [Select]
DirectoryInfo d = new DirectoryInfo(AddInDirectory + @"\RTF-Templates");

            foreach (FileInfo f in d.GetFiles())
            {
                FileStream fs = new FileStream(f.FullName, FileMode.Open);

                try
                {
                    byte[] MyData = new byte[fs.Length];
                    fs.Read(MyData, 0, System.Convert.ToInt32(fs.Length));
                    string guid = System.Guid.NewGuid().ToString();

                    DateTime dt = new DateTime();
                    dt = DateTime.Now;

                    string sqlstring = "INSERT INTO t_document(DocID,DocName, Notes, Style, ElementID, ElementType, StrContent, BinContent, DocType, Author, Version, isActive, Sequence,
DocDate) VALUES('" + guid + "','" + f.Name + "'," + "'teststring'," + "'Zip=1;'," + "'SSDOCSTYLE'," + "'SSDOCSTYLE'," + " 'teststring'," + MyData+ "," + "'SSDOCSTYLE'," + "'teststring', 'teststring', 2, 2,'" + dt.ToString("dd.MM.yyyy hh:mm:ss") + "'";

                    Repository.Execute(sqlstring);
                }

                finally
                {
                    fs.Close();
                }

}


My problem is, that the SQL-statement doesent work.
The RTF-templates seem to be blobs or OLE-objects in the accessdatabase. I dont understand whats the diference between these both and how to place them in an access-database. Or to be more precisely, i dont know how to convert an byte-array into something, that can be placed in an string-object (the SQL-statement of Repository.Execute()).

I hope you did understnad me. Sorry for my bad english.

Thx


21
Hello,

can i install an addin (C#, .Net, regasm.exe) without manipulating the registry ?
My customer doesnt have the permission to access the registry  ::)
 
Thx

22
Oh thank you ...

Well, i searched and searched and didnt find anything.
Could be caused by the fact, that "ConnectionString" is not a very intuitive name for a project-path or a filename.

23
Altough i never get any answers to my questions in this forum, i'll give it another try.  :'(

This time i need to access the path or directory of a currently open project or its corresponding eap-file with my C#-addin.
I want to generate a new directory inside the directory, which contains the eap-file.
I want to use this directory as a workingdirectory for my addin.

Does someone have a clue ? I didnt find any poperties or methods in the Repository-class which deal with this topic (for example "Repository.getProjectPath()").  :'(

Thx

24
Im writing a Report-Plugin for EA.
I have following code-snippet:

project.RunReport(package.PackageGUID, RTFTemplateName, (string) fileName );

Although the string "RTFTemplateName" might not be valid, the runreport-function runs and generates a report without a warning.
But which template does it use instead ?

thx

25
Good Morning,

I wrote a C#-Add-In for the EA for reporting purposes.
I use the RunReport()-Function of the AI.
How can i use wordsubstitutions ? And how can i convey the specific substitutions i want to use ?

thx

Pages: 1 [2]