Aspose .NET API for visio info extraction

Thanks team for the prompt response and sharing the code snippet.
From the given code, the relation between shapes to shapes(1st Point), I am able to however the control and application relationship is still not coming up (2nd and 3rd points). Am I missing something.

@prasenjeit

We have logged your concern along with the ticket and will share our feedback with you as soon as the ticket is resolved. Please spare us some time.

Team can you atleast help me with some code samples for

  1. Getting the event type
    2.Getting the Gatewaytype and
    3.Finding out which shapes are present is a respective Swimlanes

Thanks in advance

@prasenjeit

Thanks for getting back to us.

We will surely take care of your request as soon as the ticket is investigated. We will share our feedback soon against your requirements. Please spare us some time.

Team do we have any update on this.If you kindly let me know how can we get the Container shapes and the shapes inside it to start with. For example a swimlane has which shapes inside it.

A sample code will really be helpful.

Thanks,
Prasenjeet

@prasenjeit

There is no particular information in the source Visio file that you have shared. However, you can get Shape information according to its name. About finding out which shapes are present in a respective Swimlanes, please try this sample code:

var srcPage = diagram.Pages.GetPage("Page-1");
var shape = srcPage.Shapes.GetShape("Pool / Lane");
ShapeCollection childs = shape.Shapes;

Thanks for the quick response but this code is not giving me the right output:
However , The this piece of code can be used with some text cleaning and reference id

var test = vdxDiagram.Pages[0].Shapes[i].Layout.Relationships.Ufe.F;
Console.WriteLine(“aspose—” + test);
Please try the above code and let me know

By the way can team help me to tell how can I identify the type of Gateway like Parallel, Inclusive etc. from the shape if it is a Gateway.
Similarly how can I get kind of event type.
This would be really helpful. Thanks in advance.

Prasenjeet

@prasenjeit

We have logged your response under the attached ticket and will share our feedback as soon as the ticket is investigated accordingly. Please spare us some time.

OK.
I am using Aspose Visio DLL from Visual Studio Nuget.
Is there any subscription needed for it. Will it get expired. What is the way of renewal ?

Also … is there any way I can know what kind of Gateway type and event type.

@prasenjeit

We are investigating your this requirement and will share our feedback as soon as the logged ticket is resolved.

In order to use API in its full capacity, you need to set a valid license before using any method or functionality of the API. You can also evaluate API without trial version limitation by using 30-days free temporary license. As far as usage of trial version is concerned, you can use it as long as you want. For furhter inquiries related to API purchase, you can please contact our sales team.

Is there any update. and
if team can help me in this question atleast:
What is the way I can read the shapes inside a groupshape in visio . Please

Prasenjeet

read the shapes inside a groupshape in visio, I have tried Shape.Shapes for the group but count is coming as zero all the time.

Other thing is that I am trying to get the connected shapes for text annotation.
Tried two methods, 1) shape.GluedShapes(GluedShapesFlags.GluedShapesAll2D, “”, null).Count()
and 2) shape.IsConnected(shp). No way I am able to find a solution. Attaching the sample Visio for your refernce. Any help will be highly appreciated. Based on these answers. we will decide to procure the license.

Thanks,
Prasenjeet

Sample Diagram -test.zip (368.6 KB)

@prasenjeit

Regarding your gateway requirements, please try following code:

//gateway
Shape shape = diagram.Pages[0].Shapes.GetShape(340);
String gatewayType = shape.Props.GetProp("BpmnGatewayType").Value.Val;
Console.WriteLine(gatewayType);
//event             
foreach (Shape child in diagram.Pages[0].Shapes)
{                
 if (child.Name.IndexOf("Event") != -1)
 {                   
   Console.WriteLine(child.Name);                
 }            
} 

We are checking for this scenario and will share our feedback with you shortly.

1 Like

Thanks Team, Please help me with the
1.to find shapes under Group Shape and
2. the connected shapes for text annotation.
I would be having an important demo with the stakeholder

Thanks in advance,
Thanks,
Prasenjeet

@prasenjeit

We have checked your sample file and we could see that shape432 and shape401 is connected in the sample file. Please try using following code snippet:

Shape shape = diagram.Pages[0].Shapes.GetShape(432);
Shape sh = diagram.Pages[0].Shapes.GetShape(401);
long[] In_connectedShapeIds = shape.ConnectedShapes(ConnectedShapesFlags.ConnectedShapesIncomingNodes, null);
long[] Out_connectedShapeIds = shape.ConnectedShapes(ConnectedShapesFlags.ConnectedShapesOutgoingNodes, null);
Console.WriteLine("Shape ID: " + shape.ID + "\t Name: " + shape.Name + "\t\t Incoming nodes count: " + In_connectedShapeIds.Length + "\t\t Outgoing nodes count: " + Out_connectedShapeIds.Length);            
Console.WriteLine(In_connectedShapeIds[0]);            
bool isConn = shape.IsConnected(sh);            
Console.WriteLine(isConn);

I have done that already but this is not giving any information for Text Annotation connection . Both 401 and 432 are both tasks. but we cannot find text annotation. Is there a way we can find that

@prasenjeit

We are investigating the scenario as per your feedback and will share our findings soon.

Thanks, Any early response will be highly appreciated… This is the only piece which remaining.

Thanks,
Prasenjeet

@prasenjeit

We will surely let you know as soon as the logged ticket is resolved. Please spare us little time.