Miss the possibility to set actions

Actions can be defined in Viso. This gives you a drop-down list on a shape with which you can set various things.
How can I control these actions with Apose.Diagram? I have not found a way to do this in the API. I also found nothing in the example code and in the forum.

regards Stephen

@sgruth

Could you please provide more details about the specific actions you want to control with Aspose.Diagram?

ok, i’ve attached two screenshots of Visio. There you can see the actions in the ShapeSheet Data i would like to change.
And the other screenshot shows the corresponding visio shape with the action and the entries i would like to set by aspose.diagram.

Actions_Drawing.JPG (9,4 KB)

Actions_ShapeSheet.JPG (49,1 KB)

@sgruth
Thanks for screenshots.
Please try this sample code to set action:

        Act act = shape.Acts[0];
        act.Name = "Test";
        act.Menu.Value = "Automatic shape";

If you still find the issue, then please provide us a demo console application with the template file that should help us to reproduce the issue on our end.

Thanks.

Thank you very much for your support.
I was able to reproduce the problem. The problem is not the source code but theVisio file.

I have older Visio files from Visio 2010 as a vsd file. I then converted these files to vsdx files a few years ago with Visio 2019. I can work with them normally in Visio without any problems. But Aspose.Diagram cannot access the actions of these old vsdx files converted to Visio 2019.

I have attached a sample file. Please try to access the actions with this source code:

Diagram diagram = new Diagram("ActiontestCopy2.vsdx");   
 Aspose.Diagram.Page firstPage = diagram.Pages[0];
    Aspose.Diagram.Shape shape = firstPage.Shapes[0];

    foreach (Aspose.Diagram.Act act in shape.Acts)
    {   
        Console.WriteLine("Act Name: " + act.Name);
        Console.WriteLine("Act Menu: " + act.Menu.Value);
    }

Accessing the actions of this file with Aspose.Diagram only works if I make any change to the actions and re-save the vsdx file. Probably Visio then saves the actions correctly in contrast to the conversion from Visio 2010 to 2019 at that time.
However, I have a lot of Visio files with actions, which I would now have to touch manually so that Aspose can read the actions. Do you have the possibility to have a look at the problem? Maybe you can find a solution so that I don’t have to edit every Visio file manually.
ActiontestCopy2.zip (41,1 KB)

@sgruth

Thanks for the template file and sample codes.
For this file, shape’s act is in the shape’s master, We will provide the InheritActs interface in the upcoming release 25.3 to obtain the actions for the shape inheritance by the master shape.
For this file, you can temporarily do it this way:
foreach (Aspose.Diagram.Act act in shape.MasterShape.Acts)
{
Console.WriteLine("Act Name: " + act.Name);
Console.WriteLine("Act Menu: " + act.Menu.Value);
}

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53693

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thank you very much, that helps me!

@sgruth
Thanks for following the suggested workaround and good know that your issue is sorted out now.
Should you have further queries or issue,Please feel free to write us back, we will assist you soon.

The issues you have found earlier (filed as DIAGRAMNET-53693) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou