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.


Topics - Michel Gibelli

Pages: [1]
1
Automation Interface, Add-Ins and Tools / DocumentGenerator API
« on: April 23, 2016, 01:39:57 am »
Hello,

I am trying to use the DocumentGenerator class within VBscripts
http://www.sparxsystems.com/enterprise_architect_user_guide/12/automation_and_scripting/document_generator_interface_class.html

I have a template named myTemplate in a template group named myTemplateGroup
I have a call like :
documentGenerator.DocumentElement(elementID, 0, "myTemplate")

It works perfectly when I am in the same model file.

But when I deploy the script and the template in a MDG technology, I have the message "Invalid template supplied".
My template goes in a folder named myMDGTechnology and under a group named myTemplateGroup.

My question is : Should the argument templatename be prefixed with the MDG technology name and/or with the group name ?
Something like :
documentGenerator.DocumentElement(elementID, 0, "myMDGTechnology/myTemplateGroup/myTemplateName")

I have tried several combinations (slashes, colons) but I did not succeed.
Has someone more information about this syntax ?

Note : as a workaround, I override the template and its works again. But it is not very elegant for my end users  :(

Thanks in advance !
Michel


2
Bugs and Issues / RTF editor : problem to keep paragraphs together
« on: April 14, 2016, 07:53:11 pm »
Hello,

I have a problem that appears both in the linked document editor, in the template editor and in the generated documents.

The reference in the manual is :http://www.sparxsystems.com/enterprise_architect_user_guide/12/modeling_basics/paragraphformating.html

When I try to define a paragraph that has to be kept with the following, I check in the right-click menu "Keep with next", but then the option "Keep together" is also systematicaly checked.
And it does not give the expected result :(

Do I miss something or is it a bug ?

Note : I use EA 12.1.1229 Corporate

Have a nice day
Michel

3
Hi!

I am trying to use the new document script feature for reporting described here
http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/report_generation/custom_query_fragments.html

I have got some results and some problems

The following example is running :
The call in the document option/custom query tab :
test(#OBJECTID#, #PACKAGEID#, #Package#, 2)
and the function in VBscript :
Public Function test(objectID, packageID, package, depth)
   Session.Output "test : " & objectID & " " & packageID & " " & package & " " & depth
   dim docGenerator as EA.DocumentGenerator
   set docGenerator = Repository.CreateDocumentGenerator()
   docGenerator.NewDocument("")
' Make a SQL Select based on objectID
' using http://community.sparxsystems.com/community-resources/522-94execute-a-sql-query-and-return-the-result-in-a-dictionary-of-rows
' Iterate over the result
' Call docGenerator.DocumentElement(...) for each result
   test = docGenerator.GetDocumentAsRTF()
End Function

But I cannot get the others values as stated in the help page (#Branch#, #UserName#, #Author#)

Also I cannot put more than one line in the call. For example, with :
dim i: i = 3
test(#OBJECTID#, #PACKAGEID#, #Package#, i)
I get a syntax error.

Do you have more informations on what is allowed in the custom query tab and which syntax should be used (Javascript, Jscript, VBscript) ?

Thank you

Michel


4
Hello,

We often use aliases for various elements (requirements, or use cases for example)
There is a feature in EA to show both names and aliases in diagrams.

Its is interesting to sort these elements by aliases in the project browser
Guillaume has built an add-in to do this (http://community.sparxsystems.com/community-resources/949-eautils-addin-sparx-enterprise-architect)
In the report templates, we can then show both alias and name. It's OK.

But, it would also be interesting to see the alias in the project browser (in the same manner as for the stereotype). It would help to quickly locate an element by its alias.

Would it be possible to add this feature in EA ?
(I didn't find this feature, but perhaps I missed something ?)

Thanks
Michel

5
General Board / Questions about the deployment of CloudService
« on: April 03, 2015, 08:16:42 pm »
Hello,

I just have deployed the CloudService on a server with PostgreSQL as RDBMS.
I have followed the instructions given in this page :
http://www.sparxsystems.com/enterprise_architect_user_guide/12/projects_and_teams/setting_up_the_server.html

and with the help fo this PDF :
http://www.sparxsystems.de/fileadmin/user_upload/pdfs/Cloudservice/Enterprise_Architect_Cloud_Services.pdf

It works fine. Of course, some SQL queries have to be adjusted due to syntax differences between the SQL dialects.

I have some questions regarding the deployment of a number of EA projects (dozens) on this platform :
  • It seems that for each EA projet, we need to create a new PostgreSQL base, a new ODBC32 datasource, right ?
  • The script to create the base creates the tables, but does not initializes a new empty project. So we need to create an empty project (.eap format for example) and then transfert the project, right ?
  • Can I dump this empty project and use it to create several other projects whitout any risks (of duplicate GUID for exemple) ?
  • Is it possible to deploy these tables in a named schema instead of the public schema ?
  • In the dialog Box "Add Database Manager" of the SSCloudServiceClient.exe, what is the syntax of the connection string" ? It seems to me that the name of the datasource becomes the name of the EA projet, no ? At this step, would it be possible to have a "generic DSN" and give the parameters (as the database name or the servername or the user) in the connection string ?
In fact, my main objective would be to configure the whole thing remotely and easily : create a new repository, create a new ODBC and add it to the cloud server.

I don't know if it is achievable, and I would appreciate any returns or answers.

Thanks in advance
Michel


6
Hello,

I am trying to buid a Document generation template and I would like to exclude child Packages from the generation (for example packages which do not have a certain stereotype, eg <<myStereo>>).

In the document options, the tab "Element filters" applies only to Element (and not packages).

In the "Document options" tab, there is a textfield 'Except where Query excludes a Package', so I tried to write the custom SQL :
SELECT * FROM t_object where Object_Type = 'Package' and Stereotype <> 'myStereo'
But it did not work. I do not clearly understand the behavior of this field.

Do you have any advice to obtain the result ?
Is it possible or should I change my strategy ?

Thanks in advance
Michel

Pages: [1]