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

Pages: [1]
1
General Board / Re: create additional files during code gen proces
« on: November 06, 2007, 03:23:53 am »
Ooooh yes! Automation script can be written in vb, c++, vb.net, c#, java...... Examples can be found in EA help manual - Extending EA - Automation and Scripting.

2
Bugs and Issues / Bug? EA 7.1 GetFormatFromField
« on: March 01, 2008, 02:15:37 am »
I've raised a question in the adin forum regarding the GetFormatFromFrield method available in V7.1 Beta 2, and thought it might be a bug. So I re-raise this issure in this forum.

The original thread's link is : http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1204289930.

Sorry if this is a double post. Thank you.

Tim

3
Thanks a lot Simon.

4
Thanks a lot Midnight, I will do that.

5
Hi guys we have a problem converting EA's element notes into plain text format (don't have tags).

For example, if element.Notes returns:

<ol>
<li>Line1</li>
<li>Line2</li>
</ol>



Repository.GetFormatFromField("TXT", element.Notes) returns:

<br/>
<ol>
<li>Line1</li>
<li>Line2</li>
</ol>

It doesn't look very different from the original element.Notes. :(



and Repository.GetFormatFromField("RTF", element.Notes) returns:

<br/>
<ol>
<li>Line1</li>
<li>Line2</li>
</ol>

The outcome is identical to "TXT", confused....



what's interesting is that Repository.GetFormatFromField("HTML", element.Notes) returns something like:

Quote
{\rtf1\ansi\deflang2057\ftnbj\uc1\deff1
{\fonttbl{\f0 \froman \fcharset0 Times New Roman;}{\f1 \fswiss \fcharset0 Arial;}{\f2 \fnil \fcharset0 Century Gothic;}{\f3 \fmodern \fcharset0 Courier New;}{\f4 \froman \fcharset2 Symbol;}{\f5 \fnil \fcharset2 Wingdings;}}
...........

I saved this output into a txt file and rename the file extension to be ".rtf" and it proved that this is RTF output, instead of HTML.



Do I miss anything here? Or this isn't the proper way to call GetFormatFromField method? Or is it a bug for 7.1 beta 2? Please advice.

Thanks in advance.

Tim

EA's repository reference http://www.sparxsystems.com/EAUserGuide71/index.html?repository3.htm

6
Olga, well, may I suggest a workaround though? It's not elegant, but it works....somehow....

Use ShowInProjectView(myPackage) to force the package to be highlighted in Project Browser, then use ShowInProjectView(myElement) again to force the element you've just modified the name with to be highlighted. This will cause EA to refresh myElement's name and properties.

Of course you don't have to highlight the package in the first step, just move the highlight away from the element modified. Hope this would help.

Tim

7
Hi Olga, from what I understand, if you are looking at a diagram (or this diagram is open), by calling Repository.RefreshModelView will cause the "save latest changes" dialog to show up. If you don't have the diagram shown, this works fine.

So I tend to use ReloadDiagram(DiagramID), that does not cause the "save latest changes" dialog to show, but refreshes the elements on the diagram and on Project Browser (including their names). But I don't know if it will refresh the elements within the same package but NOT on the diagram though.

However I think I might want to share my experience with you though. Hope it helps.

Tim

8
Automation Interface, Add-Ins and Tools / Re: How to get Package Type?
« on: November 19, 2007, 01:42:40 am »
When creating a "brand-new" package, I normally pass an empty string. But I think you can pass in "Simple" and "Dynamic" something like that.

vb.net
Code: [Select]

Dim myPackage As EA.Package
myPackage = Repository.Models.GetAt(0).Packages.AddNew("TimeArchitect", "Simple")


But Jim, I think by calling ObjectType, would always return "otPackage" as its type (Element Type)?

9
Automation Interface, Add-Ins and Tools / Re: Requirement's StereotypeEx
« on: November 14, 2007, 01:20:28 am »
I see what you mean Paolo, thanks for your reply!

Tim

10
Automation Interface, Add-Ins and Tools / Re: Requirement's StereotypeEx
« on: November 13, 2007, 09:14:00 am »
Yes David you've got the point, maybe I'll just treat Requirement element differently with extra checking routine.

Thank again.

Tim

11
Automation Interface, Add-Ins and Tools / Re: Requirement's StereotypeEx
« on: November 13, 2007, 09:05:31 am »
Thank you so much for your quick response David, it really helped.

But still, is it a bug or known feature that if a Requirement element is dragged from Toolbox-Extended-Custom, its Stereotype (Element.Stereotype property from automation) remains unchanged even if you munually change it from EA?

I guess the problem I am having is - the Requirement element in Toolbox-Extended-Custom and in Toolbox-Extended-Requirements are different!

12
Automation Interface, Add-Ins and Tools / Requirement's StereotypeEx
« on: November 13, 2007, 08:13:01 am »
Hi guys, I am working on the next release build of Time Architect (the new Add-In for EA, see http://www.timearchitect.net). I am trying to access Stereotype from a Requirement element. Now I've got an interesting situation:

For example, if I drag a Requirement from Toolbox-Extended-Requirements to the diagram, assign a Type, say "Display" to it. From automation, the Stereotype property returns "Display", and the StereotypeEx property returns "Display" too, as expected.

However, if I drag a Requirement from Toolbox-Extended-Custom to the diagram, after assigninng "Display" to its Type, from automation, the Stereotype property still returns "Functional", and the StereotypeEx property returns "Display,Functional". ??? ???

Can anybody tell me why this is? Does this imply that the Requirement dragged from Custom section is different from the Requirement dragged from Requirements section? ( Well their icons look the same.... :P)


Another question is, what is the difference between an element's Stereotype and StereotypeEx?


Thank you in advance. Your help is much appreciated.
Tim

Pages: [1]