Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/07/2020 in all areas

  1. Maybe use Lee's ODBX wrapper and delete the proxies? (defun c:foo (/ _killzombies) (defun _killzombies (doc) (vlax-for b (vla-get-blocks doc) (if (= 0 (vlax-get b 'isxref)) (vlax-for a b (if (wcmatch (vla-get-objectname a) "AcDbProxyEntity,AcDbZombieEntity") (vl-catch-all-apply 'vla-delete (list a)) ) ) ) ) ) (lm:odbx '_killzombies nil t) (princ) )
    1 point
  2. Seems a lot of effort to do (alert "hello world\n \nhey its 4:30 Beer o clock") or ; bit of fun (defun SpeakSapi ( s / sapi ) (if (eq (type s) 'STR) (progn (setq sapi (vlax-create-object "Sapi.SpVoice")) (vlax-put sapi 'SynchronousSpeakTimeout 1) (vlax-invoke-method sapi 'WaitUntilDone 0) (vlax-invoke sapi "Speak" s 0) (vlax-release-object sapi) ))) (speaksapi "Hello world") (speaksapi "Welcome from BIG al the humour you can expect at times") (speaksapi "PLEASE PAY YOUR MONEY") (speaksapi "I know you have wound the clock back" ) (speaksapi "Call me on 1234 5678 if you like the software") (princ) Autodesk are going down the visual studio path as their future direction, not sure how that fits in with your preference.
    1 point
  3. I have merged your two threads together. As Bigal mentioned, we have already provided you with a lot of good information here in this thread, and you even mentioned that your were going to go with the Lenovo laptop, so I'm not sure what else we can suggest?
    1 point
  4. Don't double post you already have a post asking the same question back in September. Are you looking for some miracle price option, lots of suggestions in your other posts and in post of same request in hardware section. Admin move post ?
    1 point
  5. Here is my conversion... ;;;------------------------------------------------------------------;;; ;;; multp - sub function - multiplication of 2 numbers of any length ;;; ;;; ;;; ;;; Arguments : ;;; ;;; a - first number - type = string ;;; ;;; b - second number - type = string ;;; ;;; ;;; ;;; Return : ;;; ;;; r - resulting number - type = string ;;; ;;; ;;; ;;; Written by Marko Ribar, d.i.a. (architect) ;;; ;;;------------------------------------------------------------------;;; (defun multp ( a b / s ad bd dp an bn k c n l ll r rr ) (if (and (= (type a) 'STR) (/= a "") (= "" (vl-string-trim "-0123456789." a)) (= (type b) 'STR) (/= b "") (= "" (vl-string-trim "-0123456789." b))) (progn (if (or (and (minusp (atof a)) (not (minusp (atof b)))) (and (not (minusp (atof a))) (minusp (atof b)))) (setq s t) ) (if (or (zerop (atof a)) (zerop (atof b))) (setq r "0") (progn (setq a (vl-string->list a)) (setq b (vl-string->list b)) (setq ad a) (if (vl-position 46 ad) (while (/= (car ad) 46) (setq ad (cdr ad)) ) (setq ad nil) ) (setq bd b) (if (vl-position 46 bd) (while (/= (car bd) 46) (setq bd (cdr bd)) ) (setq bd nil) ) (if (or (vl-position 46 ad) (vl-position 46 bd)) (setq dp (+ (if ad (1- (length ad)) 0) (if bd (1- (length bd)) 0))) (setq dp 0) ) (setq an (vl-remove 45 (vl-remove 46 a))) (setq bn (vl-remove 45 (vl-remove 46 b))) (setq an (reverse an)) (setq bn (reverse bn)) (setq k 0) (foreach aa an (setq k (1+ k)) (setq c 0) (foreach bb bn (setq n (rem (+ c (* (atoi (chr aa)) (atoi (chr bb)))) 10)) (setq c (fix (/ (+ c (* (atoi (chr aa)) (atoi (chr bb)))) 10.0))) (if (zerop (fix (/ n 10.0))) (setq l (cons n l)) (progn (setq l (cons (rem n 10) l)) (setq c (fix (/ n 10.0))) ) ) ) (if (not (zerop c)) (setq l (cons c l)) ) (setq ll (cons (reverse l) ll)) (setq l nil) (repeat k (setq l (cons 0 l)) ) ) (setq n (apply 'max (mapcar 'length ll))) (setq ll (mapcar '(lambda ( x ) (if (= (length x) n) x (progn (repeat (- n (length x)) (setq x (append x (list 0)))) x))) ll)) (setq r (apply 'mapcar (cons '+ ll))) (setq c 0) (foreach x r (if (zerop (fix (/ (+ x c) 10.0))) (progn (setq rr (cons (+ x c) rr)) (setq c 0) ) (progn (setq rr (cons (rem (+ x c) 10) rr)) (setq c (fix (/ (+ x c) 10.0))) ) ) ) (if (not (zerop c)) (setq rr (cons c rr)) ) (setq k nil) (setq r (apply 'append (mapcar '(lambda ( x ) (if (null k) (setq k 1) (setq k (1+ k))) (if (/= k dp) (list (ascii (itoa x))) (list (ascii (itoa x)) 46))) (reverse rr)))) (setq r (reverse r)) (while (and (= (car r) 48) (/= (cadr r) 46)) (setq r (cdr r)) ) (if s (setq r (strcat "-" (vl-list->string r))) (setq r (vl-list->string r)) ) ) ) r ) ) ) (defun c:multp ( / a b ) (setq a (getstring "\nSpecify number a : ")) (while (or (= a "") (/= "" (vl-string-trim "-0123456789." a))) (prompt "\nInvalid a number specification...") (setq a (getstring "\nSpecify number a : ")) ) (setq b (getstring "\nSpecify number b : ")) (while (or (= b "") (/= "" (vl-string-trim "-0123456789." b))) (prompt "\nInvalid b number specification...") (setq b (getstring "\nSpecify number b : ")) ) (princ (strcat "\n" (multp a b))) (princ) )
    1 point
  6. stefans method obviously , but if you want to ditch the dot in a string you could use something like (vl-string-subst "" "." "1.234")
    1 point
  7. hi dlanorh Allow me to An idea for Lisp who wrote it use function to check if a polyline is counter clockwise After the line (setq c_pt (vlax-curve-getclosestpointto obj i_pt)) And (setq angP (angle '(0.0 0.0 0.0) (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj c_pt)))) ;;; (setq ang (angle i_pt c_pt)) (setq c_pttt (polar c_pt (+ angP (/ pi 2.)) dst)) (entmake (list (cons 0 "CIRCLE") ;*** (cons 6 "BYLAYER") (cons 8 "0") (cons 10 c_pttt) ;*** (cons 39 0.0) (cons 40 10) ; radius (cons 62 256) (cons 210 (list 0.0 0.0 1.0)))) Then delete the circle Please accept my suggestion
    1 point
  8. Give that a try ~'J'~ CoordsToTable.LSP
    1 point
  9. Bring on the headaches!
    -1 points
  10. Rob, it's not Revit BIM. I understand.
    -1 points
×
×
  • Create New...