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

Pages: [1] 2
1
Thanks q, that works  :)

2
hey q, thank you for help.
Okay I understand that, but the problems is:
    req.TaggedValues.GetAt(0) = "Test"
    ^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?

I don't know how to set value of req.TaggedValues.GetAt(0).

3
Automation Interface, Add-Ins and Tools / Changing value of TaggedValue
« on: August 04, 2023, 11:53:26 pm »
Hello
does anybody know how to change value of TaggedValue.
So basically I want to do something like this.

req = eaRepo.GetElementByGuid("{...}")
req.TaggedValues.GetAt(0) = "Test" # this doesn't work

BR and thank you in advance for your help  :)
M.

4
Hello guys,
how to access extended properties of a requirement, I added "Allocates to" field, value is string and my new requirement type extends UML requirement. Now within my scripts I want to get/set value of "Allocates to" but can't find it in debugging or on internet?
Thank you in advance for your answers  :)

5
If you are thinking of part that append to string, makes sense, changed that but since it worked without it I guess EA automatically adds the missing ";" which is cool

6
Hey guys, thank you for help,
this code (Python) worked for that, for maybe any future questions :)
Code: [Select]
diagram = package.Diagrams.AddNew( packageName + " Diagram", "SysML1.4::Requirement")
        diagram_styleEx = str(diagram.StyleEx)
        if "ShowNotes=1" in diagram_styleEx:
            diagram_newStyleEx = diagram_styleEx.replace("ShowNotes=0", "ShowNotes=1")
            diagram.StyleEx = diagram_newStyleEx
        else:
            diagram_styleEx += "ShowNotes=1"
            diagram.StyleEx = diagram_styleEx
        diagram.Update()
        eaRepository.RefreshModelView(package.PackageID)

7
Hi Geert,
thank you for answer.

Oh sorry  :D
I mean the notes checkbox in Diagram -> Properties -> Elements -> Show Compartments -> NOTES
You check it and then for instance requirements diagram shows notes from requirements.
Do you understand explanation?

8
Hey guys,

does anybody maybe knows if there is way to make notes visible for diagram from API, I've been looking at object "diagram", but couldn't find anything, it seems it's not available atm?

Thank you in advance for your answers,
BR, M

9
Yeah, after reading your book I've also started working with Python :) So if you can please provide some draft I would be thankful

10
That works  :) Can you please describe this wrapper?

11
I tried that. I have GUID of an block, .embeddedElements gives me ports in IBD and .connectors gives me all aggregations and generalizations in BDD, but I can't get the other end (ClientID) from connectors, but it shows the port on it's own instance.

This is code I am using:
element = eaRepository.GetElementByGuid(guid) # element in BDD, block
for i in range(element.EmbeddedElements.Count):
    currentEElement = element.EmbeddedElements.GetAt(i)
    print(str(i) + " " + currentEElement.Name)
    for j in range(currentEElement.Connectors.Count):
        currentEConnector = currentEElement.Connectors.GetAt(j)
        print("    " + str(j) + " " + eaRepository.GetElementByID(currentEConnector.ClientID).Name + " " + currentEElement.PropertyTypeName)

12
Hello guys, is there a way to see where is connection from embeddedElement (port) going to, i.e. what is client?

13
Hey Geert,

thank you, Element.Stereotype gives info whether it's block or interface block.

14
Hello guys,

do you know if there is a way to distinguish InterfaceBlock from "normal" blocks. If I get element type of something that is an interface block and from block it's both class (interfaceBlock.Type = class also block.Type = class)?

Thanks in advance  :)

15
Hello qwerty,

you mean this one? https://leanpub.com/ScriptingEA

I am interested, let me just ask you, because I am not sure from sample, is there explanation in JScript? Do you think that your book provides knowledge that will help me do as I previously described?

Best regards, M.

Pages: [1] 2