Center Example

Using Programming Languages other than VBA

Sub Example_Center()

	Dim circObj As AcadCircle
	Dim currCenterPt(0 To 2) As Double
	Dim newCenterPt(0 To 2) As Double
	Dim radius As Double

	' Define the initial center point and radius for the circle
	currCenterPt(0) = 20: currCenterPt(1) = 30: currCenterPt(2) = 0
	radius = 3

	' Create the circle in model space
	Set circObj = ThisDrawing.ModelSpace.AddCircle(currCenterPt, radius)
	ZoomAll
	MsgBox "The center point of the circle is " & currCenterPt(0) & ", " & currCenterPt(1) & ", " & currCenterPt(2), vbInformation, "Center Example"

	' Change the center point of the circle
	newCenterPt(0) = 25: newCenterPt(1) = 25: newCenterPt(2) = 0
	circObj.center = newCenterPt
	circObj.Update

	' Query the results of the new center position
	' Notice the output from the center property is a variant
	Dim centerPoint As Variant
	centerPoint = circObj.center
	MsgBox "The center point of the circle is " & centerPoint(0) & ", " & centerPoint(1) & ", " & centerPoint(2), vbInformation, "Center Example"
End Sub

 

   Comments? 
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@entercad.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.