Specifies the plot style name for an object, group of objects, or layer.
Supported platforms: Windows only
VBA:
object.PlotStyleName
Type: All drawing objects, AttributeReference, Dimension, Group, Layer, MLeaderLeader, SubDMeshEdge, SubDMeshFace, SubDMeshVertex, SubEntity, SubEntSolidEdge, SubEntSolidFace, SubEntSolidNode, SubEntSolidVertex
The objects this property applies to.
Read-only: No; except the Group object which is write-only
Type: String
The plot style name for the object.
No additional remarks.
VBA:
Sub Example_PlotStyleName()
' This example creates a circle in model space and then
' finds the current PlotStyleName for the circle.
Dim circleObj As AcadCircle
Dim centerPoint(0 To 2) As Double
Dim radius As Double
' Define the circle
centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
radius = 5#
' Create the Circle object in model space
Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
ZoomAll
' Find the PlotStyleName for the circle
MsgBox "The current PlotStyleName for the circle is " & circleObj.PlotStyleName
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_PlotStyleName()
;; This example creates a circle in model space and then
;; finds the current PlotStyleName for the circle.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the circle
(setq centerPoint (vlax-3d-point 0 0 0)
radius 5)
;; Create the Circle object in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq circleObj (vla-AddCircle modelSpace centerPoint radius))
(vla-ZoomAll acadObj)
;; Find the PlotStyleName for the circle
(alert (strcat "The current PlotStyleName for the circle is " (vla-get-PlotStyleName circleObj)))
)