I have tried to automate the CHSPACE command in the past and it has proved difficult. The command requires a selection set and it also requires you to be inside a viewport to make the selection. It is far easier to just transform the entities using the .TransformBy method of the entity and let .NET move it for you.
Going from paperspace to model space is easy as it is a 1:1 relationship. There is only 1 point in model space that matches up with the point in paperspace. Going from modelspace to paperspace is not as easy as there could be an unlimited amount of viewports so it is not a 1:1 relationship. So you need a transform that is specific to your viewport. You should already have the viewport somewhere in your code as the CHSPACE command requires it or at least requires that you be in model space inside a viewport in order to work.
You could then use the code below to get the model to paperspace transform. If you search the autocad help files you will find this code in there somewhere.
/// <summary>
/// Gets the model to paper transform.
/// </summary>
/// <param name="viewport">The viewport.</param>
/// <returns>A Matrix3d.</returns>
/// <exception cref="System.NotSupportedException">Perspective views not supported</exception>
public static Matrix3d GetModelToPaperTransform(this Viewport viewport)
{
if (viewport.PerspectiveOn)
{
throw new NotSupportedException("Perspective views not supported");
}
Point3d center = new Point3d(viewport.ViewCenter.X, viewport.ViewCenter.Y, 0.0);
return Matrix3d.Displacement(new Vector3d(viewport.CenterPoint.X - center.X, viewport.CenterPoint.Y - center.Y, 0.0))
* Matrix3d.Scaling(viewport.CustomScale, center)
* Matrix3d.Rotation(viewport.TwistAngle, Vector3d.ZAxis, Point3d.Origin)
* Matrix3d.WorldToPlane(new Plane(viewport.ViewTarget, viewport.ViewDirection));
}
Now you can just transform the entity by the resulting matrix and then add it to the layout that contains the viewport.