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

Pages: 1 2 [3] 4 5
31
General Board / Attribute and type with the same name
« on: December 13, 2016, 09:18:59 pm »
In this tutorial I read the following:

Quote
In our case we needed an URL NameSpace tag on our WSPackage. To do so I added a Tagged Value type called “namespace” and in the “Detail:” field we added the text “Type=URL;”. Now we have defined the Tagged Value type and it is ready to be used in our element. To do so add an Attribute with the same name as the Tagged Value, and type the name of the Tagged Value type in the “Type:” field. In our case an Attribute named “namespace” with the Type “namespace”.

So...

If I add an attribute to an element with the name "namespace", and I choose as type also "namespace", I get the following error message:

Quote
Attribute with that name already exists

32
General Board / Re: Error while importing MDG file
« on: December 12, 2016, 11:24:56 pm »
It worked, thanks!

33
General Board / Error while importing MDG file
« on: December 08, 2016, 10:10:26 pm »
Hello,

I'm using Enterprise Architect 12 Corporate Edition and I receive the following erorr when I import an MDG file that is probably created in EA 12.1:

"The current version of EA only supports ID's up to 12 characters in length. Please shorten the ID field in the profile and retry".

It looks evident for me that I just need to shorten the ID, but where in the xml file can I find the right ID field?

Thanks,

34
General Board / Re: Link labels and text fields to class diagram attributes
« on: December 06, 2016, 09:30:37 pm »
Guillaume,

Thanks, it works, but it is not exactly what I want. I just want to see the 'attributes' on my wireframe.

35
General Board / Link labels and text fields to class diagram attributes
« on: December 06, 2016, 07:50:44 pm »
I'm creating a wireframe in Enterprise Architect with fields and labels. I've also created a class diagram with different classes and attributes.
My question now is if it's possible to link the text fields and the labels on the wireframe to specific attributes in the classes?

For example:

The field or label "Company name" on the wireframe needs a link to the attribute 'name' in the class 'Company'.
This is very handy for the developpers to know in wich object/attribute they need to save the information from the fiels, or to get the information from to show in a label.

Thanks!

36
General Board / Re: Copy and past single element
« on: November 17, 2016, 10:18:19 pm »
I found it:

Tools > Options > Diagram

Under 'Diagram Frames', uncheck 'On Clipboard Images'

37
General Board / Copy and past single element
« on: November 17, 2016, 10:13:26 pm »
When I select and copy a single element on a diagram to paste it as an image in a Word document, a diagram frame will always appear when I paste it to the document.
But I want to paste only the element, not the frame, is this possible?

38
Automation Interface, Add-Ins and Tools / Re: C# + Scheduled Task= Error
« on: October 13, 2016, 06:20:32 pm »
EA needs a user to be logged in.
This does work as a scheduled task only if the user is still logged on, not when executed as a service.

Geert

So it is'n possible to schedule/plan an export?

39
Automation Interface, Add-Ins and Tools / Re: C# + Scheduled Task= Error
« on: October 13, 2016, 02:20:44 am »
string conn = @"C:\EA\Shortcut.eap";

But how can you explain that it only fails when the application is executed by the scheduler?

40
Automation Interface, Add-Ins and Tools / C# + Scheduled Task= Error
« on: October 13, 2016, 01:34:15 am »
I wrote a C# application for exporting html reports. When I run the .exe manually it works fine, but when it starts from a scheduled task I get the following error:
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)


EA.Repository repo = new EA.Repository();
repo.OpenFile(conn);  --> The error is on this line.

41
I assume the Update follows since you say the DB is changed. Close/re-open the diagram to make the changes visible.

q.

Did it, but no results.

42
If I run this code, the values are changed in the database, but in Enterprise Architect I don't see anything

Quote
If attrType = "VARCHAR2" Then
        myAttribute.Length = attrLength
        myAttribute.Precision = "0"
    End If
   
    If attrType = "NUMBER" Then
       myAttribute.Precision = attrLength
       myAttribute.Length = "0"
    End If

43
I checked all the fields in the database and this is the result:

Quote
Public Function addOrUpdateAttribute(parentClass As EA.element, name As String, stereotype As String, description As String, attrType As String, attrLength As String, default As String, allowduplicates As Boolean, isordered As Boolean) As EA.Attribute
    Dim myAttribute As EA.Attribute
    'try to find existing attribute with the given name
    Set myAttribute = getAttributeByName(parentClass, name)
    If myAttribute Is Nothing Then
        'no existing attribute, create new
        Set myAttribute = parentClass.attributes.AddNew(name, "Attribute")
    End If
    'set properties
    myAttribute.stereotype = stereotype
    myAttribute.Notes = description
    myAttribute.Type = attrType
    myAttribute.StyleEx = "volatile=0;"
   
    'varchar -> length, number -> precision
    If attrType = "VARCHAR2" Then
        myAttribute.Length = attrLength
        myAttribute.Precision = "0"
    End If
   
    If attrType = "NUMBER" Then
       myAttribute.Precision = attrLength
       myAttribute.Length = "0"
    End If
   
    'set initial value (default)
    myAttribute.default = default
   
    'set not null (allowduplicates)
    myAttribute.allowduplicates = notnull
   
    'set PK (isordered)
    myAttribute.isordered = pk
   
    'save attribute
    myAttribute.Update
    'refresh attributes collection
    parentClass.attributes.Refresh
    'return attribute
    Set addOrUpdateAttribute = myAttribute
End Function

But it doesn't work, the script only creates the table with attributes of a specific type.
No length, pk, not null, ....

I tested it over and over again...

44
It works, but there's stil a problem.

I use the importer to add attributes to columns, but I can't add or update the following fields:
- Length
- PK
- Not Null
- Scale
- Initial Value



45
Can I do it with this function?

Code: [Select]
Public Function addOrUpdateAttribute(parentClass As EA.element, name As String, stereotype As String, description As String, attrType As String) As EA.Attribute
    Dim myAttribute As EA.Attribute
    'try to find existing attribute with the given name
    Set myAttribute = getAttributeByName(parentClass, name)
    If myAttribute Is Nothing Then
        'no existing attribute, create new
        Set myAttribute = parentClass.attributes.AddNew(name, "Attribute")
    End If
    'set properties
    myAttribute.stereotype = stereotype
    myAttribute.Notes = description
    myAttribute.Type = attrType
    'save attribute
    myAttribute.Update
    'refresh attributes collection
    parentClass.attributes.Refresh
    'return attribute
    Set addOrUpdateAttribute = myAttribute
End Function

Pages: 1 2 [3] 4 5