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 / 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.

32
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!

33
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'

34
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?

35
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?

36
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?

37
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.

38
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.

39
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

40
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...

41
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



42
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

43
I have a data modeling diagram with several tables and much much much attributes.
All the attributes (names, types, lenght, ...) are available in  a csv file.

Can I import them to a specific table directly from the csv file?

44
General Board / Wireframe image - change size
« on: July 11, 2016, 07:30:33 pm »
For the creation of a wireframe I use the wireframe image UI control, and choose and alternate image.
But I can't find a way to change the size of the image, I can drag the image to another size, but is it possible to enter the width and height?

45
I thought that it generated everything if you passed in an empty guid.

It doesn't work...

Code: [Select]
repo.GetProjectInterface().RunHTMLReport("", modelPath, imageFormat, style, ext);

Pages: 1 2 [3] 4 5