Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
this is how i used to do:
AIErr result = kNoErr;
AIActionParamValueRef valueParameterBlock = NULL;
ActionDialogStatus dialogStatus = kDialogOff;
try
{
result = sAIActionManager->AINewActionParamValue(&valueParameterBlock);
aisdk::check_ai_error(result);
if (valueParameterBlock)
{
result = sAIActionManager->AIActionSetString(valueParameterBlock, kAIExportDocumentFormatKey, "param");
aisdk::check_ai_error(result);
result = sAIActionManager->AIActionSetString(valueParameterBlock, kAIExportDocumentExtensionKey, "param");
aisdk::check_ai_error(result);
result = sAIActionManager->AIActionSetString(valueParameterBlock, kAIExportDocumentNameKey, "param");
aisdk::check_ai_error(result);
result = sAIActionManager->PlayActionEvent(kAIExportDocumentAction, dialogStatus, valueParameterBlock);
aisdk::check_ai_error(result);
result = sAIActionManager->AIDeleteActionParamValue(valueParameterBlock);
aisdk::check_ai_error(result);
}
}
catch(ai::Error& ex)
{
result = ex;
}
return result;
ps: param is the value!
Copy link to clipboard
Copied
Hi,
Im new to the illustrator. I want to play the action from sdk which already recorded. When searching, got ur code snippet. When i use tat it says some error for aisdk::check_ai_error(result); ....
error C2653: 'aisdk' : is not a class or namespace name
error C3861: 'check_ai_error': identifier not found, even with argument-dependent lookup
Can understood aisdk::check_ai_error(result) is for exception... But it says some error... Have to add any header file or namespace for this?...
Then i don't know which type of value have to pass for exportDocument... Pls could u explain about tat and can give code with values (param) for tat?
Thanks in advance.
Sudha
Copy link to clipboard
Copied
aisdk is a namespace declares in a header file from the sdk. You could find it here:
\Adobe_Illustrator_CS3_SDK\samplecode\SnippetRunner\Source\SDKErrors.h
this throws exception if the given error code is non zero. Only for exceptions handling.
You could implement our own method for error handling. If error code is non-zero, do somthing.
But if you want to use this header anyway, you just have to include it.
First of all, you must retrieve all parameters from your recorded action.
Just take a look at aiactiomanager.h for setting correctly params for methods you will use.
Thomas
ps: http://forums.adobe.com/thread/423942?tstart=0 for retrieving action params, type and value.
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now