0 Members and 1 Guest are viewing this topic.
;;-------------------=={ Parse Numbers }==--------------------;;;; ;;;; Parses a list of numerical values from a supplied string. ;;;;------------------------------------------------------------;;;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;;;;------------------------------------------------------------;;;; Arguments: ;;;; s - String to process ;;;;------------------------------------------------------------;;;; Returns: List of numerical values found in string. ;;;;------------------------------------------------------------;;;(defun LM:ParseNumbers ( s ) ( (lambda ( l ) (read (strcat "(" (vl-list->string (mapcar (function (lambda ( a b c ) (if (or (< 47 b 58) (and (= 45 b) (< 47 c 58) (not (< 47 a 58))) (and (= 46 b) (< 47 a 58)) (= 32 b) ) b 32 ) ) ) (cons nil l) l (append (cdr l) (list nil)) ) ) ")" ) ) ) (vl-string->list s) ))
(apply '+ (LM:PARSENUMBERS "11 + 25")) => 36(apply '+ (LM:PARSENUMBERS "11+25")) => 36
Thanks Marc This thread may be of interest: https://www.theswamp.org/index.php?topic=41681.0
(defun _doMath ( expr / scr res ) (if (setq scr (vla-getinterfaceobject (vlax-get-acad-object) "ScriptControl")) (progn (vl-catch-all-apply 'vlax-put-property (list scr 'language "VBScript")) (setq res (vl-catch-all-apply 'vlax-invoke (list scr 'eval expr))) (vlax-release-object scr) (if (not (vl-catch-all-error-p res)) res) ) ))
This topic too :https://www.theswamp.org/index.php?topic=51268.0
Quote from: Lee Mac on November 12, 2016, 07:34:51 AMThis thread may be of interest: https://www.theswamp.org/index.php?topic=41681.0I get the same error on my Windows 10:Comando: (vla-getinterfaceobject (vlax-get-acad-object) "ScriptControl"); errore: Errore di automazione. Errore durante il caricamento dell'applicazione.
This thread may be of interest: https://www.theswamp.org/index.php?topic=41681.0
kudos for the outside the box thinking Roy, definitely has (other) potential.
Can't imagine that executing very fast BUT kudos for the outside the box thinking Roy, definitely has (other) potential.