Hi,
Hi,
shape1.getXForm().getHeight().getUfe().setF(<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 0);”>“GUARD(TEXTHEIGHT(TheText,Width))”<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>);
Thanks.
Hi,
asthac:The shape is enlarged as per text height but it always returns default height value of - 0.18888888888888888
asthac:Isn’t there an easier approach like setting it set from the stencil itself.When dopping a shape manually or via automation on Visio, the formula remains intact, so cant the same thing be provided via Aspose as well?
String visioStencil = dataDir + “XANFLOWCHARTNEW.vss”;<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>Diagram diagram = <span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>new<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> Diagram(visioStencil);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>for<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> (Master master : (Iterable) diagram.getMasters())<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
{<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
<span class=“kwrd” style=“color: rgb(0, 0, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>if<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>(master.getName() == “Process”)<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
{<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
master.getPageSheet().getXForm().getWidth().getUfe().setF(“GUARD(TEXTWIDTH(TheText,Height))”);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
master.getPageSheet().getXForm().getHeight().getUfe().setF(“GUARD(TEXTHEIGHT(TheText,Width))”);<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
}<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>
}
Hi,
Hi,
Hi,
asthac:The above approaches of modifying the stencil and then using it to avoid setting the formula again - do not work for me.My point still remains the same-when shapes dropped via automation or manually on Visio from the same stencil, then formula is maintained, then why not via aspose?Why using Aspose, we have to explicitly set this formula when it is already present in thestencil.
Verified the fix for DIAGRAMJAVA-50492 in the hotfix version.
Hi,
Your welcome.
Hi,
DIAGRAMJAVA-50492: Maintain height and width formula of a shape dropped from stencil
This was fixed and released in Aspose v17.6.
However, it is again broken in v17.7
Problem is that width formula of any shape in the shape transform is not maintained and is again set as hardcoded value.
This applies to all the shapes and is not specific to just loop limit shape.
Please check.
Thanks,
Astha
@asthac,
We have re-evaluated your ticket ID DIAGRAMJAVA-50492 with the latest version 17.7 of Aspose.Diagram for Java API. We can see the height and width formulas in the shapesheet of the VSDX drawing. This is the output VSDX drawing: Output17.7.zip (79.2 KB). However, if you can reproduce the same problem of hard-coded values, then kindly share the complete details of the use case. We will investigate and share our findings with you.
Best Regards,
Imran Rafique
PFA the test case for hardcoded Width in shape transform section of shapesheet
(With v17.7 of Aspose.Diagram for Java API).
WidthFormulaNotInherited.zip (153.3 KB)
Thanks.
@asthac,
We managed to replicate the problem of the missing width formula of the shapes. It has been logged under the ticket ID DIAGRAMJAVA-50525 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates. We are sorry for the inconvenience caused.
Best Regards,
Imran Rafique