I don't think APDL commands work in Rigid Dynamics because that uses a different solver to the core Mechancial APDL solver that is the basis for the Structural models.

You might try running the model in Transient Structural where you can use APDL commands, but the solution time will probably increase greatly.