Distance between a set of points

Distance between a set of points

surfer96
Advocate Advocate
4,657 Views
28 Replies
Message 1 of 29

Distance between a set of points

surfer96
Advocate
Advocate

Is there some routine to calculate the distance between all intersection points from a set of lines?

 Unbenannt.JPG

 

 

 

 

0 Likes
Accepted solutions (2)
4,658 Views
28 Replies
Replies (28)
Message 21 of 29

surfer96
Advocate
Advocate

@marko_ribar 

Tried your code, it worked fine when selecting existing AutoCAD-lines manually.

I then tried it with a conditional while loop demanding the shortest broken line to be longer 2 and all lines generated in AutoLISP:

LL; line length
LL_lst; list of line length
LL_lst_min; min length value of all (broken) lines

LL_lb 2; line length range lower boundary

(while (< LL_lst_min LL_lb) ... );end while

 

Unfortunately this didn't work, the loop starts but then seems to get lost in nowhere...

It's probably my fault but I can't find the error. There's possibly something wrong with selection sets or resetting the lists to nil before relooping?

0 Likes
Message 22 of 29

marko_ribar
Advisor
Advisor

It may be the fact that in every iteration your LL_lst_min is less than 2.0... That is the reason while loop isn't terminated... Try with LL_lb < 2.0, it may occur that while will be terminated imidiately after 1st iteration... Simply you can't predict random generation of lines, so my suggestion is either to wait, or accept LL_lst_min < 2.0 solution and avoid while looping at all...

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 23 of 29

marko_ribar
Advisor
Advisor
Accepted solution

Hi, I've modified your code - there were almost no mistakes... I've added one (if (setq ss (ssget "_x" '((410 . "Model")))) ... ) and few minor checks for resetting variables to nil when initialize (while)... Also added in (foreach p uplst (vl-cmdf "_.zoom" "_c" "_non" p 0.025) ... and one (vl-cmdf "_.zoom" "_p") when closing that foreach )... And that's all... I waited and it did find min line of 2.05 units after 30-40 iterations... I'll attach *.lsp... BTW. You can go to formatting options in VLIDE and uncheck insert tabs check box... That way, when clicked on format button, code will be formatted with spaces which makes visually good looking in notepad or notepad ++. (the code is bigger, but more readable)... M.R.

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 24 of 29

surfer96
Advocate
Advocate

Thanks for correcting the code which did work fine.

The interesting thing is that the break-lines approch is ten times slower than the distance-point method.

It seems as if the use of AutoCAD commands like "_break" in between slows AutoLISP down...

 

Command: BREAK_LINES_LENGTH

Time Elapsed in Millisecs: 5766
Total Number of Loop Executions:10
Time per Loop in Millisecs:576
Shortest Line Length: 1.18

 

Command: DIST_ALL_IP
Time Elapsed in Millisecs: 125
Total Number of Loop Executions:2
Time per Loop in Millisecs:62
Smallest Distance in List: 1.626

 

0 Likes
Message 25 of 29

CodeDing
Advisor
Advisor

Invoking commands through the command line (e.g. "break" "zoom") will almost always be slower than their non-command line versions.

0 Likes
Message 26 of 29

marko_ribar
Advisor
Advisor

@surfer96 

According to recent post you made here : https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/distance-between-vlax-3d-points/td-p...

I am under impression that you are searching for faster algorithm than my proposed break lines version...

So I decided to help you as much as I could by my time limits I had... Note that @CodeDing 's version is fastest, but then again it isn't accounting for distances intersection points form along given lines - it was assumed all possible distances which is wrong IMHO...

Here is break lines version little changed as I decided to revise it :

 

(vl-load-com)
(defun c:BREAK_LINES_LENGTH (/ b1 b2 b3 b4 rd1 rd2 lpt1 lpt2 LC bw nh nv
                             x LL_lb LL LL_lst LL_lst_min ss cmd
                             osm unique i e lst plst uplst elst
			     time_start time_end tpl acadObj c_doc modelSpace
                            )


  (setq time_start (getvar "MILLISECS")) ; set start time

  (setq cmd (getvar "CMDECHO"))
  (setq osm (getvar "OSMODE"))
  (setvar "CMDECHO" 0)
  (setvar "OSMODE" (logior 16384 osm))
  (setq acadObj    (vlax-get-acad-object)
        c_doc      (vla-get-Activedocument acadObj)
        modelSpace (vla-get-ModelSpace c_doc)
  )

  (setq LC 0                            ; loop counter
        LL_lst_min 0.0                  ; start line length min
        bw 100.0                        ; box width
        LL_lb 2                         ; line length range lower boundary
        nh 4                            ; number horizontal lines
        nv 4                            ; number vertical lines
  )

  ;; START WHILE MIN LINE LENGTH
  (while (< LL_lst_min LL_lb)

    (setq LC (1+ LC))
    (setq lst nil
          LL_lst nil
    )                                   ; set lists to nil

    (setq ss (ssget "_X" '((410 . "Model"))))
    (if ss
      (acet-ss-entdel ss)
    )                                   ; end_if

    ;; CREATE RANDOM LINES
    (setq b1      (vlax-3d-point (list 0.0 0.0 0.0))
          b2      (vlax-3d-point (list bw 0.0 0.0))
          b3      (vlax-3d-point (list bw bw 0.0))
          b4      (vlax-3d-point (list 0.0 bw 0.0))
          lineObj (vla-AddLine modelSpace b1 b2)
          lineObj (vla-AddLine modelSpace b2 b3)
          lineObj (vla-AddLine modelSpace b3 b4)
          lineObj (vla-AddLine modelSpace b4 b1)
    )
    (repeat nh
      (setq rd1     (* (LM:rand) bw)
            rd2     (* (LM:rand) bw)
            lpt1    (vlax-3d-point (list 0.0 rd1 0.0))
            lpt2    (vlax-3d-point (list bw rd2 0.0))
            lineObj (vla-AddLine modelSpace lpt1 lpt2)
      )
    )                                   ;end repeat horizontal inner lines
    (repeat nv
      (setq rd1     (* (LM:rand) bw)
            rd2     (* (LM:rand) bw)
            lpt1    (vlax-3d-point (list rd1 0.0 0.0))
            lpt2    (vlax-3d-point (list rd2 bw 0.0))
            lineObj (vla-AddLine modelSpace lpt1 lpt2)
      )
    )                                   ;end repeat vertical inner lines

    (defun unique (l)
      (if l
        (cons (car l)
              (unique
                (vl-remove-if '(lambda (x) (equal x (car l) 1e-6)) l)
              )
        )
      )
    )

    (setq ss (ssget "_X" '((0 . "LINE")))) ;select all lines
    (if ss
      (progn
        (repeat (setq i (sslength ss))
          (setq e (ssname ss (setq i (1- i))))
          (setq lst (cons e lst))
        )
        (setq plst (LM:intersectionsinobjlist
                     (mapcar 'vlax-ename->vla-object lst)
                   )
        )
        (setq uplst (unique plst))
        (foreach p uplst
          (vl-cmdf "_.zoom" "_c" "_non" p 0.025)
          (vl-cmdf "_.break" "_non" p "_non" p)
          (while
            (vl-some
              '(lambda (x)
                 (and (not (equal p (vlax-curve-getstartpoint x) 1e-6))
                      (not (equal p (vlax-curve-getendpoint x) 1e-6))
                 )
               )
              (setq elst (vl-remove-if
                           'listp
                           (mapcar 'cadr (ssnamex (ssget "_C" p p)))
                         )
              )
            )
             (foreach e elst
               (if
                 (and (not (equal p (vlax-curve-getstartpoint e) 1e-6))
                      (not (equal p (vlax-curve-getendpoint e) 1e-6))
                 )
                  (vl-cmdf "_.break" e "_non" p "_non" p)
               )
             )
          )
          (vl-cmdf "_.zoom" "_p")
        )
      )
    )                                   ;end if

    (setq ss (ssget "_X" '((0 . "LINE")))) ; select all (broken)lines
    (if ss
      (repeat (setq i (sslength ss))
        (setq LL (vla-get-Length (vlax-ename->vla-object (ssname ss (setq i (1- i))))))  ;assign legth to line
        (setq LL_lst (cons LL LL_lst))  ;complete list of line length
      )                                 ;end repeat
    )                                   ;end if
    (setq LL_lst     (vl-sort LL_lst '<)
          LL_lst_min (car LL_lst)
    )
  )
  ;;END WHILE MIN LINE LENGTH

  (setvar "CMDECHO" cmd)
  (setvar "OSMODE" osm)

  (setq time_end (getvar "MILLISECS"))  ;set end time
  (setq time_el (- time_end time_start)) ;time elapsed
  (setq tpl (/ time_el LC))             ;time per loop
  (princ
    (strcat "\nTime Elapsed in Millisecs: " (rtos time_el 2 2))
  )
  (princ
    (strcat "\nTotal Number of Loop Executions:" (rtos LC 2 0))
  )
  (princ
    (strcat "\nTime per  Loop in Millisecs:" (rtos tpl 2 0))
  )
  (princ
    (strcat "\nShortest Line Length: "
            (rtos LL_lst_min 2 2)
    )
  )
  (princ)
)                                       ;enddefun BREAK_LINES_LENGTH


;; LM:rand
(defun LM:rand (/ a c m)
  (setq m   4294967296.0
        a   1664525.0
        c   1013904223.0
        $xn (rem (+ c
                    (* a
                       (cond ($xn)
                             ((getvar 'date))
                       )
                    )
                 )
                 m
            )
  )
  (/ $xn m)
)                                       ; end defun LM:rand

;; Intersections  -  Lee Mac
;; Returns a list of all points of intersection between two objects
;; for the given intersection mode.
;; ob1,ob2 - [vla] VLA-Objects
;;     mod - [int] acextendoption enum of intersectwith method

(defun LM:intersections (ob1 ob2 mod / lst rtn)
  (if (and (vlax-method-applicable-p ob1 'intersectwith)
           (vlax-method-applicable-p ob2 'intersectwith)
           (setq lst (vlax-invoke ob1 'intersectwith ob2 mod))
      )
    (repeat (/ (length lst) 3)
      (setq rtn (cons (list (car lst) (cadr lst) (caddr lst)) rtn)
            lst (cdddr lst)
      )
    )
  )
  (reverse rtn)
)

;; Intersections in Object List  -  Lee Mac
;; Returns a list of all points of intersection between all objects in a list of VLA-Objects.
;; lst - [lst] List of VLA-Objects

(defun LM:intersectionsinobjlist (lst / ob1 rtn)
  (while (setq ob1 (car lst))
    (foreach ob2 (setq lst (cdr lst))
      (setq rtn (cons (LM:intersections ob1 ob2 acextendnone) rtn))
    )
  )
  (apply 'append (reverse rtn))
)

 

And here is my new version that is roughly 5 times faster than break lines version :

 

(vl-load-com)
(defun c:RND_LINES_MIN_LENGTH (/ b1 b2 b3 b4 rd1 rd2 lpt1 lpt2 LC bw nh nv
                               LL_lb LL_lst LL_lst_min ss cmd
                               osm unique i e lst plst uplst liplst p
                               time_start time_end time_el tpl
                              )


  (setq time_start (getvar "MILLISECS")) ; set start time

  (setq cmd (getvar "CMDECHO"))
  (setq osm (getvar "OSMODE"))
  (setvar "CMDECHO" 0)
  (setvar "OSMODE" (logior 16384 osm))

  (setq LC 0                            ; loop counter
        bw 100.0                        ; box width
        LL_lb 2                         ; line length range lower boundary
        nh 4                            ; number horizontal lines
        nv 4                            ; number vertical lines
  )

  ;; START WHILE MIN LINE LENGTH
  (while (< LL_lst_min LL_lb)

    (setq LC (1+ LC))
    (setq lst nil
          LL_lst nil
    )                                   ; set lists to nil

    (setq ss (ssget "_X" '((410 . "Model"))))
    (if ss
      (acet-ss-entdel ss)
    )                                   ; end_if

    ;; CREATE RANDOM LINES
    (setq b1      '(0.0 0.0 0.0)
          b2      (list bw 0.0 0.0)
          b3      (list bw bw 0.0)
          b4      (list 0.0 bw 0.0)
    )
    (entmake (list '(0 . "LINE") (cons 10 b1) (cons 11 b2)))
    (entmake (list '(0 . "LINE") (cons 10 b2) (cons 11 b3)))
    (entmake (list '(0 . "LINE") (cons 10 b3) (cons 11 b4)))
    (entmake (list '(0 . "LINE") (cons 10 b4) (cons 11 b1)))

    (repeat nh
      (setq rd1     (* (LM:rand) bw)
            rd2     (* (LM:rand) bw)
            lpt1    (list 0.0 rd1 0.0)
            lpt2    (list bw rd2 0.0)
      )
      (entmake (list '(0 . "LINE") (cons 10 lpt1) (cons 11 lpt2)))
    )                                   ;end repeat horizontal inner lines
    (repeat nv
      (setq rd1     (* (LM:rand) bw)
            rd2     (* (LM:rand) bw)
            lpt1    (list rd1 0.0 0.0)
            lpt2    (list rd2 bw 0.0)
      )
      (entmake (list '(0 . "LINE") (cons 10 lpt1) (cons 11 lpt2)))
    )                                   ;end repeat vertical inner lines

    (defun unique (l)
      (if l
        (cons (car l)
              (unique
                (vl-remove-if '(lambda (x) (equal x (car l) 1e-6)) l)
              )
        )
      )
    )

    (setq ss (ssget "_X" '((0 . "LINE")))) ;select all lines
    (if ss
      (progn
        (repeat (setq i (sslength ss))
          (setq e (ssname ss (setq i (1- i))))
          (setq lst (cons e lst))
        )
        (setq plst (LM:intersectionsinobjlist
                     (mapcar 'vlax-ename->vla-object lst)
                   )
        )
        (setq uplst (unique plst))
        (foreach li lst
          (setq liplst (vl-remove-if-not '(lambda ( x ) (if (= (vlax-curve-getparamatpoint li x) 0.0) (setq p x) x)) uplst))
          (setq liplst (vl-sort liplst '(lambda ( a b ) (< (distance p a) (distance p b)))))
          (setq LL_lst (append (mapcar '(lambda ( a b ) (distance a b)) liplst (cdr liplst)) LL_lst))
        )
      )
    )                                   ;end if

    (setq LL_lst     (vl-sort LL_lst '<)
          LL_lst_min (car LL_lst)
    )
  )
  ;;END WHILE MIN LINE LENGTH

  (setvar "CMDECHO" cmd)
  (setvar "OSMODE" osm)

  (setq time_end (getvar "MILLISECS"))  ;set end time
  (setq time_el (- time_end time_start)) ;time elapsed
  (setq tpl (/ time_el LC))             ;time per loop
  (princ
    (strcat "\nTime Elapsed in Millisecs: " (rtos time_el 2 2))
  )
  (princ
    (strcat "\nTotal Number of Loop Executions:" (rtos LC 2 0))
  )
  (princ
    (strcat "\nTime per  Loop in Millisecs:" (rtos tpl 2 0))
  )
  (princ
    (strcat "\nShortest Line Length: "
            (rtos LL_lst_min 2 2)
    )
  )
  (princ)
)                                       ;enddefun BREAK_LINES_LENGTH


;; LM:rand
(defun LM:rand (/ a c m)
  (setq m   4294967296.0
        a   1664525.0
        c   1013904223.0
        $xn (rem (+ c
                    (* a
                       (cond ($xn)
                             ((getvar 'date))
                       )
                    )
                 )
                 m
            )
  )
  (/ $xn m)
)                                       ; end defun LM:rand

;; Intersections  -  Lee Mac
;; Returns a list of all points of intersection between two objects
;; for the given intersection mode.
;; ob1,ob2 - [vla] VLA-Objects
;;     mod - [int] acextendoption enum of intersectwith method

(defun LM:intersections (ob1 ob2 mod / lst rtn)
  (if (and (vlax-method-applicable-p ob1 'intersectwith)
           (vlax-method-applicable-p ob2 'intersectwith)
           (setq lst (vlax-invoke ob1 'intersectwith ob2 mod))
      )
    (repeat (/ (length lst) 3)
      (setq rtn (cons (list (car lst) (cadr lst) (caddr lst)) rtn)
            lst (cdddr lst)
      )
    )
  )
  (reverse rtn)
)

;; Intersections in Object List  -  Lee Mac
;; Returns a list of all points of intersection between all objects in a list of VLA-Objects.
;; lst - [lst] List of VLA-Objects

(defun LM:intersectionsinobjlist (lst / ob1 rtn)
  (while (setq ob1 (car lst))
    (foreach ob2 (setq lst (cdr lst))
      (setq rtn (cons (LM:intersections ob1 ob2 acextendnone) rtn))
    )
  )
  (apply 'append (reverse rtn))
)

And here are comparison results on my PC :

 

Command: BREAK_LINES_LENGTH
Time Elapsed in Millisecs: 15578.00
Total Number of Loop Executions:20
Time per  Loop in Millisecs:778
Shortest Line Length: 3.69

Command: RND_LINES_MIN_LENGTH
Time Elapsed in Millisecs: 7687.00
Total Number of Loop Executions:51
Time per  Loop in Millisecs:150
Shortest Line Length: 2.91

TIME RATIO : 780 / 150 = 5.2 X FASTER

So I assume this was what you were looking for all the time... Note that rnd version (faster) is not drawing broken lines, but just lines that are last generated with desired outcome in their full length, so you must check which part between intersection points satisfy returned min. distance value... I guess that this is not big problem - you can visually distinguish where should be min. distance... Note that all distances are assumed for checking both on random lines and on outline lines forming square 100x100 units...

 

Hope this helps,

regards, M.R.

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 27 of 29

marko_ribar
Advisor
Advisor

Sorry I had blunder :

 

(vl-load-com)
(defun c:RND_LINES_MIN_LENGTH (/ b1 b2 b3 b4 rd1 rd2 lpt1 lpt2 LC bw nh nv
                               LL_lb LL_lst LL_lst_min ss cmd
                               osm unique i e lst plst uplst liplst p
                               time_start time_end time_el tpl
                              )


  (setq time_start (getvar "MILLISECS")) ; set start time

  (setq cmd (getvar "CMDECHO"))
  (setq osm (getvar "OSMODE"))
  (setvar "CMDECHO" 0)
  (setvar "OSMODE" (logior 16384 osm))

  (setq LC 0                            ; loop counter
        bw 100.0                        ; box width
        LL_lb 2                         ; line length range lower boundary
        nh 4                            ; number horizontal lines
        nv 4                            ; number vertical lines
  )

  ;; START WHILE MIN LINE LENGTH
  (while (< LL_lst_min LL_lb)

    (setq LC (1+ LC))
    (setq lst nil
          LL_lst nil
    )                                   ; set lists to nil

    (setq ss (ssget "_X" '((410 . "Model"))))
    (if ss
      (acet-ss-entdel ss)
    )                                   ; end_if

    ;; CREATE RANDOM LINES
    (setq b1      '(0.0 0.0 0.0)
          b2      (list bw 0.0 0.0)
          b3      (list bw bw 0.0)
          b4      (list 0.0 bw 0.0)
    )
    (entmake (list '(0 . "LINE") (cons 10 b1) (cons 11 b2)))
    (entmake (list '(0 . "LINE") (cons 10 b2) (cons 11 b3)))
    (entmake (list '(0 . "LINE") (cons 10 b3) (cons 11 b4)))
    (entmake (list '(0 . "LINE") (cons 10 b4) (cons 11 b1)))

    (repeat nh
      (setq rd1     (* (LM:rand) bw)
            rd2     (* (LM:rand) bw)
            lpt1    (list 0.0 rd1 0.0)
            lpt2    (list bw rd2 0.0)
      )
      (entmake (list '(0 . "LINE") (cons 10 lpt1) (cons 11 lpt2)))
    )                                   ;end repeat horizontal inner lines
    (repeat nv
      (setq rd1     (* (LM:rand) bw)
            rd2     (* (LM:rand) bw)
            lpt1    (list rd1 0.0 0.0)
            lpt2    (list rd2 bw 0.0)
      )
      (entmake (list '(0 . "LINE") (cons 10 lpt1) (cons 11 lpt2)))
    )                                   ;end repeat vertical inner lines

    (defun unique (l)
      (if l
        (cons (car l)
              (unique
                (vl-remove-if '(lambda (x) (equal x (car l) 1e-6)) l)
              )
        )
      )
    )

    (setq ss (ssget "_X" '((0 . "LINE")))) ;select all lines
    (if ss
      (progn
        (repeat (setq i (sslength ss))
          (setq e (ssname ss (setq i (1- i))))
          (setq lst (cons e lst))
        )
        (setq plst (LM:intersectionsinobjlist
                     (mapcar 'vlax-ename->vla-object lst)
                   )
        )
        (setq uplst (unique plst))
        (foreach li lst
          (setq liplst (vl-remove-if-not '(lambda (x / par) (if (= (setq par (vlax-curve-getparamatpoint li x)) 0.0) (setq p x) (if par x))) uplst))
          (setq liplst (vl-sort liplst '(lambda (a b) (< (distance p a) (distance p b)))))
          (setq LL_lst (append (mapcar '(lambda (a b) (distance a b)) liplst (cdr liplst)) LL_lst))
        )
      )
    )                                   ;end if

    (setq LL_lst     (vl-sort LL_lst '<)
          LL_lst_min (car LL_lst)
    )
  )
  ;;END WHILE MIN LINE LENGTH

  (setvar "CMDECHO" cmd)
  (setvar "OSMODE" osm)

  (setq time_end (getvar "MILLISECS"))  ;set end time
  (setq time_el (- time_end time_start)) ;time elapsed
  (setq tpl (/ time_el LC))             ;time per loop
  (princ
    (strcat "\nTime Elapsed in Millisecs: " (rtos time_el 2 2))
  )
  (princ
    (strcat "\nTotal Number of Loop Executions:" (rtos LC 2 0))
  )
  (princ
    (strcat "\nTime per  Loop in Millisecs:" (rtos tpl 2 0))
  )
  (princ
    (strcat "\nShortest Line Length: "
            (rtos LL_lst_min 2 2)
    )
  )
  (princ)
)                                       ;enddefun BREAK_LINES_LENGTH


;; LM:rand
(defun LM:rand (/ a c m)
  (setq m   4294967296.0
        a   1664525.0
        c   1013904223.0
        $xn (rem (+ c
                    (* a
                       (cond ($xn)
                             ((getvar 'date))
                       )
                    )
                 )
                 m
            )
  )
  (/ $xn m)
)                                       ; end defun LM:rand

;; Intersections  -  Lee Mac
;; Returns a list of all points of intersection between two objects
;; for the given intersection mode.
;; ob1,ob2 - [vla] VLA-Objects
;;     mod - [int] acextendoption enum of intersectwith method

(defun LM:intersections (ob1 ob2 mod / lst rtn)
  (if (and (vlax-method-applicable-p ob1 'intersectwith)
           (vlax-method-applicable-p ob2 'intersectwith)
           (setq lst (vlax-invoke ob1 'intersectwith ob2 mod))
      )
    (repeat (/ (length lst) 3)
      (setq rtn (cons (list (car lst) (cadr lst) (caddr lst)) rtn)
            lst (cdddr lst)
      )
    )
  )
  (reverse rtn)
)

;; Intersections in Object List  -  Lee Mac
;; Returns a list of all points of intersection between all objects in a list of VLA-Objects.
;; lst - [lst] List of VLA-Objects

(defun LM:intersectionsinobjlist (lst / ob1 rtn)
  (while (setq ob1 (car lst))
    (foreach ob2 (setq lst (cdr lst))
      (setq rtn (cons (LM:intersections ob1 ob2 acextendnone) rtn))
    )
  )
  (apply 'append (reverse rtn))
)

And here are my latest comparisons :

Command: BREAK_LINES_LENGTH
Time Elapsed in Millisecs: 15578.00
Total Number of Loop Executions:20
Time per  Loop in Millisecs:778
Shortest Line Length: 3.69

Command: RND_LINES_MIN_LENGTH
Time Elapsed in Millisecs: 4750.00
Total Number of Loop Executions:39
Time per  Loop in Millisecs:121
Shortest Line Length: 3.10

TIME RATIO : 780 / 120 = 6.5 X FASTER

Regards, M.R.

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 28 of 29

surfer96
Advocate
Advocate

@marko_ribar 

Your improved code is much faster than  the initial BREAK_LINES_LENGTH solution.

Here is the result on my machine:

 

RND_LINES_MIN_LENGTH
Time Elapsed in Millisecs: 1172
Total Number of Loop Executions:17
Time per Loop in Millisecs:68
Shortest Line Length: 2.2

0 Likes
Message 29 of 29

surfer96
Advocate
Advocate

Thank you for your cooperation.

 

I've done similar testing with visual programming solutions like Dynamo for Revit before.

Those programs do have a nice interface but seem to be very slow for calculation.

 

Therefore I wanted to know how fast VLISP and ActiveX are for these purposes. They could be even faster for my geometrical constructions, but at least turned out to be much better than visual programming.

 

My next try is VB.NET, which will hopefully enhance speed compared to ActiveX...

0 Likes