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 - Cisore

Pages: [1] 2 3 ... 5
1
General Board / HTML Report compatibility
« on: August 01, 2012, 06:37:01 pm »
they are somewhere a list of the browser compatible with the html report who has generate with EA ?

(For example I have seen, the document are not compatible with Firefox. It's not possible to visualize this with this browser !)

2
General Board / Re: Add-In Invalide parameters(topic not in good d
« on: August 01, 2012, 05:00:13 pm »
I succeeded !

I have add the /tlb option to the commande RegAsm
And I have signing the project !

(Proprieties | Signing  | sign the assembly )
 :D

3
General Board / Re: Add-In Invalide parameters(topic not in good d
« on: July 25, 2012, 11:09:12 pm »
Quote
And if it works on your machine then it must be a problem with dll's not registering properly on the other machine.

this is what I think !
It's why I wanted to know what the error invalid parameter(s) mind !
(DLL not fund ? dependency not fund ? Both ? other ?)
(Globally, is it a error code precisely or much error can return it ? And how can I have more information on this error ?)

Sorry to persist but a Add-In how can't be deploy on other machine are useless ! :-/

4
General Board / Re: Add-In Invalide parameters(topic not in good d
« on: July 25, 2012, 10:23:37 pm »
the code for the main class !!? :
Code: [Select]
using System;

namespace Moodys
{
      public class Main
      {
        private IAction addAct = null;
        private IAction genCode = null;
        private IAction gesVC = null;
        private IAction addcond = null;
        private IAction genDoc = null;
        private IAction genModel = null;

            //Called Before EA starts to check Add-In Exists
            public String EA_Connect(EA.Repository Repository)
            {
                  return "a string";
            }
            public object EA_GetMenuItems(EA.Repository Repository, string Location, string MenuName)
            {
                  EA.Package aPackage = Repository.GetTreeSelectedPackage();
            Boolean debug = isDebug(Repository, "debug");
                  switch( MenuName )
                  {
                        case "":
                              return "-&Moodys";
                case "-&Moodys":
                    if (debug)
                    {
                        string[] ar = { "&Générer Nouvelle dll de calcul", "-&Ajouter Activity", "-&Ajouter Condition", "&Générer Code", "-&Gestion VC", "&Générer doc (HTML)", "&Clear Model"  };
                        return ar;
                    }
                    else
                    {
                        string[] ar = { "&Générer Nouvelle dll de calcul", "&Ajouter Activity", "&Ajouter Condition", "&Générer Code", "&Générer doc (HTML)"};
                        return ar;
                    }
                case "-&Gestion VC":
                    string[] vc = { "&Remove VC"};
                    return vc;
                case "-&Ajouter Activity" :
                    string[] aa = {"&One","&All"};
                    return aa;
                case "-&Ajouter Condition":
                    string[] ajC = { "&One", "&All" };
                    return ajC;
                  }
                  return "";
            }
            
            bool IsProjectOpen(EA.Repository Repository)
            {
                  try
                  {
                        EA.Collection c = Repository.Models;
                        return true;
                  }
                  catch
                  {
                        return false;
                  }
            }
            public void EA_GetMenuState(EA.Repository Repository, string Location, string MenuName, string ItemName, ref bool IsEnabled, ref bool IsChecked)
            {
                  if( IsProjectOpen(Repository) )
                  {
                if (ItemName == "&Clear Model")
                {
                    IsChecked = false;
                    IsEnabled = true;
                }
                else if (ItemName == "&Générer Nouvelle dll de calcul")
                {
                    if (genModel == null)
                        genModel = new GenModel(this);
                    IsEnabled = genModel.goodDir(Repository);
                }
                else if (MenuName == "-&Ajouter Activity" || ItemName == "&Ajouter Activity")
                {
                    if (addAct == null)
                        addAct = new AddActivity(this);
                    IsEnabled = addAct.goodDir(Repository) && Location == "TreeView";
                }
                else if (MenuName == "-&Ajouter Condition" || ItemName == "&Ajouter Condition")
                {
                    if (addcond == null)
                        addcond = new AddCond();
                    IsEnabled = addcond.goodDir(Repository) && Location == "TreeView";
                }
                else if (ItemName == "&Générer Code")
                {
                    if (genCode == null)
                        genCode = new genereCode(this);
                    IsEnabled = genCode.goodDir(Repository) && Location == "TreeView";
                }
                else if (MenuName == "-&Gestion VC")
                {
                    if (gesVC == null)
                        gesVC = new gestionVC();
                    IsEnabled = gesVC.goodDir(Repository) && Location == "TreeView";
                }
                else if (ItemName == "&Générer doc (HTML)")
                {
                   // IsChecked = false;
                    if (genDoc == null)
                        genDoc = new GenerationDoc(this);
                    IsEnabled = genDoc.goodDir(Repository) && Location == "TreeView";
                }
                  }
                  else
                        IsEnabled = false;
            }

            public void EA_MenuClick(EA.Repository Repository, string Location, string MenuName, string ItemName)
            {

            if (ItemName == "&Générer Nouvelle dll de calcul")
            {
                genModel.start();
            }
            else if ((MenuName == "-&Ajouter Activity" && ItemName == "&One") || ItemName == "&Ajouter Activity")
            {
                addAct.start();
            }
            else if (MenuName == "-&Ajouter Activity" && ItemName == "&All")
            {
                ((AddActivity)addAct).startAll();
            }
            else if ((MenuName == "-&Ajouter Condition" && ItemName == "&One") || ItemName == "&Ajouter Condition")
            {
                addcond.start();
            }
            else if (MenuName == "-&Ajouter Condition" && ItemName == "&All")
            {
                ((AddCond)addcond).startAll();
            }
            ...
 

5
General Board / Re: Add-In Invalide parameters(topic not in good d
« on: July 25, 2012, 05:07:26 pm »
Someone know where this error come form ?
(Invalid parameters !)

6
General Board / Re: Add-In Invalide parameters(topic not in good d
« on: July 20, 2012, 11:40:38 pm »
I have try with .MSI file.

(I have make all process in your topic)
But they don't work !

the same error : Invalid parameter(s)


7
General Board / Re: Add-In Invalide parameters(topic not in good d
« on: July 20, 2012, 05:14:58 pm »
Yes I have read that ! But I don't want to pass by a MSI file ! Because in two weeks I go out of this enterprise and in my mind, the other employees could be change a .BAT file more easy than a .MSI file.

My work with the .BAT are incorrect ?

( the error code : Invalid parameter(s), are a error of what ? to call the add-in ? to find the main class ? or to use the method in the main class ?)

8
General Board / Add-In Invalide parameters(topic not in good dir)
« on: July 20, 2012, 12:31:25 am »
Hi, (It's again me  :-[)

I have make one Add-In with visual studio.
On my computer it's work.

But when I try to distribute them on other computer, it doesn't work.

I have process like Greet said in this topic :
http://geertbellekens.wordpress.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/

but when I run EA, in the Manage Add-in they are : Invalid Parameter(s)  

(I have make a .BAT's file :
Code: [Select]
@echo off

set "VAR=C:\Program Files (x86)\MoodysAddInEA\"

if not exist "%VAR%" md "%VAR%"

reg add "HKEY_CURRENT_USER\Software\Sparx Systems\EAAddins\Moodys" /d "Moodys.Main" /f

copy Moodys.dll "%VAR%"

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "%VAR%Moodys.dll" /codebase
)

9
General Board / Re: Attach ActionPin with Operation in Script
« on: July 20, 2012, 05:44:39 pm »
Heu ... Yes I have a code how works :

diag = Activity Element
vue = EA.Diagram (attach to diag)

Code: [Select]
EA.Element elm = (EA.Element)diag.Elements.AddNew(nomAct, "Action");

elm.Update();
diag.Elements.Refresh();

EA.Element tar = (EA.Element)elm.Elements.AddNew("target", "ActionPin");
tar.Update();

Repository.Execute("UPDATE t_object SET Classifier_guid='"+methodExec.MethodGUID+"' WHERE Name='"+nomAct+"';");

Guid g1 = Guid.NewGuid();
String sqlRequest1 = "INSERT INTO t_xref VALUES ";
sqlRequest1 +=                                  "(\""+g1.ToString()+"\",";
sqlRequest1 +=                                  "\"CustomProperties\",";
sqlRequest1 +=                                  "\"element property\",";
sqlRequest1 +=                                  "\"Public\",";
sqlRequest1 +=                                  "NULL,";
sqlRequest1 +=                                  "NULL,";
sqlRequest1 +=                                  "NULL,";
sqlRequest1 +=                                  "NULL,";
sqlRequest1 +=                                  "0,";
sqlRequest1 +=                                  "\"@PROP=@NAME=kind@ENDNAME;@TYPE=ActionKind@ENDTYPE;@VALU=CallOperation@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;\",";
sqlRequest1 +=                                  "\"" +elm.ElementGUID+ "\",";
sqlRequest1 +=                                  "\"<none>\",";
sqlRequest1 +=                                  "NULL)";

Repository.Execute(sqlRequest1);

Guid g2 = Guid.NewGuid();
String sqlRequest2 = "INSERT into t_xref VALUES";
sqlRequest2+=                                   "(\""+g2.ToString()+"\",";
sqlRequest2+=                                   "\"MOFProps\",";
sqlRequest2+=                                   "\"element property\",";
sqlRequest2+=                                   "\"Public\",";
sqlRequest2+=                                   "NULL,";
sqlRequest2+=                                   "NULL,";
sqlRequest2+=                                   "NULL,";
sqlRequest2+=                                   "\"target\",";
sqlRequest2+=                                   "0,";
sqlRequest2+=                                   "\""+tar.ElementGUID+"\",";
sqlRequest2+=                                   "\""+elm.ElementGUID+"\",";
sqlRequest2+=                                   "\"<none>\",";
sqlRequest2+=                                   "NULL)";
Repository.Execute(sqlRequest2);

EA.DiagramObject ob = (EA.DiagramObject)vue.DiagramObjects.AddNew(nomAct, "");
ob.ElementID = elm.ElementID;
ob.Update();                                    

I'm not sure to have understand your question.  :-/

10
General Board / Re: Attach ActionPin with Operation in Script
« on: July 19, 2012, 12:16:33 am »
Sorry ! and thanks

[size=8]We never tire of hearing you that's why they make you repeat[/size]

11
General Board / Re: Attach ActionPin with Operation in Script
« on: July 18, 2012, 11:40:44 pm »
Ok I find the base (and the good table) but ...

Who can I run a SQL request in a script ?

(I have read yours book : ScriptingEA and InsideEA but I don't find the information !)

12
General Board / Re: Attach ActionPin with Operation in Script
« on: July 18, 2012, 10:25:42 pm »
What is the name of the base ? (the location, the password and the login name ?)

13
General Board / Re: Attach ActionPin with Operation in Script
« on: July 18, 2012, 10:14:36 pm »
Quote
The trick in these kind of cases is:
- Start with an empty model
- Create what you need manually
[highlight]- Inspect the results in the database[/highlight]
- Try to replicate the same results using the API
- If that doesn't work (because some attribute isn't exposed) then you resort to Repository.Execute(SQLString)
How can I do that ?

Quote
Classifier_GUID is a column in t_object. It does not seem as there is any corresponding property in Element. So (I guess) you have to poke that in via a SQL.
(where can I find example of SQL request to change this table ? It's the first time, I hear spoken of this table !  :-[ :-[)

14
General Board / Re: Attach ActionPin with Operation in Script
« on: July 18, 2012, 06:18:39 pm »
I'm sorry but I don't have attribute Classifier_GUID !

(I have ClassifierID, it's a int whereas ClassifierID of the operation are String, and it's read only !)

May be I don't have build the Action correctly :
Code: [Select]
EA.Element elm = (EA.Element)diag.Elements.AddNew(nomAct, "Action");
elm.Update();
diag.Elements.Refresh();

15
General Board / Attach ActionPin with Operation in Script
« on: July 18, 2012, 12:23:57 am »
Hi,

I want to do a script that generates the same result that if I slip an operation in a activity's diagram !

(On Action with a ActionPin's element who it linking with the operation !)

Actually I arrived to generate the Action and the ActionPin element but I don't arrived to link the ActionPin with the Operation !

Someone can help me ?

Pages: [1] 2 3 ... 5