1 Reply Latest reply on Jun 11, 2018 9:28 AM by zhengf57511152

    Problem on hiding paintField (AIArtStyleParserSuite::SetPaintFieldVisible)

    zhengf57511152 Level 1

      Hi, I'm coding with Illustrator SDK CC 2015 on Visual Studio 2013. I had a problem processing multiple strokes on a PathArt. When I try to hide one of the strokes, I found that the most appropriate function AIArtStyleParserSuite::SetPaintFieldVisible didn't take effect at all. It was not working on the SnippetRunner sample in the SDK either. Attached is the code. When I call GetPaintFieldVisible right after setting visible=false, the output of visible is true. Could anyone please tell me the possible reason?

       

      AIBoolean visible = false;
      sAIArtStyleParser->SetPaintFieldVisible(artStyle, paintField, visible);
      sAIArtStyleParser->GetPaintFieldVisible(paintField, &visible);
      of << "visible " << i << " " << visible << endl;
      
        • 1. Re: Problem on hiding paintField (AIArtStyleParserSuite::SetPaintFieldVisible)
          zhengf57511152 Level 1

          Just fixed the problem myself... For single path, use SetParserPaintFieldVisible instead of SetPaintFieldVisible

          Also need create new art style and apply to the pathart.

           

          However, it seems GetPaintFieldVisible still don't work right after hiding the path. I guess it requires another call to get paintField from the new artStyle and parser.

           

          AIBoolean visible = false;

          sAIArtStyleParser->SetParserPaintFieldVisible(paintField, visible);

          error = sAIArtStyleParser->CreateNewStyle(parser, &artStyle);

          error = sAIArtStyle->SetArtStyle(artHandle, artStyle);

          sAIArtStyleParser->GetPaintFieldVisible(paintField, &visible);

          of << "visible " << i << " " << visible << endl;