4 Replies Latest reply on Feb 7, 2017 11:41 PM by nathans47916809

    How to make Live Paint.

    nathans47916809 Level 1

      Dear Friends,

           Is it possible to Make Live Paint(Object>Live Paint>Make ) by code.

            I  select a compound path,and try the following code to make Live Paint.

            AIActionParamValueRef paramValueRef = NULL;

            sAIActionManager->AINewActionParamValue(&paramValueRef);

           error=sAIActionManager->PlayActionEvent("Make Planet X",kDialogOff,  paramValueRef);

           The PlayActionEvent Method returns error=1346458189.

       

             I don't Know is it correct method to Make Live paint.

       

             Please give your suggesstions to Make Live paint.

       

       

       

       

      Regards

      Nathan.

        • 1. Re: How to make Live Paint.
          btempleton1982 Level 2

          Is "Make Planet X" the actual name of an action? Did you load up your AIActionParamValueRef with any settings?

          • 2. Re: How to make Live Paint.
            nathans47916809 Level 1

            Dear Friend,

            Thank you For Immediate reply,

            I found "Make Planet X"(For Live Paint Make) in Illustrator SDK.

            So I tried it as the name of the action.I did not Know is it Correct or Not.

            I did not load Settings for AIActionParamValueRef.

            I just tried the following code,

                  AIActionParamValueRef paramValueRef = NULL;

                  sAIActionManager->AINewActionParamValue(&paramValueRef);

                 error=sAIActionManager->PlayActionEvent("Make Planet X",kDialogOff,  paramValueRef);

                 The PlayActionEvent Method returns error=1346458189.

            Please give your suggestion to Make Live Paint Groups by Code.

             

             

            Thank you Friend,

            Nathan

            • 3. Re: How to make Live Paint.
              LeoTaro Level 4

              Can't you just use the AILiveEffect suite directly?

              • 4. Re: How to make Live Paint.
                nathans47916809 Level 1

                Dear Friend,

                 

                Thank you For Your Suggestion.

                I have tried sAILiveEffect->AddLiveEffect but there is  no change in My Current document PathArt and CompoundPath Art.

                See the Code Below I have tried,

                AILiveEffectData effectData;

                  AIMenuItemHandle menuHandle = nil;

                    char categoryStr[] = " SDK";

                  char nameStr[] = " Twirl...";

                  effectData.self = message->d.self;

                  effectData.name = nameStr; // Localized name of the effect

                  effectData.title = nameStr;

                effectData.majorVersion = 1;

                  effectData.minorVersion = 0;

                effectData.prefersAsInput = (kGroupInputArt | kPathInputArt | kCompoundPathInputArt);//kAnyInputArt; // AIStyleFilterPreferedInputArtType

                effectData.styleFilterFlags = kPostEffectFilter; // AIStyleFilterFlags

                  AILiveEffectHandle handle;

                  error = sAILiveEffect->AddLiveEffect(&effectData, &handle);

                 

                Please note that error=0;

                 

                Is Any Methods in AILiveEffectSuite Perform equivalent action to Object>Live Paint>Make.

                 

                I want to make closed paths from the Path Arts and Compound Path Arts in my Current document.So I get the Closed Path By Using The Following Steps

                1)Initially i am having 4 connected Lines.But not Closed

                1.JPG

                 

                2)Then I Make Live Paint Groups by using Object>Live Paint>Make.

                2.JPG

                 

                3)Apply Fill For the Art  and Expand the Live Paint by Object>Live Paint>Expand.


                3.JPG

                Finally I got Closed path as my Expectation.

                 

                Is Any Illustrator SDK Methods Available to Perform the Above Operation.

                 

                Please note that My document may have large number of PathArts and Compound Path Arts.My Expectation is to Make Closed Path.

                 

                Please give your Suggestion.

                 

                please note that  I have perform Object>Live Paint>Expand. by using the following Method.

                sAIExpand->Expand(artHandle, kExpandPluginArt, 0);

                 

                Thankyou Friend,

                Nathan.