mardi 26 septembre 2023

Automate a task of editing cdr files in c# using corel draw type library

I have nearly 200 cdr files with some shapes containing in it also I have a list of names. Shapes can be nested like rectangle inside rectangle.
I want to generate a new copy of that file with a name from the list in each of the group of shapes(text should be in innermost shape).
Then I have to save that file as svg.

here is what i have tried so far but I am not able to get a way what to do after this.

I used the Coreldraw type library and I am able to open the cdr file but I am not able to figure out which property of the document in corelDraw I should look to get the shapes.
previous questions also did not help me.

Type pia_type = Type.GetTypeFromProgID("CorelDRAW.Application");
            Application app = Activator.CreateInstance(pia_type) as Application;
            app.Visible = true;

            Document document = app.OpenDocument(@"Path_To_Cdr");




Aucun commentaire:

Enregistrer un commentaire