Change an Object's Layer
 
 
 

Once you have created an object and assigned layer, color, and linetype properties to it, you may wish to change the object's layer. Changing an object's layer is useful if you accidentally create an object on the wrong layer or decide to change your layer organization later.

To change an object's layer, use the Layer property provided for that object. The Layer property takes the name of the layer as input.

Move an object to a different layer

This example creates a circle on the active layer and then creates a new layer called “ABC”. It then moves the circle to the new layer.

Sub Ch4_MoveObjectNewLayer()
	' Create a circle
	Dim circleObj As AcadCircle
	Dim center(0 To 2) As Double
	Dim radius As Double
	center(0) = 2: center(1) = 2: center(2) = 0
	radius = 1
	Set circleObj = ThisDrawing.ModelSpace. _
						AddCircle(center, radius)


	' Create a new layer called "ABC"
	Dim layerObj As AcadLayer
	Set layerObj = ThisDrawing.Layers.Add("ABC")


	' Assign the circle to the "ABC" layer
	circleObj.Layer = "ABC"
	circleObj.Update
End Sub

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.