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 ... 479 480 [481] 482 483 ... 518
7201
Attribute.Default should give you the default value for an attribute.
To figure out which attributes are overridden, that is going to be a bit more difficult.
You'll have to find the superclass(es) and compare their attribute names with the one you have.
If it's the same then the attribute is overridden.
If then the default value is different the initializer is overridden.

If you are specifically looking for a list of attributes with an overridden default you better use some fancy sql query to find those (because looping over every attribute in the model is going to take a looooong time.)

Geert

7202
Automation Interface, Add-Ins and Tools / Re: Dockable Window
« on: October 27, 2010, 03:57:56 am »
look in the release notes.
There should be a line about the AddWindow.

Geert

7203
Automation Interface, Add-Ins and Tools / Re: Dockable Window
« on: October 12, 2010, 04:01:38 am »
I'm not sure, but I'm guessing its going to be <your_project_name>.<your_control_name>

Geert

7204
Automation Interface, Add-Ins and Tools / Re: Dockable Window
« on: October 11, 2010, 09:45:20 pm »
TFM says:
Quote
Adds an ActiveX custom control as a window to the Add-Ins docked window. Enterprise Architect creates a control and, if successful, returns its Unknown pointer, which can be used by the caller to manipulate the control.

The window can be shown by selecting it from the list in the Workspace Layouts toolbar - click on the third icon from the right and look at the end of the list.

Parameters:

WindowName: String - used as the window title.
ControlID: String - the ProgID of the control; for example, Project1,UserControl1.
So I guess that's the only way to dock a window.

Geert

7205
Automation Interface, Add-Ins and Tools / Re: Dockable Window
« on: October 08, 2010, 12:14:18 am »
Stefan,

Look at Repository.AddWindow (string WindowName, string ControlID).
I haven't tried it myself, so I can't give you any examples.

Geert

7206
Quote
Operation are called Methods on the API level - which fits to the UML notion -
Stefan,

UML uses the term "Operation" as well. Method is used in UML as the behavior implementing the operation.

The term "Method" in the API is just plain wrong and should be "Operation".

Geert

7207
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.)

7208
Can you post the code that creates the taggedValues?

Geert

7209
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

7210
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

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

Geert

7212
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

7213
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 >:(

7214
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();

7215
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

Pages: 1 ... 479 480 [481] 482 483 ... 518