Rotate Spline Entitie
Posted: 11 Jan 2021, 12:00
Hello again.
In our development we need to rotate the different entities of the design with your help we can already rotate lines, points, arcs, text but there is one that resists us when we have a spline entity we rotate all the points contained in the polypoints structure belonging to the spline and but we do not get these to be rotated in the design.
Best Regards and thank you in advance.
We attach the code we use
'********************************************************************************************
Dim vSpline As CADSpline
Dim n_puntos As Long
vSpline = CType(CADDiseño.CurrentLayout.Entities(h), CADSpline)
n_puntos = vSpline.PolyPoints.Count
For hh = 0 To n_puntos - 1
vSpline.PolyPoints(hh) = DPoint.Rotate(vSpline.PolyPoints(hh), center, False, Angle)
Next
CADDiseño.Converter.Loads(vSpline)
'*********************************************************************************************
'center and Angle are several parameters that are passed to the function so they do not appear declared in the sample code.
In our development we need to rotate the different entities of the design with your help we can already rotate lines, points, arcs, text but there is one that resists us when we have a spline entity we rotate all the points contained in the polypoints structure belonging to the spline and but we do not get these to be rotated in the design.
Best Regards and thank you in advance.
We attach the code we use
'********************************************************************************************
Dim vSpline As CADSpline
Dim n_puntos As Long
vSpline = CType(CADDiseño.CurrentLayout.Entities(h), CADSpline)
n_puntos = vSpline.PolyPoints.Count
For hh = 0 To n_puntos - 1
vSpline.PolyPoints(hh) = DPoint.Rotate(vSpline.PolyPoints(hh), center, False, Angle)
Next
CADDiseño.Converter.Loads(vSpline)
'*********************************************************************************************
'center and Angle are several parameters that are passed to the function so they do not appear declared in the sample code.