We have further investigated about your requirements. Please use following code snippet to catch ‘No Formula’ value:
if (prop.Type.Ufe.F == "No Formula") {
// do your work
}
We regret to share that we may not be able to implement this functionality as;
“No Formula” means that there is no formula in this prop’s value;
such as <Cell N='Type' V='0' F='No Formula'>
And “0” means that the formula of the prop’s value is “0” but it’s type value is 0.
such as <Cell N='Type' V='0' F='" 0"'>
Our other users who are already working with existing enum, may face other issues if we implement this. However, above shared code snippet can fulfill your requirements. In case you have further concerns, please feel free to let us know.
Hi! The
if (prop.Type.Ufe.F == “No Formula”) {
// do your work
}
call would be perfectly fine, however it does not appear to work. I am not able to get inside the condition. Do i need to update my version of the library? I do not see a new release available via NuGet.
As a small question, is there a reason that shape.InheritProps is NOT in the same order as the props on the shape sheet? What order it is in, i can’t seen to see a pattern.
Is there a way to add a property on each prop that indicates it’s line ID? I would like to be able to order the props list based on the order in which they appear in the shapesheet.
Hi! I’m having another issue. When trying to access custom props for a shape, I am trying to write out information about those shapes. For example shape.prop.Value.Val. I get the value in that cell when it is a string, however when it is an int, I get back an empty string instead of the value. Please see attached to see an example of the document I am working work. I am trying to access the value 98 on the ExecutionOrder prop on shape #1. Aspose_Test.zip (286.8 KB)
Could you please try the scenario using Aspose.Diagram for .NET 19.4 as we have tested with it and found no issue. The value was returned correctly using following code snippet:
Aspose.Diagram.Diagram diagram = new Diagram.Diagram(dataDir + "Aspose_Test.vsd");
Aspose.Diagram.Page page = diagram.Pages[0];
Aspose.Diagram.Shape shape = page.Shapes.GetShape(1);
var val = shape.Props[0].Value.Val;
Hi! I am using version 19.4 for .NET. I can easily get the Value of the prop when that value is a string. However in the instance of prop.ExecutionOrder, the value is 98. I cannot get that value back with Value.Val, I am simply returned an empty string, “”.
Hi! I also ran into an issue when getting the PinY and Height of a shape. I am looking at shape.XForm.Height.Ufe.F looking to get back the formula. However when I try to get the PinY and Height, I get “Inh” returned to me rather than the formula. PinX and Width however DO return the formula. Do you have any idea what is happening there?
We were able to notice the issue in our environment while checking the values of Shape.InheritProps. However, when we tried Shape.Props, the integer value for ExecutionOrder label was returned correctly. You may please try using previously shared code.
We have logged an issue as DIAGRAMNET-51638 in our issue tracking system for InheritProps related behavior and will let you know as soon as we have any update regarding its investigation.
Regarding above issue, we were also able to replicate this in our environment and for further investigation, it has been logged under the ticket ID DIAGRAMNET-51639 in our issue tracking system. We will surely keep you posted with its rectification status. Please spare us little time.
Hi! Thanks for the response. The reason I am looping through shape.InheritProps instead of shape.Props is because of a previous recorded issue I brought up regarding shape.Props. I noticed that shape.Props only returns SOME of the shape properties, but not all. For example on Shape #1, there are 20 properties. When I call shape.Props i only get 7 (not sure of the exact number), versus all 20. So that’s why I’m looping through shape.InheritProps, not shape.Props. So although it may work on shape.Props it does not work on shape.InheritProps. I’m not attached to HOW I get the props of a shape. I just want to get all of the props and all of the prop info. thanks!