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

Pages: [1]
1
Bugs and Issues / Out of memory error when debuging Addin (VS 2013)
« on: August 11, 2015, 06:39:59 pm »
1. Create a simple AddIn
2. Start to debug -> Out of memory error happened with Sparx EA

My environment:
Sparx 12.0.1208
Win7 64
VS 2013

It doesn't happen with VS 2010

2
Bugs and Issues / Re: Composition link  created by API is not correc
« on: August 13, 2014, 10:17:32 pm »
Quote
Good question. The API does not offer access to the DestIsAggregate column. It also does not seem to make sense to have the info duplicate also in the subType (as Weak/Strong). Only Sparx can give an answer here.

What you could do is to Repository.Execute("UPDATE t_connector...") to tweak it after API creation so DestIsAggregate is set as expected.

q.
Thank you for your approach, it woks for me,
I think it is good to put these information in some where (Connector Class document)

3
Bugs and Issues / Composition link  created by API is not correct
« on: August 13, 2014, 08:34:19 pm »
Recently I tried to create a diagram with connector by API
EA.Connector newConnector = sourceElement.Connectors.AddNew("", "Aggregation");
newConnector.Subtype = "Strong";
newConnector.SupplierID = targetId;
newConnector.Direction = "Destination -> Source";
newConnector.Stereotype = "ArchiMate_Composition";
newConnector.Update();



It worked but in UI the arrow of relation is not same as created manually by UI.
When I check the data there is a difference t_connector has DestIsAggregate=2 (creating by UI).

Should we consider it as a defect or my missing something in my code?

Thank you,

4
Automation Interface, Add-Ins and Tools / Re: Call Addin from JavaScript
« on: August 11, 2015, 02:11:50 pm »
 1 vote for new feature.  :).

5
Automation Interface, Add-Ins and Tools / Call Addin from JavaScript
« on: July 17, 2015, 07:14:19 pm »
Hello, I would need some help.

I have my own Add in with class:

Code: [Select]
namespace MyAddIn
{
    public static class RepositoryExtensions
    {

        public static string someMethod(string input)
        {
            return "Hello" + input;
        }
      }
}
Is there any way to invoke my class from JavaScript like that:
Code: [Select]
Session.Output( "JScript test API");
      var msg = MyAddIn.RepositoryExtensions.someMethod("aaaaaa");
      Session.Output(msg);

BR.

6
Hello everyone,

I tried to create a new Archimate2 grouping element as following

EA.Package package;
EA.Element element = package.Elements.AddNew("", "ArchiMate_Grouping");

But actually, it created ArchiMate_Grouping from Archimate profile (version 1.0)

Any suggestion is welcome

7
Quote
Looks like it doesn't get refreshed until a manual reload,
I tried
Code: [Select]
     Dim proj as EA.Project
      set proj = Repository.GetProjectInterface()
      proj.ReloadProject()

Please write a note to [email protected]

Thank you Nizam, it doesn't work. I mean that it need to re-open Project (close and open .EAP) or open the UML Types one time.

8
I created some predefined tagged value by API:
Code: [Select]
EA.PropertyType predefinedEnumTag = repository.PropertyTypes.AddNew("tag name", "Sample predefined tagged ");
predefinedEnumTag.Detail = "Type = Enum; Values = Val1,Val2; Default = Val1; BaseStereotype = ArchiMate_WorkPackage;";
predefinedEnumTag.Update();

Unlucky the new predefined tagged doesn't reload when we create a new tagged value for an ArchiMate_WorkPackage element.
It onloy works when reloading project or Open menu: Setting > UML Types.

I also try some ways to refresh but not work:
Code: [Select]
repository.PropertyTypes.Refresh();
repository.RefreshModelView(0);
repository.GetCurrentDiagram().Update();

Thank you.

9
Quote
To define a predefined tagged value you can use the "PropertyTypes" collection from Repository

Sample below
Code: [Select]
     ' Add a project Tag
      dim tags as EA.Collection
      set tags = Repository.PropertyTypes
      
      dim prop as EA.PropertyType
      set prop = tags.AddNew("BoolTag","Boolean Tag")
      prop.Description="Boolean Tag"
      prop.Detail= "Type=Boolean;"
      prop.Tag="Bool"

Thank you. You make our vibrant community.
I applied your snipplet
Code: [Select]
EA.PropertyType predefinedProjectEnumTag = repository.PropertyTypes.AddNew("tag name", "Sample predefined tagged value");
predefinedProjectEnumTag.Detail = "Type = Enum; Values = project; Default = project; BaseStereotype = ArchiMate_WorkPackage;";
predefinedProjectEnumTag.Update();


10
I'm a new in Sparx and developing a Sparx Addin.
I would like to ask is there any API to create a predefined tagged value?
Thank you.

Pages: [1]