i need to mirror some entity around then x-axis and the function work.
But when list entity i can see that the UCS is 0,0,-1 and this is incorrect.
Some hlep?
Many thank's
GPaolo
Public Function MirrorCopyEnt(ByVal objid As AcDb.ObjectId, _
ByVal pref1() As Double, ByVal pref2() As Double, Optional ByVal layer As
String = "-1") As AcDb.ObjectId
Dim tm As DBTransMan = HmDotNet.HmTool.TransactionManager
Dim myT As AcDb.Transaction = tm.StartTransaction
Try
Dim entity As AcDb.Entity = myT.GetObject(objid, AcDb.OpenMode.ForRead,
False)
Dim TrasMat As AcGe.Matrix3d
Dim p1 As AcGe.Point3d = New AcGe.Point3d(pref1(0), pref1(1), pref1(2))
Dim p2 As AcGe.Point3d = New AcGe.Point3d(pref2(0), pref2(1), pref2(2))
Dim LineAxis As AcGe.Line3d = New AcGe.Line3d(p1, p2)
TrasMat = AcGe.Matrix3d.Mirroring(LineAxis)
Dim myent As AcDb.Entity = entity.GetTransformedCopy(TrasMat)
myT.Commit()
Return HmDotNet.HmTool.hmInsEnt(myent)
Catch ex As Exception
MessageBox.Show(ex.Message & " " & ex.ToString)
Finally
myT.Dispose()
End Try
End Function