TestDiagram.zip (459.0 KB)
I’m trying to create a list of shapes based on a shape in an existing document. I’m getting the shapes created and labeled, but every other shape is filled incorrectly. If you resize any of the shapes they “revert” to the correct color. I’ve also tried setting the fill color explicitly, but get the same behavior.
It seems you’re experiencing an issue with the fill color of copied shapes in your Visio diagram. This can occur due to how the shapes are being copied and added to the page.
To ensure that the fill color is set correctly, you can explicitly set the fill color after copying the shape. Here’s a modified version of your code that sets the fill color for each new shape:
In this code, replace FromArgb(255, 0, 0, 255) with the desired ARGB values for your fill color. This should help maintain the correct color for the shapes even after they are copied. If the issue persists, consider checking if there are any specific properties in the original shape that need to be replicated in the new shapes.
I hadn’t noticed those formulas, but removing them doesn’t change the behavior. Here’s my updated code, including output showing that the formulas are blank:
And here’s an image showing that the fill color isn’t displaying correctly for Product4 (I already resized Product2, so that’s why it’s displaying correctly).
@MikeShepard1
Thanks for the screenshots.
We reproduced the problems you mentioned by running the code.
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-53814
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.
The issues you have found earlier (filed as DIAGRAMNET-53814) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou