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

Pages: 1 ... 161 162 [163] 164 165 ... 169
2431
Works for me...
Code: [Select]
shape main
{
      v_align="center";
      h_align="center";
      rectangle(0,0,100,100);
      printwrapped("#name#");
}
And it looks like this:


2432
Quote
Actually the online manual explicitely states that there is no way to change the font size, type or colour of a text, and that setpencolor only affects line drawing commands but not any text commands.
Unfortunately, correct.

Quote
I have no idea how to show all attributes either. Loops are not supported, so probably it's not possible at all.
Unfortunately, correct.

Quote
Probably there's nothing in the profile defining mechanism to support preconfigured attributes, operations, or whatever features.
Tagged values only.

Quote
It could be done by complementing the MDG with an AddIn using broadcast event (adding preconfigured stuff in the EA_PostNewElement event).
Yes, I have had success doing this.

Quote
This would mean, of course, to have half the logic for an MDG technology in the profiles, and the other half in the AddIn
You would have the add-in load the technology, so the technology effectively becomes the add-in's data.

2433
Maybe you can do something in an add-in by intercepting the EA_OnContextItemDoubleClicked broadcast?

2434
I've worked around this problem in the past with naming convention. So for your example, the tags would be named "XX.tagA", "XX.tagB", "YY.tagA" and "YY.tagB"...

2435
There's certainly something going wrong here. Try using "stateflow" for the base class instead of "transition", I think that will work. ("transition" should work but doesn't - please send in a bug report and someone will investigate why).

2436
Automation Interface, Add-Ins and Tools / Re: Profile Tags problem
« on: April 01, 2008, 08:35:42 am »
In the Tagged Values window, click the Options button and switch off Show Fully Qualified Tags.

2437
Sorry guys, my fault   :-[

The third parameter should contain: "Profile=ProfileName;Stereotype=StereotypeName;"

EDIT: Oh, and it's new for EA 7.1...

2438
Quote
So the Question is: - Is there a way to synchronise these tagged values via the Automation Interface?
Undocumented feature...

Code: [Select]
Repository.CustomCommand("Repository", "SynchProfile", s)
where s is a string containing the name of the stereotype.

2439
Automation Interface, Add-Ins and Tools / Re: Element.Diagrams
« on: March 06, 2008, 09:18:30 am »
Quote
Quote
Before iterating through all the diagrams, first check the value of Element.Subtype. For most elements, including use cases, this will be 8 if there is a linked diagram, 0 otherwise.
Good idea Neil.

But we need to have the SDK amended to better reflect this.

But this is only subtly alluded to in the documentation. We are told that for Activity elements Subtype 8 means StructuredActivity. You can infer the linked diagram from that. The Subtype documentation does not mention this value (8) elsewhere, nor does the documentation indicate that it is providing examples. The reader (at least this reader) can get the impression that the subtypes presented comprise the entire list available.

David
OK, I'll have a word with Roy...

2440
Automation Interface, Add-Ins and Tools / Re: Element.Diagrams
« on: March 05, 2008, 09:18:38 am »
Quote
Have you tried Diagram.ParentID? It's supposed to be

 
Quote
Read/Write. An optional ID of an element that 'owns' this diagram; eg. a Sequence diagram owned by a Use Case.

Of course this would be less comfortable. You'd have to iterate through the diagrams in your diagrams folder and return the one with the desired ParentID.
Before iterating through all the diagrams, first check the value of Element.Subtype. For most elements, including use cases, this will be 8 if there is a linked diagram, 0 otherwise.

2441
I'm running out of ideas and I don't know java. If you send in a support request and attach the failing code then someone will have a look at it. The support request form is here.

2442
Which "connectors" collection are you trying to add to? You should call AddNew() on the client element's connectors collection, then set the supplier id as before.

2443
Quote
I'm trying to create a connector in java of type "UseCase". My program crashes if I try to do this, but works if i create one of type "Association".

According to the User Guide [highlight]"UseCase"[/highlight] is a valid type and if i dump my package to console the connectors I created in Enterprise Architect are of type "UseCase".

Heres my code:

                             connector = (org.sparx.Connector) connectors.AddNew("", [highlight]"Usecase"[/highlight]);
                              connector.SetClientID(ucElement.GetElementID());
                              connector.SetSupplierID(element.GetElementID());
                              connector.SetDiagramID(diagram.GetDiagramID());
                              connector.Update();

It will crash when trying to run the connector.Update() so I don't get any error info from the GetLastError

Any ideas?

Cheers.
I think it's case-sensitive... (no pun intended)

2444
Automation Interface, Add-Ins and Tools / Re: Toolbox Profile Sample?
« on: November 27, 2007, 06:13:32 pm »
Frank,

It's hard to tell from your description what the problem might be. Could you e-mail a copy of your technology file to Sparx support please, and we will investigate further. Thanks.

Neil

2445
Automation Interface, Add-Ins and Tools / Re: Toolbox Profile Sample?
« on: November 26, 2007, 01:58:34 pm »
Quote
The mts file created by the wizard has a <Profiles> tag where the three new tags are to be inserted, so do I overwrite it or add the new tags before or after it?

The </MDG.Selections> line has to be the last line in the file. Insert the new stuff immediately before it.

Pages: 1 ... 161 162 [163] 164 165 ... 169