Modify Dimension Properties Example (VBA)
This example shows how to modify the properties of a selected dimension.
'----------------------------------------------------------------------------
' Preconditions:
' 1. Open a model document with a dimension.
' 2. Select the dimension.
'
' Postconditions: The properties of the selected dimension are modified
' as specified.
' ---------------------------------------------------------------------------
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim boolstatus As Boolean
Option Explicit
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus =
Part.EditDimensionProperties3(1, 0, 0, "", "", True, 9, 2, True, 1, 1, "", "",
True, "", "", True, 1, "")
Part.ClearSelection2 True
End Sub