PS编程模型中有PsMiscTool类可以实现这些目地。
样例代码如下(VB.NET代码,可容易地改为C#):
Shared Sub Example_ObjectCopy() Dim Tool As New PsMiscTools Dim Sel As New PsSelection Dim Matrx As New PsMatrix Dim Id As Long Id = Sel.PickObject("Select the object to be copied!") Matrx.SetToTranslation(New PsVector(200, 0, 0)) Tool.ObjectCopy(Id, Matrx) End Sub Shared Sub Example_ObjectMove() Dim Tool As New PsMiscTools Dim Sel As New PsSelection Dim Matrx As New PsMatrix Dim Id As Long Id = Sel.PickObject("Select the object to be moved!") Matrx.SetToTranslation(New PsVector(200, 0, 0)) Tool.ObjectTransformBy(Id, Matrx) End Sub