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 - Geert Bellekens

Pages: 1 ... 474 475 [476] 477 478 ... 512
7126
Seems perfectly ok to me.
If it's really necesarry you could to a reload of your model, but I would leave it as is. After all, after a restart of EA you see the default values so...

(PS. IIRC The default value isn't actually filled in in the database. Its left null and the EA GUI will pretend it has the default value, but my memory could be failing me.)

7127
Can you post the code that creates the taggedValues?

Geert

7128
Rainer,

My code to add a tagged values to an element:
Code: [Select]
       /// <summary>
        /// adds a tagged value to this element
        /// </summary>
        /// <param name="name">the name of the tagged value</param>
        /// <returns>the added tagged value</returns>
        public override UMLTaggedValue addTaggedValue(string name)
        {
            return (UMLTaggedValue)EAWrapperFactory.createEAWrapper((EAModel)this.getModel(), this.wrappedElement.TaggedValues.AddNew(name, "TaggedValue"));
        }
So I guess your code you work if you do:
Code: [Select]
myElement.TaggedValues.AddNew("<TaggedValueType>", "TaggedValue");
Just be careful with the name of the tagged value. If you have defined your tagged value as part of a profile you'll have to use the FQN as in "ProfileName:TaggedValueName" (or "ProfileName::TaggedValueName", i don't remember exactly)


There should be some posts about that in this forum.

Geert

7129
Rainer,

I had a quick look at the database yesterday, but I haven't found anything obvious that defines the "icon" of a view.
What I would do in such a case is start a database trace, create such a view in EA and then inspect the trace to figure out what has been done at the database level.
Usually that helps in finding out which property (if any) to use in the API. If the property is not exposed in the API you can still update the tables yourself using Repository.Execute(sqlString).

Geert

7130
Doesn't the Attribute.Pos control the order of an Attribute?

Geert

7131
Phil,

You can find the "extended complexity" setting in the registry key HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS\ComplexityEx

Complexity values can be found in t_complexitytypes

For languages, the only thing I found was
Code: [Select]
select distinct ProductName from t_datatypes
where type = 'Code'
But that might just be enough.

Geert

7132
Automation Interface, Add-Ins and Tools / Re: Check project authors
« on: October 20, 2010, 07:35:45 pm »
Oh, yes sure, I forgot the cast to Author.

Geert

PS. I hate EA.Collection >:(

7133
Automation Interface, Add-Ins and Tools / Re: Check project authors
« on: October 20, 2010, 07:27:17 pm »
try
Code: [Select]
// Author nicht vorhanden -> neu anlegen
Log = "Project Author nicht vorhanden";
oberflaeche.vSetMessage(Log);
EA.Author newAuthor = repository.Authors.AddNew("Project Author", "Author");
newAuthor.Update();

7134
Automation Interface, Add-Ins and Tools / Re: Check project authors
« on: October 20, 2010, 07:20:01 pm »
Post the code snippet, there might be an update() missing or something like that.

Geert

7135
Automation Interface, Add-Ins and Tools / Re: Check project authors
« on: October 20, 2010, 06:58:20 pm »
I think you'll have to use as such:
Code: [Select]
myRepository.Authors.AddNew("AuthorName","Author")
Geert

7136
Automation Interface, Add-Ins and Tools / Re: Check project authors
« on: October 20, 2010, 04:23:10 pm »
From TFM:
Quote
Authors
 Collection
 Read only. The system Authors collection. Contains 0 or more Author objects, each of which can be associated with, for example, elements or diagrams as the item author or owner. Use AddNew, Delete and GetAt to manage Authors.
 

Geert

7137
Automation Interface, Add-Ins and Tools / Re: Transactions
« on: October 20, 2010, 08:10:45 pm »
see http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1287185419
I don't think you can do transactions, but the batchAppend setting might be similar.

Geert

7138
Automation Interface, Add-Ins and Tools / Re: Optimizing EA interface
« on: October 18, 2010, 04:14:26 pm »
Jim,

I've had my share of performance problems writing addins on EA.
Here are the things I try to increase performance:
- Only iterate an EA collection once, an only if you really have to. You would think that iterating a collection in memory should be fast, but in fact in most cases EA will go to the database each time you do a next. Instead use put each object in a regular collection the first time you initialise it, and iterate over that.
- Use things like getElementSet passing an SQLString as parameter to get a specific set of elements, beats iterating over a larger collection of elements to filter out what you need.
- Use a caching mechanism for elements you have already initialised
- Use Repository.SQLQuery to get the id's of things you need, and initialise them using Repository.GetXXXByID
- If you don't need the EA objects then don't initialise them. E.g if you are doing an export of all classes to an excel file then use only Repository.SQLQuery to get the details you need, without initiliasing the classes themselves.
- Use Repository.BatchAppend and EnableCache and EnableUIUpdates
where appropriate.

Geert

7139
Mario,

Have you tried the Position property?

Geert

7140
Have you checked the returnvalue of update() If False check GetLatestError().

Geert

Pages: 1 ... 474 475 [476] 477 478 ... 512