Thank you for your interest
Explain what's going on in section 4
If you generate a profile and line profile exceeds the limits of the surface
program calculates odd values beyond the boundary. To prevent proposes
adding the ability to indicate or give points on which you should count profile.
In Annex is an example.
I have a suggestion
Maybe it's better to give up the command "acet-ui-progress" because it does not work best in higher versions of AutoCAD
and use something like this:
LISP:
;-------------------------------------------------------------------------------
; ProgressBar - Progress Bar
; Arguments: 3
; Title$ = Dialog title
; Message$ = Message to display
; Delay~ - Percentage of *Speed# variable
; Example: (ProgressBar "Program Message" "Processing information..." 0.5)
;-------------------------------------------------------------------------------
(defun ProgressBar (Title$ Message$ Delay~)
(setq *Delay~ Delay~)
(if (not *Speed#) (Speed))
(setq *Dcl_Id% (load_dialog "war.dcl"))
(new_dialog "ProgressBar" *Dcl_Id%)
(if (= Title$ "")(setq Title$ "AutoCAD Message"))
(if (= Message$ "")(setq Message$ "Processing information..."))
(set_tile "Title" (strcat " " Title$))
(set_tile "Message" Message$)
(setq *X# (1- (dimx_tile "ProgressBar")))
(setq *Y# (1- (dimy_tile "ProgressBar")))
(start_image "ProgressBar")
(vector_image 0 2 2 0 8 )
(vector_image 2 0 (- *X# 2) 0 8 )
(vector_image (- *X# 2) 0 *X# 2 8 )
(vector_image *X# 2 *X# (- *Y# 2) 8 )
(vector_image (- *X# 2) *Y# *X# (- *Y# 2) 8 )
(vector_image (- *X# 2) *Y# 2 *Y# 8 )
(vector_image 2 *Y# 0 (- *Y# 2) 8 )
(vector_image 0 (- *Y# 2) 0 2 8 )
(end_image)
(setq *Inc# 0 *Xpt# -4)
(princ)
);defun ProgressBar
;-------------------------------------------------------------------------------
; Progress - Move the Progress Bar
;-------------------------------------------------------------------------------
(defun Progress (/ Complete$)
(setq *Inc# (1+ *Inc#))
(if (= (rem *Inc# 2) 1)
(setq *Xpt# (+ *Xpt# 7))
);if
(start_image "ProgressBar")
(if (> *Inc# 100)
(progn
(setq *Inc# 0 *Xpt# -4)
(start_image "ProgressBar")
(fill_image 3 3 (- *X# 5) (- *Y# 5) -15)
);progn
(progn
(vector_image *Xpt# 3 (+ *Xpt# 4) 3 120)
(vector_image *Xpt# 4 (+ *Xpt# 4) 4 110)
(vector_image *Xpt# 5 (+ *Xpt# 4) 5 110)
(vector_image *Xpt# 6 (+ *Xpt# 4) 6 100)
(vector_image *Xpt# 7 (+ *Xpt# 4) 7 100)
(vector_image *Xpt# 8 (+ *Xpt# 4) 8 90)
(vector_image *Xpt# 9 (+ *Xpt# 4) 9 90)
(vector_image *Xpt# 10 (+ *Xpt# 4) 10 90)
(vector_image *Xpt# 11 (+ *Xpt# 4) 11 90)
(vector_image *Xpt# 12 (+ *Xpt# 4) 12 100)
(vector_image *Xpt# 13 (+ *Xpt# 4) 13 100)
(vector_image *Xpt# 14 (+ *Xpt# 4) 14 110)
(vector_image *Xpt# 15 (+ *Xpt# 4) 15 110)
(vector_image *Xpt# 16 (+ *Xpt# 4) 16 120)
);progn
);if
(end_image)
(setq Complete$ (strcat (itoa (fix (+ *Inc# 0.5))) "% Wykonano..."))
(set_tile "Complete" Complete$)
(delay *Delay~)
(action_tile "cancel" "(done_dialog)(exit)")
(if (= *Inc# 100)(delay 10));Delay to show complete
(princ)
);defun Progress
;-------------------------------------------------------------------------------
; EndProgressBar - Close Progress Bar dialog and clear variables
;-------------------------------------------------------------------------------
(defun EndProgressBar ( )
(setq *Delay~ (* *Delay~ 0.5));Speed up bars remaining
(if (and (> *Inc# 0)(< *Inc# 100))
(repeat (- 100 *Inc#) (Progress))
);if
(done_dialog)
(start_dialog)
(unload_dialog *Dcl_Id%)
(setq *Dcl_Id% nil *Delay~ nil *Inc# nil *X# nil *Xpt# nil *Y# nil)
(princ)
);defun EndProgressBar
;-------------------------------------------------------------------------------
; Speed - Determines the approximate computer processing speed and sets the
; global variable *speed# which may be used in delay loops while in dialogs.
;-------------------------------------------------------------------------------
(defun Speed (/ Cdate~ Cnt# NewSecond# OldSecond#)
(setq Cdate~ (getvar "CDATE"))
(setq NewSecond# (fix (* (- (* (- Cdate~ (fix Cdate~)) 100000)(fix (* (- Cdate~ (fix Cdate~)) 100000))) 10)))
(repeat 2
(setq Cnt# 0)
(setq OldSecond# NewSecond#)
(while (= NewSecond# OldSecond#)
(setq Cdate~ (getvar "CDATE"))
(setq NewSecond# (fix (* (- (* (- Cdate~ (fix Cdate~)) 100000)(fix (* (- Cdate~ (fix Cdate~)) 100000))) 10)))
(setq Cnt# (1+ Cnt#))
);while
);repeat
(setq *Speed# Cnt#)
(princ)
);defun Speed
;-------------------------------------------------------------------------------
; delay - time delay function
; Arguments: 1
; Percent~ - Percentage of *Speed# variable
; Returns: time delay
;-------------------------------------------------------------------------------
(defun delay (Percent~ / Number~)
(if (not *Speed#) (Speed))
(repeat (fix (* *Speed# Percent~)) (setq Number~ pi))
(princ)
);defun delay
;-------------------------------------------------------------------------------
(princ);End of ProgressBar.lsp
And DCL:
//------------------------------------------------------------------------------
// Program Name: ProgressBar.dcl [Progress Bar R3]
// Created By: Terry Miller (Email: terrycadd@yahoo.com)
// (URL:
http://web2.airmail.net/terrycad)
// Date Created: 6-20-04
// Function: Progress Bar dialog
//------------------------------------------------------------------------------
// Revision History
// Rev By Date Description
//------------------------------------------------------------------------------
// 1 TM 6-20-04 Initial version
// 2 TM 2-20-05 Divided initial function into three functions, ProgressBar,
// Progress, and EndProgressBar to be used in loops.
// 3 TM 1-20-07 Updated progress bar dialog design.
//------------------------------------------------------------------------------
// ProgressBar - Progress Bar dialog
//------------------------------------------------------------------------------
ProgressBar : dialog {
key = "Title";
label = "";
spacer;
: text {
key = "Message";
label = "";
is_default = true;
}
: row {
: column {
: spacer { height = 0.12; fixed_height = true;}
: image {
key = "ProgressBar";
width = 58.92; fixed_width = true;
height = 1.51; fixed_height = true;
aspect_ratio = 1;
color = -15;
vertical_margin = none;
is_default = false;
}
spacer;
}
// cancel_button;
}
: text {
key = "Complete";
label = "";
is_default = false;
}
}// ProgressBar
//------------------------------------------------------------------------------