Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Sankar on March 06, 2012, 07:24:54 pm
-
Hi, Can someone provide code snippet for creating a swinlane in a diagram using vbscript. Thanks in advance
-
Never used that but RTFM showed Diagram.Swimlanedef is what you're looking for.
q.
-
Thanks for the response,
I am trying
dim obj
set obj = eaDiagram.SwimlaneDef.Swimlanes.Add("Incident Manager", "Width=700; Height=200")
eaDiagram.SwimlaneDef.Update()
This is Type Mismatch, but how do I cast Swimlane object?
Regards
Sankar
-
I guess it simply does not work (not unusual for EA). I tried the following
my $d = $rep->GetDiagramByGuid ('{ED94B3F2-8E2B-45cd-93DA-40A2FC9AAB96}');
my $sldef = $d->SwimLaneDef;
my $slcount = $sldef->Swimlanes->Count;
my $sl = $sldef->Swimlanes->GetAt(0);
with a diagram containing 2 swimlanes. While $slcount was actually 2 the return value for the swimlanedef objects $sl was null in both cases.
Report a bug using the link at the bottom of the page.
q.