Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: qwerty on January 16, 2014, 05:52:00 am
-
When I try to assign a value (off or standard as suggested by the help) the compiler claims
Error: Invalid value for orientation. Acceptable values are: "nw", "n", "ne", "e", "se", "s", "sw", "w", "nw", and "center"'off
Has anybody at Sparx tested this shape script in any way? I do not expect an answer to that question >:(
q.
-
Yes, it's used in the BPMN pool/lane scripts.
-
So why do I get this strange error message? I even can't save the script:
shape main {
dockable = "off";
}
The "no-op" dockable = "standard" however will pass the compilation.
q.
-
Want help with this qwerty - but could be a useful tip for your shapescript book - when i was trying to get to grips with shapescripts - i started a new project then imported the BPMN MDG. This gave my access to the scripts via Setting->UML Types-Stereotypes. So i could for example view the shapescript for Pools/Lanes/Actiivties etc to figure out how things worked and of course copy and paste sections of a script into a new stereotype/script easily...
Regards,
Jon.
-
Thanks, Jon. That's definitely a good idea. Could have been from me ;-)
Nevertheless I will for a moment go on with a wiped brain, not influenced by any tricks which were coded by Sparx. Currently I feel like a beta tester. The help does in many parts not match reality (don't want to blame Roy who's doing a good job, but it looks as he's the only one working on the docs). Next week I'll dive into the scripts of the existing MDGs.
q.
-
Want help with this qwerty - but could be a useful tip for your shapescript book - when i was trying to get to grips with shapescripts - i started a new project then imported the BPMN MDG. This gave my access to the scripts via Setting->UML Types-Stereotypes. So i could for example view the shapescript for Pools/Lanes/Actiivties etc to figure out how things worked and of course copy and paste sections of a script into a new stereotype/script easily...
Regards,
Jon.
Hi Jon,
how do you import the BPMN Mdg Tech.?
Neither Extensions/Import/Other Tools nor Tools/MDG Technology Import does the trick for me. I tried it with the File C:\Program Files (x86)\Sparx Systems\EA\MDGTechnologies\BPMN 2.0 Technology.xml
What am i doing wrong?
-
That's another black magic. You can't reverse the XML. To see the script you need to decode some base64 inside which then offers a zip with the script.
Of course I will not do that since it will certainly breach some license agreement. But I have a nice glas bowl here.
q.
-
stao,
actually you can do it (officially) the following way:
-Project/Resources
-MDG Technologies/Context Import Technologie
-Choose the one from the EA Program folder/MDG...
Now you can see the stereotypes for the MDG under Settings/UML. Just scroll through the list and you will find the shape script enabled ones.
q.
-
Here's a little Perl script which spits out the scripts from the exported reference data:
use strict;
no strict 'refs';
use XML::Parser;
my $p1 = new XML::Parser(Style => 'Tree');
my $file = "<path to the exported stereotypes reference file";
my @tree = $p1->parsefile($file); # parse that stuff
@tree = @{$tree[0][1][4]};
for my $datarow (@tree) {
next unless (ref($datarow) eq "ARRAY");
for my $column (@{$datarow}) {
next unless ref($column) eq "ARRAY";
my %hash = %{@{$column}[0]};
if ($hash{'name'} =~ /(Style|Stereotype)/) { print $hash{'value'} . "\n"; }
}
}
q.