i have code to dinamic block using hatch but while distance1 is changed and angle1 is changed
my hatch can not update distance1 and angle1
please help every body
Code:
Sub test1()
Dim j As String, Sudut As Double, jarak As Double
Dim a As AcadBlockReference
jarak = ThisDrawing.Utility.GetString(1, vbCrLf & "Masukkan Jarak: ")
x = ThisDrawing.Utility.GetPoint(, "Klik titik awal")
jarak = CDbl(jarak)
Sudut = Atn(1)
Set a = ThisDrawing.ModelSpace.InsertBlock(x, "a1", 1, 1, 1, 0) 'a1 ganti dengan nama blokc
If a.IsDynamicBlock = True Then
Props = a.GetDynamicBlockProperties
For Index = LBound(Props) To UBound(Props)
Set prop = Props(Index)
If prop.PropertyName = "Distance1" Then
prop.Value = jarak
ElseIf prop.PropertyName = "Angle1" Then
prop.Value = Sudut
End If
ThisDrawing.Regen acAllViewports
Next Index
End If
End Sub