Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to get dialog content with COM Interop?

New Here ,
Feb 06, 2023 Feb 06, 2023

I'm using a COM Object to open an EPS file, which was created by a newer version of Illustrator than the one I'm using. I want to get the content of Dialogs similar to this to save, how do I do it.

Bac2829161533h4_0-1675750085303.png

 

using Illustrator;
using System;

internal class Program
{
    private static void Main(string[] args)
    {

        Application app = GetIllustrator();

        Console.WriteLine("open file");

        Document doc = app.Open("Z:\\greater-than-current-version.eps");
        
        Console.WriteLine("open done");
    }

    private static Application GetIllustrator()
    {
        while (true)
        {
            try {
                Application app = new()
                {
                    //UserInteractionLevel = AiUserInteractionLevel.aiDisplayAlerts

                };

                return app;
            } catch (COMException e) {
                Thread.Sleep(500);
            }
        }
    }
}

 

TOPICS
Feature request , Scripting , Tools
165
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Adobe