0 Members and 1 Guest are viewing this topic.
But inserting the block I would probably do with ENTMAKE. It's fast, it's clean and it can be tested more easily than a command (unless VL-CMDF is used).
(defun startTimer () (setq time (getvar "DATE")))(defun endTimer (func) (setq time (- (getvar "DATE") time) seconds (* 86400.0 (- time (fix time))) ) (gc) (outPut seconds func))(defun outPut (secs def) (gc) (princ (strcat "\nTimed " def ": " (rtos secs 2 6))) (princ))(defun insCircle (/ bname) (setq bname "circ") (startTimer) (repeat 1000 (entmake (list '(0 . "INSERT") '(100 . "AcDbEntity") '(100 . "AcDbBlockReference") (cons 2 "circ") (cons 8 "0") '(10 0.0 0.0 0.0) ) ) ) (endTimer "insCircle"))
Command: timerTimed insCircle: 0.079983Command:Command: timerTimed insCircle: 0.080024Command:Command: timerTimed insCircle: 0.090002Command:Command: timerTimed insCircle: 0.079983Command:Command: timerTimed insCircle: 0.079983Command:Command: timerTimed insCircle: 0.090002Command:Command: timerTimed insCircle: 0.090002Command:Command: timerTimed insCircle: 0.090967Command:Command: timerTimed insCircle: 0.090002Command:Command: timerTimed insCircle: 0.080024Command:
(defun c:instest () (defun startTimer () (setq time (getvar "DATE"))) (defun endTimer (func) (setq time (- (getvar "DATE") time) seconds (* 86400.0 (- time (fix time))) ) (gc) (outPut seconds func) ) (defun outPut (secs def) (gc) (princ (strcat "\nTimed " def ": " (rtos secs 2 6))) (princ) ) (startTimer) (repeat 1000 (vla-InsertBlock (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object) ) ) (vlax-3d-point 0 0 0) "circ" (vlax-make-variant 1.0 vlax-vbDouble) (vlax-make-variant 1.0 vlax-vbDouble) (vlax-make-variant 1.0 vlax-vbDouble) (vlax-make-variant 0.0 vlax-vbDouble) ) ) (endTimer "instest"))
Mark, do you have an ActiveX function that'll outperform mine?
Actually my wife's computer is faster than mine but I can't get here to see that I need it more. No Name Box w/ Asus A7A266 mother board w/ AMD 1.4 ghz 512M ram G450 graphics card 40G HD 7200rpm 80G HD 7200rpmPuny 15" CRT, any suggestions?? keep $$$ in mind.