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

Export Art as .ai file

Community Beginner ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

Hello there,

 

I'm actually trying to get the artSet and I want to write .ai file with it ! 

AIArtSet artSet = NULL;

error = sAIArtSet->NewArtSet(&artSet);

sAIArtSet->SelectedArtSet(artSet);


AIRasterizeSettings rastSettings;

AIArtHandle tempRaster = 0;

AIArtHandle layerGroup = 0;

error = sAIArtSet->IndexArtSet(artSet, 0, &layerGroup);

AIRealRect bounds;

error = sAIRasterize->ComputeArtBounds(artSet, &bounds, false);

rastSettings.type = kRasterizeRGB;

rastSettings.resolution = 300;

rastSettings.antialiasing = 2;

rastSettings.options = kRasterizeOptionsNone;

error = sAIRasterize->Rasterize(artSet, &rastSettings, &bounds, kPlaceInsideOnTop, layerGroup, &tempRaster, 0);

ai::FilePath ioFilePath(ai::UnicodeString(path));

AIDataFilter* dstfilter = NULL;

AIDataFilter* filter = NULL;

error = sAIDataFilter->NewFileDataFilter(ioFilePath, "write", 'prw', 'ai', &filter);

error = sAIDataFilter->LinkDataFilter(dstfilter, filter);

dstfilter = filter;

 

 

But I don't know what to do next :0

TOPICS
Import and export , Scripting , SDK

Views

105

Translate

Translate

Report

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