**
视口不能通过Entity.TransformBy来进行旋转操作,通过修改Viewport的属性TwistAngle、ViewCenter,同时旋转NonRectClipEntityId实体,达到旋转视口的目的。
**
[CommandMethod("RotateVP")]
public void RotateViewPort()
{
ObjectId viewportId = ObjectId.Null;
while (true)
{
PromptSelectionOptions pso = new PromptSelectionOptions
{
MessageForAdding = "\n请选择视口:",
SingleOnly = true
};
PromptSelectionResult psr = MCommands.CurrentEditor.GetSelection(pso);
if (psr.Status != PromptStatus.OK) return;
foreach (var id in psr.Value.GetObjectIds())
{
if (id.ObjectClass.DxfName.