Computing a Compound Label for a Configuration [message #1854743] |
Wed, 07 September 2022 02:07 |
|
I am creating a configuration that has an installation and workspace. I would like the label of the installation to be computed from the name of the Installation and Workspace.
I am aware of Predefined Variables, but they only seem to enable use from within the scope. So, if I am in a stream, my scope is the project and then the project catalog. So both of those are in scope.
In my case, I would like to use variables that represent values in a contained element. I.e. I would like the label of the Installation contained in the Configuration.
In OCL code this would look like this:
context Configuration
def label = installation.label + " for " + workspace.label
So for an installation with label "The workbench" and workspace label "hacked up code" we would get the "The workbench for hacked up code".
Is this sort of declaration possible and how would I achieve that?
[Updated on: Wed, 07 September 2022 02:07] Report message to a moderator
|
|
|
Re: Computing a Compound Label for a Configuration [message #1854747 is a reply to message #1854743] |
Wed, 07 September 2022 06:55 |
Ed Merks Messages: 33254 Registered: July 2009 |
Senior Member |
|
|
No, this isn't possible. Keep in mind that the installation can be used to open a different workspace and in fact the installation could be launched multiple times simultaneously with different workspaces. Also, a given workspace can be opened by another installation (though of course only one at any point in time). This is why the scopes are disjoint...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.07550 seconds