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

Pages: [1]
1
Automation Interface, Add-Ins and Tools / Get Dirty/Saved diagram status
« on: December 24, 2013, 08:25:36 pm »
Hi,

I am writing Sparx-addin and I need to notify to user to save diagrams which have been changed but they have not been saved.
My question: does Sparx have API to get dirty/saved status of a diagram?

Thanks.

2
I have another question: how to add horizontal line in menu.

3
Automation Interface, Add-Ins and Tools / Menu Icon and Menu Item Type
« on: October 01, 2013, 07:45:03 pm »
Hi,

I am develop Sparx Add-in and I have some questions:
  • Can I set icon to my menu items?
  • Can I select a type for my menu item? For instance: I want to some my menu items are "Radio Button" or "Checkbox" type.

Thanks

4
Hi,

I have some info to show to users for example: version. My question: Can I add more info into Description section of "Manage Add-Ins" dialog? How to do it?

5
Quote
are you sure you need this?
Code: [Select]
connector.Direction = Source -> DestinationThat doesn't seem valid. (does it even compile?)

Geert

HI Geert,
I try to remove this line from code and error still occurs.
I try to create connector between other elements (for ex: ArchiMate_Component) and ArchiMate_Plateau element and connector is successfully created.

6
Sparx IDE is crashed when creating connector between ArchiMate_Juntion and ArchiMate_Plateau elements
Code: [Select]
EA.Element plateauElement = repository.GetElementByID(plateauId);
EA.Element junctionElement = repository.GetElementByID(junctionId);
EA.Connector connector = junctionElement.Connectors.AddNew("", "Aggregation");
connector.Stereotype = "ArchiMate_Aggregation";
connector.Direction = Source -> Destination
connector.SupplierID = plateauElement.ElementID;
connector.Update();

- Sparx IDE is crashed when connector.Update() method is called. The problem will not occur if I create connector by manually in diagram.
Exception:
Code: [Select]
System.Runtime.InteropServices.COMException was caught
  Message=The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
  Source=EAManagerAddIn
  ErrorCode=-2147417851
  StackTrace:
       at EA.IDualConnector.Update()
       at EAManagerAddIn.Export.ExportToEaManager.transformInternal(TransformationContext context, MappedEntity plateau) in D:\SOA\ea-sparx-add-in\EAManagerAddIn\EAManagerAddIn\Export\ExportToEaManager.cs:line 155
  InnerException:

7
Quote
Presumably you are using the Find in Project command? There is a View Notes option on the toolbar (5th button from left) which allows you to show in full, show preview or hide notes.
Thanks KP, but I use these SQL in my add-in code.
Because of private reason, I don't want to alias Note column to another name

8
Quote
The  Following works fine for the .eap file:
SELECT ea_guid AS CLASSGUID, Object_Type AS CLASSTYPE, Name, Note , object_type as Type, IsLeaf FROM t_object
Where object_type = "Requirement"
order by name
[DOB - see update KP's point above]
I updated first query statement in my post.
Result from your query doesn't contain Note column (as my second query).

9
I use the following query statements to query Note info in t_object table and it doesn't work:
  • select a.Note as Note from t_object a => error

select Note from t_object => result doesn't contain Note column
select * from t_object => result doesn't contain Note colum
[/list]
It is OK if I alias Note column name as "Notes".
Is it a bug?

10
Thanks Geert, it works

11
Position is correct if I don't call DiagramObject.Update()

12
I used EA_OnPostNewDiagramObject event to change BCol of DiagramObject when dragging element and dropping into diagram.
My code:
[highlight]public bool EA_OnPostNewDiagramObject(EA.Repository repository, EA.EventProperties eventProperties)
        {
            EA.EventProperty property = eventProperties.Get(0);
            EA.Diagram diagram = repository.GetCurrentDiagram();
            foreach (EA.DiagramObject dObject in diagram.DiagramObjects)
            {
                dObject.Style = "bCol=255";
                //int top = dObject.top;
                //int bottom = dObject.bottom;
                //int left = dObject.left;
                //int right = dObject.right;
                //int sequence = dObject.Sequence;
                 dObject.Update();
            }
            return true;
        }[/highlight]

My problem: BCol is changed but DiagramObject is located in incorrectly position.
Is there any way to get dropped position in this event?
Is there the best way to change BCol in my usecase?

Pages: [1]