Results 1 to 7 of 7

Thread: Increase screen updating while program is running

  1. #1
    I could stop if I wanted to
    Join Date
    2012-11
    Location
    Brisbane, Australia
    Posts
    239
    Login to Give a bone
    0

    Default Increase screen updating while program is running

    Is there a way to change the rate in which your screen refreshes so you can watch your program run more smoothly instead of couple second increments?

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Increase screen updating while program is running

    What version are you running? What are you doing when you notice this, zooming, twisting a view, maybe rotation objects? Are you using View Transitions?

  3. #3
    I could stop if I wanted to
    Join Date
    2012-11
    Location
    Brisbane, Australia
    Posts
    239
    Login to Give a bone
    0

    Default Re: Increase screen updating while program is running

    I am running 2015 but we use versions 2013-2015 at out company.
    the program is mainly inserting points and drawing lines but it is so slow that you see it 100 points every 3 seconds.
    I am not sure what view transitions are.

    The program just does stuff on the screen without moving the view.

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Increase screen updating while program is running

    View transitions are one possibility. Enter VTOPTIONS at the command line. If "Enable animation…" boxes are checked in the dialog box AutoCAD will slow those actions down so you can see what's happening.

    It sounds like the program you mentioned is causing this though. What program is it? Is it a lisp routine you can post so we can debug it for you?

  5. #5
    I could stop if I wanted to
    Join Date
    2012-11
    Location
    Brisbane, Australia
    Posts
    239
    Login to Give a bone
    0

    Default Re: Increase screen updating while program is running

    I tried playing with the VTOptions and it didnt seem to make a difference.

    The code as it stands now only works under specific set of circumstances.
    I have pasted the main loop which is really choppy.
    Code:
    (while (= LoopBreak nil)
    	  	(setq 	LoopBreak 	"T")
    		(foreach Trail TrailList 
    			(setq 	i2 0
    					dist 0
    					Tdist 0
    					Visited	(cons CurrentPoint Visited)
    			)
    			(if (> (length Trail) 1)
    				(repeat (- (length Trail) 1)
    					(setq 	i2 		(+ i2 1)
    							dist 	(distance (nth (- i2 1) Trail) (nth i2 Trail))
    							TDist	(+ TDist dist)
    					)
    				)
    			)
    			(setq LoopBreak	(if (< TDist (+ MaxRadius (* Increment 20))) nil "T"))
    			(progn
    				(setq	CurrentPoint	(nth 0 Trail)
    						Frontier		(vl-remove CurrentPoint Frontier)
    						i1				1
    						TrailList		(if (member Trail TrailList) (vl-remove Trail TrailList) TrailList)
    				)
    				(repeat 8
    					(setq	FrontierProposed
    								(cond	((= i1 8)	(list (nth 0 CurrentPoint)						(+ (nth 1 CurrentPoint) Increment)			(nth 2 CurrentPoint)))
    										((= i1 7)	(list (+ (nth 0 CurrentPoint) Increment) 		(nth 1 CurrentPoint)						(nth 2 CurrentPoint)))
    										((= i1 6)	(list (nth 0 CurrentPoint)						(- (nth 1 CurrentPoint) Increment)			(nth 2 CurrentPoint)))
    										((= i1 5)	(list (- (nth 0 CurrentPoint) Increment) 		(nth 1 CurrentPoint)						(nth 2 CurrentPoint)))
    										((= i1 4)	(list (+ (nth 0 CurrentPoint) Increment) 	(+ (nth 1 CurrentPoint) Increment)		(nth 2 CurrentPoint)))
    										((= i1 3)	(list (+ (nth 0 CurrentPoint) Increment) 	(- (nth 1 CurrentPoint) Increment)		(nth 2 CurrentPoint)))
    										((= i1 2)	(list (- (nth 0 CurrentPoint) Increment) 	(- (nth 1 CurrentPoint) Increment)		(nth 2 CurrentPoint)))
    										((= i1 1)	(list (- (nth 0 CurrentPoint) Increment)	(+ (nth 1 CurrentPoint) Increment)		(nth 2 CurrentPoint)))
    								)
    							tempfrontier	frontier
    							Frontier	(if (and (= nil (member FrontierProposed Visited)) (= nil (member FrontierProposed Frontier)))
    											(if (ClashDetection CurrentPoint FrontierProposed)
    												Frontier
    												(cons FrontierProposed Frontier)
    											)
    											Frontier
    										)
    							TrailList	(if (and (= nil (member FrontierProposed Visited)) (= nil (member FrontierProposed tempFrontier)))
    											(if (ClashDetection CurrentPoint FrontierProposed)
    												TrailList
    												(cons (cons FrontierProposed Trail) TrailList)
    											)
    											TrailList
    										)
    							HosePaths	(if (and (> Tdist IntRadius) (< Tdist ExtRadius))	
    											(if (and (= nil (member FrontierProposed Visited)) (= nil (member FrontierProposed tempFrontier)))
    												(if (ClashDetection CurrentPoint FrontierProposed) 
    													HosePaths
    													(cons (cons FrontierProposed Trail) HosePaths)
    												)
    												HosePaths
    											)
    											HosePaths
    										)
    							i1			(+ i1 1)
    					)
    				)
    				(if (< TDist IntRadius) (command "clayer" "InternalDots" "point" currentpoint) nil)
    				(if (and (> Tdist IntRadius) (< Tdist ExtRadius)) (command "clayer" "ExternalDots" "point" currentpoint))
    				(if (and (> TDist ExtRadius) (< TDist IntMaxRadius)) (command "clayer" "SprayDots" "point" currentpoint) nil)
    				(if (and (> Tdist IntMaxRadius) (< Tdist MaxRadius)) (command "clayer" "ExternalDots" "point" currentpoint))
    			)
    		)
    	)

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Increase screen updating while program is running

    Using the command function to both change layer and draw each point is the problem. To speed it up you need to either entmake the points or use vla-AddPoint then modify the points layer. It will place them using the WCS though. I'm guessing this was written by someone using a UCS.

  7. #7
    I could stop if I wanted to
    Join Date
    2012-11
    Location
    Brisbane, Australia
    Posts
    239
    Login to Give a bone
    0

    Default Re: Increase screen updating while program is running

    Thanks Tom.
    I used command specifically for speed of programming.
    I will look into subbing it out for more efficient code.

Similar Threads

  1. Force Screen Updating while LISP running
    By mailmaverick361505 in forum AutoLISP
    Replies: 5
    Last Post: 2013-12-12, 06:28 PM
  2. Indicate the program is running
    By bowtle in forum AutoLISP
    Replies: 5
    Last Post: 2010-01-24, 11:00 PM
  3. How do I determine if a program is running
    By ccowgill in forum AutoLISP
    Replies: 3
    Last Post: 2009-10-30, 05:40 PM
  4. My program is not running properly, But W H Y ??
    By rajat_bapi_mallick in forum AutoLISP
    Replies: 10
    Last Post: 2007-10-12, 11:47 AM
  5. Point Array while running program
    By avinash00002002 in forum VBA/COM Interop
    Replies: 1
    Last Post: 2006-06-15, 05:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •