joeposton
2004-12-06, 09:35 PM
When I use ADDLINE... then use UPDATE... see MODIFICATION IMMEDIATELY...
But when I use SendCommand... then use UPDATE... does not act IMMEDIATELY...
BUT when I go back to the drawing... Modifications are PRESENT...
NEED to have IMMEDIATELY RESULTS for students to see the 2-D generations...
'=========================================================
Private Sub CommandButton4_Click()
' This example adds an DECAGON in model space... 10 SIDES POLYGON...
Dim alineObj As AcadLine
Dim startline(0 To 2) As Double '0=X...1=Y...2=Z
Dim endline(0 To 2) As Double
'================================================
Set acadObj = GetObject(, "AutoCAD.Application") 'Set up old OBJECTS..
Set AcadDoc = acadObj.ActiveDocument 'Set up old DOCUMENTS...
'================================================
' Define data for new DECAGON base (box) '====== Begin at UCS Point =====
ThisDrawing.SendCommand ("_POLYGON 10 e 0 2 ") 'Draws Polygon Perfectly
acadObj.Update 'Will NOT UPDATE
ThisDrawing.Application.ZoomExtents 'ZOOMS PERFECT
'===================END OF PROGRAMMING =======
End Sub
But when I use SendCommand... then use UPDATE... does not act IMMEDIATELY...
BUT when I go back to the drawing... Modifications are PRESENT...
NEED to have IMMEDIATELY RESULTS for students to see the 2-D generations...
'=========================================================
Private Sub CommandButton4_Click()
' This example adds an DECAGON in model space... 10 SIDES POLYGON...
Dim alineObj As AcadLine
Dim startline(0 To 2) As Double '0=X...1=Y...2=Z
Dim endline(0 To 2) As Double
'================================================
Set acadObj = GetObject(, "AutoCAD.Application") 'Set up old OBJECTS..
Set AcadDoc = acadObj.ActiveDocument 'Set up old DOCUMENTS...
'================================================
' Define data for new DECAGON base (box) '====== Begin at UCS Point =====
ThisDrawing.SendCommand ("_POLYGON 10 e 0 2 ") 'Draws Polygon Perfectly
acadObj.Update 'Will NOT UPDATE
ThisDrawing.Application.ZoomExtents 'ZOOMS PERFECT
'===================END OF PROGRAMMING =======
End Sub