DimStyles Property (ActiveX)

Gets the DimStyles collection for the document.

Supported platforms: Windows only

Signature

VBA:

object.DimStyles
object

Type: Database, Document

The objects this property applies to.

Property Value

Read-only: Yes

Type: DimStyles

The DimStyles collection for the document.

Remarks

No additional remarks.

Examples

VBA:

Sub Example_DimStyles()
    ' This example adds a new dimension style.
    Dim dimStyle As AcadDimStyle
    Set dimStyle = ThisDrawing.DimStyles.Add("TEST")
    MsgBox "A new dimension style called " & dimStyle.name & " has been added to the Dimstyles collection.", vbInformation, "Dimstyles Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_DimStyles()
    ;; This example adds a new dimension style.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    (setq dimStyle (vla-Add (vla-get-DimStyles doc) "TEST"))
    (alert (strcat "A new dimension style called " (vla-get-Name dimStyle) " has been added to the Dimstyles collection."))
)