Book a Demo

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

Pages: [1]
1
Bugs and Issues / Re: BPMN 1.1 Elements
« on: April 04, 2011, 02:33:42 pm »
Thanks David!! You're a life saver... :D Thank you so much!

2
Bugs and Issues / BPMN 1.1 Elements
« on: March 23, 2011, 05:10:11 pm »
I tried adding an element in a package that is defaulted to BPMN 1.1 control but to no avail.  I simply copied the type format when adding a BPMN1.1 diagram (BPMN1.1::BPMN).

Here's a sample code:
Code: [Select]
EA.Element NewElement = (EA.Element)Package.Elements.AddNew(vsShape.Text, "BPMN1.1::BPMN::" + sShapeType);
NewElement.Stereotype = sShapeStereotype;

where:
sShapeType - the type of the shape
sShapeStereotype - the stereotype for the current shape to be added.

When I look at its TaggedValues, it's still defaulted to BPMN 1.0, so what I do is, delete all the current tagged values and tried to add a new one.  The problem is it's not added to the shape.  Here's my code:

Code: [Select]
for (x = 0; x < ActivityTypes.Length; x++)
{
   taggedValue = (EA.TaggedValue)Element.TaggedValues.AddNew(ActivityTypes[x].ToString(), "otTaggedValue");
   taggedValue.ElementID = Element.ElementID;
   if (ActivityTypes[x].ToString() == "ActivityType")
   {
      if (sMasterName.IndexOf("SUBPROCES EXPANDED", StringComparison.InvariantCultureIgnoreCase) >= 0 || sMasterName.IndexOf("SUB-PROCESS COLLAPSED", StringComparison.InvariantCultureIgnoreCase) >= 0 || sMasterName.IndexOf("SUB-PROCESS LOOPING", StringComparison.InvariantCultureIgnoreCase) >= 0)
     { taggedValue.Value = "Sub-process"; }
      else { taggedValue.Value = ActivityValues[x].ToString(); }
     }
     else if (ActivityTypes[x].ToString() == "LoopType")
     {
         taggedValue.Value = sSubType;
      }
      else { taggedValue.Value = ActivityValues[x].ToString(); }
       Element.TaggedValues.Refresh();                        
}

What should I put to the place of the "otTaggedValue" part? What's wrong with the code? Please help!  :'(

3
Bugs and Issues / Placing Elements in the Diagram
« on: March 25, 2011, 04:46:04 pm »
Hi,

Can somebody tell me how to put an element on the diagram without overlapping each other?  I'm trying to import a visio file to EA but I can't figure out how to place it in the diagram they way it's arranged in the Visio diagram.

Someone help, please!!!  :(

4
Bugs and Issues / Re: BPMN 1.1 Diagrams and Elements
« on: March 18, 2011, 03:32:55 pm »
Quote
This is a guess: try "BPMN1.1::BPMN". If that doesn't work, contact Sparx Support.

It worked! Thank you so much!! What about the shapes then? Should I put "BPMN1.1::BPMN::Activity" type for the Activity Shapes???


5
Bugs and Issues / BPMN 1.1 Diagrams and Elements
« on: March 17, 2011, 09:07:16 pm »
Hi, I have a code that was supposed to create a BPMN 1.1 Diagram.  I used the C# Example included in Sparx to get the type of a BPMN 1.1 and it says "Analysis", so that's what I put in my code.  But then, after I open the diagram, the default tollbox that opens with it is the "Analysis" toolbox so I'm assuming that the "Analysis" diagram type is different from "BPMN 1.1".  What type should I use then?  Or, if the initial set of toolbox when opening a diagram doesn't have anything to do with it, what's the correct code so that I could set the toolbox to BPMN 1.1 as well?

Any help is greatly appreciated.

Code: [Select]
EA.Diagram NewDiagram = (EA.Diagram)Package.Diagrams.AddNew(vsPage.Name, "Analysis");
NewDiagram.Update();

6
Could you please elaborate your question? What shape script? Is this from Visio?

7
Quote
... Or do you want to do that via automation? In that case you have to tweak the SQL database (t_diagram most likely and there likely inside PDATA)

q.

Yes, I want to do it programmatically/ via automation.  Sorry for being such a noob but where do I find the database?  I'm working on importing Visio files to EA using C#.NET but I've never tweaked it database nore even know where it is. Heheh..  :P

8
Hello,

I don't know if this has been posted already or not.  I tried searching for a similar topic but with no succes.

I need to set the diagram page to Landscape and its paper size to A3... How do I do this?

Thanks! ;D

9
Could you please post the code for this?

10
Hi,

I'm developing a C#.Net Add-in that would convert Visio Shapes to EA.  For every page in the Visio file, I must create a new BPMN Diagram.  My code is working fine, but it seems that it's not in the BPMN 1.1 type since its toolbar isn't loading properly (as BPMN 1.1).  Also, the shapes tagged values are either not populated like the shapes in BPMN 1.1 as well.  Please see below for my code.
For adding the BPMN Diagram:
Code: [Select]
...
//Add a diagram in the current package for the specific page                    
                    EA.Diagram NewDiagram = (EA.Diagram)Package.Diagrams.AddNew(vsPage.Name, "Analysis");
                    NewDiagram.Update();
...

For the shapes:
Code: [Select]
...
EA.Element NewElement = (EA.Element)Package.Elements.AddNew(vsShape.Text, sShapeType);                                    
                                    NewElement.Stereotype = sShapeStereotype;
switch (sShapeType)
{
    case "Activity":
        taggedValue = (EA.TaggedValue)NewElement.TaggedValues.AddNew("LoopType", "System__ComObject");
        taggedValue.ElementID = NewElement.ElementID;
        taggedValue.Value = sSubTypeValue;
        taggedValue.Update();
        NewElement.TaggedValues.Refresh();                                                    
        NewElement.Update();
        break;
    case "Decision":
        taggedValue = (EA.TaggedValue)NewElement.TaggedValues.AddNew("GatewayType", "System__ComObject");
        taggedValue.ElementID = NewElement.ElementID;
        taggedValue.Value = sSubTypeValue;
        taggedValue.Update();
        NewElement.TaggedValues.Refresh();
        taggedValue = (EA.TaggedValue)NewElement.TaggedValues.AddNew("MarkerVisible", "System__ComObject");
        taggedValue.ElementID = NewElement.ElementID;
        taggedValue.Value = "true";
        NewElement.Update();
        break;
    case "EndEvent":
        taggedValue = (EA.TaggedValue)NewElement.TaggedValues.AddNew("Result", "System__ComObject");
        taggedValue.ElementID = NewElement.ElementID;
        taggedValue.Value = sSubTypeValue;
        taggedValue.Update();
        NewElement.TaggedValues.Refresh();
        NewElement.Update();
        break;
    case "IntermediateEvent":
        taggedValue = (EA.TaggedValue)NewElement.TaggedValues.AddNew("Trigger", "System__ComObject");
        taggedValue.ElementID = NewElement.ElementID;
        taggedValue.Value = sSubTypeValue;
        taggedValue.Update();
        NewElement.TaggedValues.Refresh();
        NewElement.Update();
        break;
    case "StartEvent":
        taggedValue = (EA.TaggedValue)NewElement.TaggedValues.AddNew("Trigger", "System__ComObject");
        taggedValue.ElementID = NewElement.ElementID;
        taggedValue.Value = sSubTypeValue;
        taggedValue.Update();
        NewElement.TaggedValues.Refresh();
        NewElement.Update();
        break;
}                                        

Pages: [1]