I have some code that looks like this:
public void Create(Shape selectedShape) {
selectedShape.Name = "SourceShape";After this I find that the Name is still "". What can I do to set the name? I have even tried to make a duplicate of the image and set the name on the duplicate and that doesn't work either.selectedShape is coming from Document.ActiveSelection. Any ideas? I am using CorelDraw X8.
I created a quick docker with a single button that renames the shape. Here is my code for the button:
private void Button_Click(object sender, RoutedEventArgs e) { corel.Shape s = corelApp.ActiveShape; s.Name = "My New Name"; }
This worked correctly, the shape was given the new name. I am using X8 version 18.1.0.661
Hope that helps,
-Shelby