Assigning to Diagram.Shape with various properties

  1. How can I assign values to a shapes within another shape?

    2. When I assign text to a rectangle… the value is in the rendered rectangle… yet the text is not visible. Once I double click in the rectangle… I can see the text.




Hi,


Thank you for contacting support. We need to know the relationship of these two shapes. If one of them is a sub-shape, then you can iterate through the sub shapes to set any shape’s text. Please refer to this help topic: Connect Sub-Shapes of the Groups

If this does not help, then please send us your source drawing and code for the testing purposes. We shall investigate and reply you appropriately.

Solution to my issue follows below with a follow on question.

Solution:
foreach(Shape innerShape in shape.Shapes){
if(innerShape.Name == "ABC);
innerShape.Text.Value.Add(new Txt(model.field1);

}

Follow on Question:
Issue:
The text rendered in the shapes displays halfway out of the shape. If I lasso all the shapes and slightly adjust the width then… the text displays correctly.
Question: What property can I use to remedy this issue (e.g. refresh…);

Hi,


Thank you for the inquiry. Please refer to this help topic: Setting Width and Height of a Shape. In case this does not help, then please let us know the Width property which you are modifying. You may take a screenshot and share in this forum thread.