Aspose .NET API for visio info extraction

@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.

Hi Asad.

Do we have any update on this. ?

@prasenjeit

The ticket is still under investigation. We will surely inform you soon.

@prasenjeit

There is only one pair of connect in the page of source file which is between shape 432 and shape 401.
We are sorry that we could not get the connected shapes for shape 517.

<Connects>
<Connect FromSheet='457' FromCell='EndX' FromPart='12' ToSheet='432' ToCell='PinX' ToPart='3'/>
<Connect FromSheet='457' FromCell='BeginX' FromPart='9' ToSheet='401' ToCell='PinX' ToPart='3'/>
</Connects>

Please get relationships using this sample code:

Shape shape = diagram.Pages[0].Shapes.GetShape(517);
Console.WriteLine(shape.Layout.Relationships.Ufe.F); 
1 Like

Thanks Team. I can work with this as a work around, Thank you for trying and providing the solution.

Now on the other part, the last piece , did we get any solution for the group box
In the attached vsdx, we have to tasks 6 and 8 under a groupbox.
However, I am not able to establish any connection between the group box and the shapes inside it.
Sample BPMN drawing.zip (202.2 KB)

Thanks a lot in advance

@prasenjeit

Please use following code snippet:

Shape shape = diagram.Pages[0].Shapes.GetShape(548);
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);

There are two incoming nodes and two outgoing nodes. Also, you can get its child for shape 548.
There is no information about the connection of the childs in the source file.

@asad Thanks for the prompt reply . Sorry if question was not clear. What I want to know how can I get which shapes are there inside the Group Box in the given example.
You mentioned in you comment that I can get the childs. How can I get which are the items insde the group box.
Thanks in advance.
Prasenjeet

@prasenjeit

You can get childs using same code snippet if they are connected. However, in your provided source file, we cannot find any connection between the childs. You may try same code snippet with another source file having connections among child shapes.