Skip navigation
Currently Being Moderated

Problem in applying reflection using action manager.

Jul 30, 2012 12:18 AM



I am trying to use reflection on some art using action manager. On clicking a menuitem, I am applying the reflection.

When I am not using kAIReflectSelectionAboutDXKey and kAIReflectSelectionAboutDYKey parameter it works fine.

But providing the value for the above key not working on first time when menu-item is clicked.

It says "Can't reflect the objects. The requested transformation would make some objects fall completely off the drawing area." But clicking again on menu-item, it works.


When I debug the code, I found the error code "1346458189" (PARM : kBadParameterErr).

How the same code is working on subsequent click on menu-item.


Please Help!

Here is my code snippet


AIErr error;


AIActionParamValueRef actionParam;


//create a new action param value.

error = sAIActionManager->AINewActionParamValue(&actionParam);

error = sAIActionManager->AIActionSetUnitReal(actionParam, kAIReflectSelectionAngleKey, unitAngle, (AIReal)90.0);

error = sAIActionManager->AIActionSetReal(actionParam, kAIReflectSelectionAboutDXKey, 297.0);

error = sAIActionManager->AIActionSetReal(actionParam, kAIReflectSelectionAboutDYKey, 420.0);

error = sAIActionManager->AIActionSetBoolean(actionParam, kAIReflectSelectionObjectsKey, true);

error = sAIActionManager->AIActionSetBoolean(actionParam, kAIReflectSelectionCopyKey, true);

error = sAIActionManager->AIActionSetBoolean(actionParam, kAIReflectSelectionPatternsKey, true);

error = sAIActionManager->PlayActionEvent(kAIReflectSelectionAction, kDialogOff, actionParam);








More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points