Pause Autocad Screen update

jalal.mousa
Advocate

Pause Autocad Screen update

jalal.mousa
Advocate
Advocate

Is there a way to pause Autocad screen updating while code running similar to  Application.Interactive

 

'Code Start

'pause screen update

Application.Interactive = False

'do things

'reactivate screen update

Application.Interactive = True

 

0 Likes
Reply
Accepted solutions (1)
540 Views
3 Replies
Replies (3)

ed57gmc
Mentor
Mentor

What are you trying to do? You don't show any code. If you post code, use the </> button.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes

jalal.mousa
Advocate
Advocate
Public Function JointPolyline(ents)
Dim TReg As Variant
Dim i As Long
Dim cuts As Long
 Dim oSS() As AcadEntity
 Dim CutL As Variant



If TypeOf TReg Is AcadRegion Then
	ents = TReg.Explode()
end if


cuts = UBound(ents)
ReDim Preserve oSS(0 To cuts) As AcadEntity

For Each CutL In ents
	 Set oSS(i) = MyDWG.ModelSpace.item(MyDWG.ModelSpace.Count - 1 - i)

	i = i + 1
 Next CutL


 'add plines to group
        Tgroup.AppendItems oSS

        Dim GRname As String
        GRname = Tgroup.Name
         ' using SendCommand method with Group
        MyDWG.SendCommand "J" & vbCr & "G" & vbCr & GRname & vbCr & vbCr
        ' deleting group and clearing selection set
        Tgroup.Delete
        'sset.Clear
   Dim TempTile As AcadLWPolyline
   Set TempTile = MyDWG.ModelSpace.item(MyDWG.ModelSpace.Count - 1)
   TempTile.closed = True

End Sub

Hi Ed,

i attached partial code (hope nothing is missed) , i notice that send command MyDWG.SendCommand "J" & vbCr & "G" & vbCr & GRname & vbCr & vbCr takes more time to join lines (based on API using point), before i used join method by joininig points similar to your proposal in my previous questions by using start and end point but encounter issues as some pointes were acting as start or End  which create mistakes once lines were connected, to avoid checking start or end order i found joining will work easier but slower 

0 Likes

jalal.mousa
Advocate
Advocate
Accepted solution

Hi Ed,

I found solution while i was searching for similar cases

it was solved by you back in 2021

Solved: Re: Turn off redraw - Autodesk Community - AutoCAD

Solved: Re: Turn off redraw - Autodesk Community - AutoCAD

 

0 Likes