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

Pages: [1] 2 3 ... 5
1
General Board / Re: SQL Queries, Connectors, and 'Find in Diagram'
« on: May 19, 2025, 09:07:10 pm »
Aside: Many years ago I wrote the equivalent of Geerts' Navigator for (whisper it) another tool. I called it "TellMe" but Navigator is a better name (I guess that "Model Inspector" coves both the navigational and other data extraction aspects)
You are the author of TellMe?
Then you saved my a$$ a lot of times.
Thanks a lot for this tool!
Now - after migration to EA - there are times where I really miss it but there are alternatives around...

2
If it looks like a bug, and quacks like a bug...

I would report it as a bug: https://sparxsystems.com/support/forms/bug_report.html
Ok, will do that!
Personally I don't like multiple stereotypes and avoid them.
I don't feel like I've missed something.
Lucky you 8)
I'll have to deal with up to 3 stereotypes on one element :'(
Grown over years...

3
StereotypeEx doesn't support assigning multiple stereotypes.
Really?
Then I mis-read all the docs like:
https://sparxsystems.com/enterprise_architect_user_guide/17.0/add-ins___scripting/element2.html
Quote
FQStereotype        The fully-qualified stereotype name in the format "Profile::Stereotype". One or more fully-qualified stereotype names can be assigned to StereotypeEx.

Because it doesn't find a single stereotype matching what your code specifies it's trying to define a new stereotype. You don't have permission to do that in your model.
But with the permission the assignment of both stereotypes succeeds!
It doesn't define a new stereotype.

So, what is the correct approach to assign multiple stereotypes?
TIA!

4
EA 16.1.1628 (64bit) .QEAX database

I noticed a strange behavior for users without 'Configure Stereotypes' permission.
The VBscript code sample
Code: [Select]
ele.StereotypeEx = "profile::stereotype1,profile::stereotype2"
?ele.GetLastError()
gives the error
Quote
You have not been granted permission to 'Configure new Stereotypes'.
Please contact your model administrator.
Adding only one of both is working and adding both stereotypes manually also is working fine!
What does the (missing) permission have to do with assigning multiple stereotypes to elements or operations?
IMHO this is a bug or do I miss something here?
Thanks for your opinions!
Best regards

Michael

6
Hello Eric,

it is possible - with limitations.
Assuming the setup of the stereotypes containing the tags is done you have 2 options for the calculation of the tag values:
1) Run a script on demand to update all tags in the model.
2) Use a scriptlet to update the tag of this class upon opening a diagram containing the class.
Both methods have their specific shortcomings but as long as we don't have the concept of "calculated tags" (like e.g. PTC Windchill Modeler) this is the best we can get.
Best regards

Michael

7
Here's the list of properties that you can show in a shapescript.
https://sparxsystems.com/enterprise_architect_user_guide/17.0/modeling_frameworks/displaying_element_properties.html
There's no use in guessing. If it's not here, it won't work.

The only alternative seems to be the "addin" property. Just make sure your code is super fast, as this has a serious risk of degrading performance.
Hi Geert,
I was hoping for a documentation gap (happens from time to time ;) ).
Even some of the documented properties seem not to work - as others also found out.
The addin approach is out of the game due to the performance impact and the need to have another addin.
Thanks!

Michael

8
in the DB, the Default value is the "Default" column.  Try #Default#".
Hi Paolo,
thanks but this "Default Value" is from t_xref:
  • Name=MOFProps
  • Type=element property
  • Behavior=defaultValue
  • Description=<actual value>
I have the fear that it isn't exposed to ShapeScript at all...
BR

Michael

9
EA 16.1.1628 - 64 bit

I'm struggling with displaying the "Default Value" of a Part in diagrams.
Don't ask me why I need this  8)

I can see it in the Properties view under Part but I didn't find a way to show it in diagrams.
There seems to be no config option like Show Notes etc.
Also using ShapeScript it seems not to be possible as I don't get access to "Default Value".
It is stored in the part's TypeInfoProperties and there the name is "defaultValue" but even with this name I can't access it e.g. print("#defaultValue#"); leads to display of #defaultValue#.
Is there a way?
Thanks for your help!

10
Thanks for the clarification, Eve.
I think I got it now and it would be a completely new approach:
  • Replace the limited RefGUIDList with multiple RefGUID tags.
  • Pull them into the profile's Properties using your technique.
  • Find ways to add/remove RefGUID elements (via AddinBroadcast?)
I like the challenges EA raises...  8)
Ok, as a final summary to the readers I have taken the challenge and after a lot of struggling managed to replace the RefGUIDList with multiple RefGUID tags.
Using EA_OnNotifyContextItemModified() the GUID of the tags will be adjusted after creation.
Deleting a property is done in the built-in Tagged Values... dialog by selecting <none> for it and let the following EA_OnNotifyContextItemModified() callback remove the now empty RefGUID tag.
The key was to let the EA_OnNotifyContextItemModified() callback do all the housekeeping around the tags.
Unfortunately there is now a tight coupling between the profile containing the RefGUID tags and the EA_OnNotifyContextItemModified() code.
I wish this would not be the case but haven't found a solution. :(
But anyways: The RefGUIDList limit now is gone!

11
Have you tried using Element.LoadLinkedDocument(string Filename)
I think that does the same as your code.

Geert
Hi Geert,
as always you are right! ;D
It is working perfectly fine for me - and there is no need to unlock anything after creation.
A single call replaces my lengthy and troublesome code.
Wow, I don't get it why I have overlooked this call...
Thanks a lot!

Michael

12
Ok, after a long time I had to come back to this topic...

It looks like the documents end up in state "Text Selection Lock" = enabled (see Edit > Manage > Text Selection Lock).
Selecting all contents and disabling "Text Selection Lock" is the first step.
Then the "Protect" flag (see Edit > Font > Protect) which was greyed out before will become activated.
Again select all contents and disable "Protect" to make the document contents editable.

For now I don't care about changing these settings programmatically but if anyone has ideas I would highly appreciate it!  :)

13
Just FYI:
Bug report is out (#24077893)
Let's see what they have to say...
Update:
The issue has been confirmed and will be investigated further by our development team.
 ;)

14
Inquiry issued (#24077892).
Let's see what they have to say...
Update:
The issue has been confirmed and will be investigated further by our development team.
 ;)

15
Inquiry issued (#24077892).
Let's see what they have to say...

Pages: [1] 2 3 ... 5