Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/06/2025 in all areas

  1. That's right. I just wrote it that wasy so it fits in one line , one size fits all... it starts recording the prompts , list all setvars and then stops the recording because just like Bigal said , if you dont , file can go Godzilla. Its only meant for temp use. Before you begin mission impossible The Final Reckoning condersider starting clean by using (if (setq fn (findfile (getvar 'logfilename))) (vl-filename-delete fn))
    1 point
  2. For anyone interested here is some sample code for make an alignment. AlignmentSample.dvb Readme.txt
    1 point
  3. Use Logfileoff to stop log recording. Else you will end up with a massive file. Its saved in your temp directory Options File Temporary Prefix. I reset mine. This shows all commands current. (atoms-family 0) have logfile on. Its a big list.
    1 point
  4. Personally give up on ChatGP, I also use Copolit and both from posts here and my attempts the code produced just does not work often. If you go back to my code about the alignments it shows the points of the allignment, you should be able to do a PUT rather than a get. Will see if I can do something. I am using Bricscad at moment, but have access to CIV3D just not at hand or would look at dumping alignment points as you need the last segment.
    1 point
  5. If I remember correctly it records all command prompts. I used it once to get a list of all setvars and compare it between drawings. Have some snippits on my laptop , maybe more on my work computer ;;; make assoc list for all setvar names '(("name" . 1)...("name" . 0)) where 1 means read-only (setq lst (getsetvar)) (defun getsetvar ( / oqa fn fp s l ro) (setq fn (getvar 'logfilename) oqa (getvar 'qaflags))(setvar 'qaflags 2) (vl-catch-all-apply 'vl-cmdf (list "logfileon" "setvar" "?" "*" "logfileoff"))(gc)(gc) (if (and (findfile fn) (setq fp (open fn "r"))(setq s (read-line fp))) (progn (while (/= (last (vl-remove 32 (vl-string->list s))) 42)(setq s (read-line fp)))(setq s (read-line fp)) (while (and (setq s (read-line fp)) (/= s ""))(if (wcmatch s "*(read only)") (setq ro 1) (setq ro 0)) (setq l (cons (cons (car (SplitStr s " ")) ro) l)))) ) (if fp (close fp))(setvar 'qaflags oqa) (reverse l) ) ; (SplitStr "a,b" ",") -> ("a" "b") (defun SplitStr (s d / p) (if (setq p (vl-string-search d s))(cons (substr s 1 p)(SplitStr (substr s (+ p 1 (strlen d))) d))(list s))) (defun t1 ( / logfile-fn logfile-fp inp lst vlist result) ;;; (startapp "notepad" (getvar 'logfilename)) (setq logfile-fn (getvar 'logfilename)) (setvar 'qaflags 2) (vl-catch-all-apply 'vl-cmdf (list "logfileon" "setvar" "?" "*" "logfileoff")) ;(vl-catch-all-apply 'vl-cmdf (list "setvar" "?" "*")) ;(vl-catch-all-apply 'vl-cmdf (list "logfileoff")) (gc)(gc) ;;; (startapp "notepad" logfile-fn) (if (and (findfile logfile-fn) (setq logfile-fp (open logfile-fn "r"))) (progn (setq inp (read-line logfile-fp)) ;;; read until input ends with "*" (code 42) "Enter variable(s) to list <*>: *" (while (/= (last (vl-string->list inp)) 42) (setq inp (read-line logfile-fp))) ;;; skip next empty line (setq inp (read-line logfile-fp)) ;;; read until end of file (while (and (setq inp (read-line logfile-fp)) (/= inp "")) (if (wcmatch inp "*(read only)") (setq read-only 1) (setq read-only 0)) (setq lst (cons (cons (car (SplitStr inp " ")) read-only) lst)) ) ) ) (if logfile-fp (progn (close logfile-fp) (gc))) (setq vlist (reverse lst)) ;;; test if assoc works (jip) (setq result (assoc "ACADVER" vlist)) (princ) )
    1 point
×
×
  • Create New...