Manny, thank you for actually posting a question I know something about! I've been researching this for a mod I'm making. You made me so happy!
Ok, what Di0 said is correct, sometimes the actual Anim Event will have a slightly different name than the "Idle Animation". For instance, if you wanted to play "IdleBookSitting_Reading" via SendAnimationEvent, it wouldn't work, because that anim event is actually called "ChairReadingStart". These names can be found in the CK by going to Gameplay (up in the file menu) > Animations > Actors\Character\Behaviors\0_Master.hkx > LOOSE and look at where it says "Anim Event". Like others have said, if there's a corresponding "End" or "Exit" animation event for the one you want to use, that may be your solution.
But how to get ANY animation to stop playing? I'm working on this currently myself, and the best way I've found to do it, is to send another animation event called "IdleStop_Loose". This seems to stop any current animation and return the player to the normal idle state. I plan to make it work by using RegisterForControl("Move") right after playing the animation, and OnControlDown() send the idle stop, and quickly un-register for control. No idea if it will work or not, as I have yet to test it in game. My fear is that the unregister won't be fast enough and weird stuff will happen, but we'll see!
I'm sure you've figured out that PlayIdle doesn't work sometimes because the Idles all have conditions tied to them, which is probably why you're using SendAnimationEvent. I'm including my conditions I run before using SendAnimationEvent to prevent unexpected behavior, in case they're helpful.
Spoiler ; Get equipped items so we can check for torch
Int lefthand = PlayerRef.GetEquippedItemType(0)
Int righthand = PlayerRef.GetEquippedItemType(1)
; Make sure character isn't seated before playing animation
If (PlayerRef.GetSitState() != 0)
Debug.Notification("Stand up first")
; Make sure character isn't on horse before playing animation
ElseIf PlayerRef.IsOnMount()
Debug.Notification("Dismount first")
; Make sure character doesn't have torch out
ElseIf (lefthand == 11 || righthand == 11)
Debug.Notification("Unequip torch first")
; Make sure weapons are sheathed before playing animation
ElseIf PlayerRef.IsWeaponDrawn()
Debug.Notification("Sheathe weapons first")
; Play the animation
Else
SendAnimationEvent(PlayerRef, "YourAnimEvent")
EndIf
Finally, in case you didn't know, this has been super helpful for me: You can send animation events using the console, by clicking on your character and typing "SAE ChairReadingStart" or whatever the name of the anim event is, minus the quotes. SAE = SendAnimationEvent to the console. Super helpful for testing in game.