Message 1 of 16
Stop "sendcommand" to press Enter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In this macro I want to add Diameter Dimension at every circle in the drawing. In each circle it waits for user to press enter at the end and it can't be solved with "vbCr"!
How can I stop it to wait for enter?
Sub CM()
Dim ent As AcadEntity
Dim FullCircle As AcadCircle
Dim CenterPx, CenterPy As String
Dim DimPx, DimPy As String
For Each ent In ThisDrawing.ModelSpace
If TypeOf ent Is AcadCircle Then
Set FullCircle = ent
ThisDrawing.Application.Update
ZoomAll
DimPx = CStr(FullCircle.Center(0) + FullCircle.Radius)
DimPy = CStr(FullCircle.Center(1) + FullCircle.Radius)
ThisDrawing.SendCommand "_AMPOWERDIM_DIA" & vbCr & CenterPx & "," & CenterPy & vbCr & DimPx & "," & DimPy & vbCr & vbCr
End If
Next
End Sub