Author Topic: reuse saved variables  (Read 12826 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: reuse saved variables
« Reply #15 on: December 17, 2015, 12:35:02 PM »
as far as I know there is no possibility to force *CAD to display long real values stored into 'REAL or 'LIST atoms... I don't know where to look to make (force) *CAD operates this way... So for ex. PI variable is actually truncated and when typed !PI in command prompt only 5 decimal digits are displayed - that's how much (read somenumberstring) can actually display even if (setq somenumberstring "99.9999999999999999999999999")

Use rtos in place of vl-prin1-to-string, e.g.:
Code - Auto/Visual Lisp: [Select]
  1. "3.14159"
  2. _$ (rtos pi 2 15)
  3. "3.141592653589793"

Yes it's true, but actually it's not that simple: what shell we do with point lists?...

Lists may be processed recursively, converting the relevant data types to strings as required.

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: reuse saved variables
« Reply #16 on: December 17, 2015, 02:39:08 PM »
o.0... I don't see the method in above posted examples (link or similar), but beside this if 'LIST is entity DXF data, if I may also say (read) function returns error : extra cdr in dotted pair list... And for me this is odd too... So IMHO I think that at least 2 functions should be revised - or added : something similar to (vl-prin1-to-string) and something similar to (read)... So there it is - if someone wants to tackle it, it would be nice to see result of this challenge...

From what little AutoLisp code I can read now-a-days I can tell that you are saving two files "var names" "var values". That is not a good idea! The very crude code I posted is using a different method; I save one file with the variable and its value wrapped in a statements like "(setenv "blah" "blah")". This will allow you to use a combination of methods--which ever suites your needs for the given variable and/or type-. there isn't a need to re-write the two functions (rtos and vl-prin1-to-string) functions, just revise your method of using them. Look at the code I provided to give you inspiration.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ribarm

  • Gator
  • Posts: 3255
  • Marko Ribar, architect
Re: reuse saved variables
« Reply #17 on: December 17, 2015, 03:13:07 PM »
Quote
I wrote something like this as Lee's suggested as an inspiration, and it's not working... :(

Code - Auto/Visual Lisp: [Select]
  1. ;;;
  2. ;;; put this lisp at line before last in acaddoc.lsp : (if (findfile "variables.lsp") (load "variables.lsp") (load (getfiled "Select variables.lsp file" "\\" "lsp" 16)))
  3. ;;;
  4. ;;; put this line as last one in acaddoc.lsp : (setq *atoms* (atoms-family 1))
  5. ;;;
  6.  
  7. (defun processlist ( l / x )
  8.   (cond
  9.     ( (eq (type l) 'ENAME)
  10.       (setq l 'ENAME)
  11.     )
  12.     ( (eq (type l) 'EXRXSUBR)
  13.       (setq l 'EXRXSUBR)
  14.     )
  15.     ( (eq (type l) 'FILE)
  16.       (setq l 'FILE)
  17.     )
  18.     ( (eq (type l) 'INT)
  19.       nil
  20.     )
  21.     ( (eq (type l) 'LIST)
  22.       (setq x (car l))
  23.       (cond
  24.         ( (eq (type x) 'ENAME)
  25.           (setq l (vl-remove x l))
  26.         )
  27.         ( (eq (type x) 'EXRXSUBR)
  28.           (setq l (vl-remove x l))
  29.         )
  30.         ( (eq (type x) 'FILE)
  31.           (setq l (vl-remove x l))
  32.         )
  33.         ( (eq (type x) 'INT)
  34.           nil
  35.         )
  36.         ( (eq (type x) 'LIST)
  37.           (processlist x)
  38.         )
  39.         ( (eq (type x) 'PAGETB)
  40.           (setq l (vl-remove x l))
  41.         )
  42.         ( (eq (type x) 'PICKSET)
  43.           (setq l (vl-remove x l))
  44.         )
  45.         ( (eq (type x) 'REAL)
  46.           (setq l (subst (princ (rtos x 2 50)) x l))
  47.         )
  48.         ( (eq (type x) 'SAFEARRAY)
  49.           (setq l (vl-remove x l))
  50.         )
  51.         ( (eq (type x) 'STR)
  52.           nil
  53.         )
  54.         ( (eq (type x) 'SUBR)
  55.           (setq l (vl-remove x l))
  56.         )
  57.         ( (eq (type x) 'SYM)
  58.           nil
  59.         )
  60.         ( (eq (type x) 'VARIANT)
  61.           (setq l (vl-remove x l))
  62.         )
  63.         ( (eq (type x) 'USUBR)
  64.           (setq l (vl-remove x l))
  65.         )
  66.         ( (eq (type x) 'VLA-OBJECT)
  67.           (setq l (vl-remove x l))
  68.         )
  69.         ( t
  70.           nil
  71.         )
  72.       )
  73.       (processlist (cdr l))
  74.     )
  75.     ( (eq (type l) 'PAGETB)
  76.       (setq l 'PAGETB)
  77.     )
  78.     ( (eq (type l) 'PICKSET)
  79.       (setq l 'PICKSET)
  80.     )
  81.     ( (eq (type l) 'REAL)
  82.       (setq l (princ (rtos l 2 50)))
  83.     )
  84.     ( (eq (type l) 'SAFEARRAY)
  85.       (setq l 'SAFEARRAY)
  86.     )
  87.     ( (eq (type l) 'STR)
  88.       nil
  89.     )
  90.     ( (eq (type l) 'SUBR)
  91.       (setq l 'SUBR)
  92.     )
  93.     ( (eq (type l) 'SYM)
  94.       nil
  95.     )
  96.     ( (eq (type l) 'VARIANT)
  97.       (setq l 'VARIANT)
  98.     )
  99.     ( (eq (type l) 'USUBR)
  100.       (setq l 'USUBR)
  101.     )
  102.     ( (eq (type l) 'VLA-OBJECT)
  103.       (setq l 'VAL-OBJECT)
  104.     )
  105.     ( t
  106.       nil
  107.     )
  108.   )
  109.   l
  110. )
  111.  
  112. (defun c:var-save ( / varlst f1 f2 n )
  113.   (setq varlst (vl-remove-if '(lambda ( x ) (vl-position x *atoms*)) (atoms-family 1)))
  114.   (setq varlst (vl-remove "*ATOMS*" varlst))
  115.   (foreach var varlst
  116.     (if (not (or (eq (type (eval (read var))) 'SYM) (eq (type (eval (read var))) 'INT) (eq (type (eval (read var))) 'STR) (eq (type (eval (read var))) 'LIST) (eq (type (eval (read var))) 'REAL)))
  117.       (setq varlst (vl-remove var varlst))
  118.     )
  119.   )
  120.   (setq f1 (open (getfiled "Save variable names file" "\\varnames" "txt" 1) "w"))
  121.   (setq n -1)
  122.   (foreach var varlst
  123.     (write-line (nth (setq n (1+ n)) varlst) f1)
  124.   )
  125.   (close f1)
  126.   (setq f2 (open (getfiled "Save variable values file" "\\varvalues" "txt" 1) "w"))
  127.   (foreach var varlst
  128.     (cond
  129.       ( (eq (type (eval (read var))) 'REAL)
  130.         (write-line (rtos (eval (read var)) 2 50) f2)
  131.         (princ "\n" f2)
  132.       )
  133.       ( (eq (type (eval (read var))) 'LIST)
  134.         (write-line (vl-prin1-to-string (processlist (eval (read var)))) f2)
  135.         (princ "\n" f2)
  136.       )
  137.       ( t
  138.         (write-line (vl-prin1-to-string (eval (read var))) f2)
  139.         (princ "\n" f2)
  140.       )
  141.     )
  142.   )
  143.   (close f2)
  144.   (princ)
  145. )
  146.  
  147. (defun c:var-load ( / f1 f2 varlst varvallst l ll )
  148.   (setq f1 (open (getfiled "Load variable names file" "\\varnames" "txt" 16) "r"))
  149.   (while (setq l (read-line f1))
  150.     (setq varlst (cons (read l) varlst))
  151.   )
  152.   (close f1)
  153.   (setq ll "")
  154.   (setq f2 (open (getfiled "Load variable values file" "\\varvalues" "txt" 16) "r"))
  155.   (while (setq l (read-line f2))
  156.     (if (not (eq l ""))
  157.       (setq ll (strcat ll l))
  158.       (progn
  159.         (setq varvallst (cons (read ll) varvallst))
  160.         (setq ll "")
  161.       )
  162.     )
  163.   )
  164.   (close f2)
  165.   (mapcar 'set varlst varvallst)
  166.   (princ)
  167. )
  168.  

As I said I don't mind if it creates 2 txt files as long as it works correctly, but as you can see there is a problem with processing lists... I think (c:var-load) is fine as long as saved txt files are correct... (read) function should correctly perform reading long reals as strings like Lee thought, but how to read long point lists with reals as strings or entity lists that are unchanged when my recursive (processlist) function isn't working like I thought it should...

[EDIT : New subfunction revised... Now it truncates entity data list and leaves only needful data... Long real number strings haven't been added into entity data list and also this applies to point lists, so these values are buggy and are subjects of possible data loss...]

Code - Auto/Visual Lisp: [Select]
  1. ;;;
  2. ;;; put this lisp at line before last in acaddoc.lsp : (if (findfile "variables.lsp") (load "variables.lsp") (load (getfiled "Select variables.lsp file" "\\" "lsp" 16)))
  3. ;;;
  4. ;;; put this line as last one in acaddoc.lsp : (setq *atoms* (atoms-family 1))
  5. ;;;
  6.  
  7. (defun processlist ( l / LM:Flatten lf lstr la )
  8.  
  9.   (defun LM:Flatten ( l )
  10.     (if (atom l) (list l)
  11.       (append (LM:Flatten (car l)) (if (cdr l) (LM:Flatten (cdr l))))
  12.     )
  13.   )
  14.  
  15.   (setq lf (LM:Flatten l))
  16.   (setq lstr (vl-prin1-to-string l))
  17.   (foreach x lf
  18.     (if (not (or (eq (type x) 'INT) (eq (type x) 'REAL) (eq (type x) 'STR) (eq (type x) 'SYM)))
  19.       (setq la (cons (cons (vl-prin1-to-string x) (type x)) la))
  20.     )
  21.   )
  22.   (setq la (reverse la))
  23.   (foreach x la
  24.     (if (vl-string-search (car x) lstr)
  25.       (setq lstr (vl-string-subst (vl-prin1-to-string (cdr x)) (car x) lstr))
  26.     )
  27.   )
  28.   (read lstr)
  29. )
  30.  
  31. (defun c:var-save ( / varlst f1 f2 n )
  32.   (setq varlst (vl-remove-if '(lambda ( x ) (vl-position x *atoms*)) (atoms-family 1)))
  33.   (setq varlst (vl-remove "*ATOMS*" varlst))
  34.   (foreach var varlst
  35.     (if (not (or (eq (type (eval (read var))) 'SYM) (eq (type (eval (read var))) 'INT) (eq (type (eval (read var))) 'STR) (eq (type (eval (read var))) 'LIST) (eq (type (eval (read var))) 'REAL)))
  36.       (setq varlst (vl-remove var varlst))
  37.     )
  38.   )
  39.   (setq f1 (open (getfiled "Save variable names file" "\\varnames" "txt" 1) "w"))
  40.   (setq n -1)
  41.   (foreach var varlst
  42.     (write-line (nth (setq n (1+ n)) varlst) f1)
  43.   )
  44.   (close f1)
  45.   (setq f2 (open (getfiled "Save variable values file" "\\varvalues" "txt" 1) "w"))
  46.   (foreach var varlst
  47.     (cond
  48.       ( (eq (type (eval (read var))) 'REAL)
  49.         (write-line (rtos (eval (read var)) 2 50) f2)
  50.         (princ "\n" f2)
  51.       )
  52.       ( (eq (type (eval (read var))) 'LIST)
  53.         (write-line (vl-prin1-to-string (processlist (eval (read var)))) f2)
  54.         (princ "\n" f2)
  55.       )
  56.       ( t
  57.         (write-line (vl-prin1-to-string (eval (read var))) f2)
  58.         (princ "\n" f2)
  59.       )
  60.     )
  61.   )
  62.   (close f2)
  63.   (princ)
  64. )
  65.  
  66. (defun c:var-load ( / f1 f2 varlst varvallst l ll )
  67.   (setq f1 (open (getfiled "Load variable names file" "\\varnames" "txt" 16) "r"))
  68.   (while (setq l (read-line f1))
  69.     (setq varlst (cons (read l) varlst))
  70.   )
  71.   (close f1)
  72.   (setq ll "")
  73.   (setq f2 (open (getfiled "Load variable values file" "\\varvalues" "txt" 16) "r"))
  74.   (while (setq l (read-line f2))
  75.     (if (not (eq l ""))
  76.       (setq ll (strcat ll l))
  77.       (progn
  78.         (setq varvallst (cons (read ll) varvallst))
  79.         (setq ll "")
  80.       )
  81.     )
  82.   )
  83.   (close f2)
  84.   (mapcar 'set varlst varvallst)
  85.   (princ)
  86. )
  87.  

Still, this is better than my firstly posted code...
« Last Edit: December 18, 2015, 07:40:07 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: reuse saved variables
« Reply #18 on: December 17, 2015, 03:49:05 PM »
What inspiration did Lee suggest (aside from the rtos suggestion)? I didn't see any inspiration (I saw his post on how to begin assembling a list but that's not inspiration, that's how you'd go about the task) and I don't think he would have told you to use two files (that's just not a good way to do this). Or are you only talking about his rtos suggestion?

I havent touched AutoCAD or AutoLisp in years so I guess you're going to have to do what you want. I tried to give you what little code I had (obviously it was just code I was using testing ideas/reasons at the time but I must have been structuring the code/files like that for a reason(s)). Good luck.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reuse saved variables
« Reply #19 on: December 17, 2015, 06:02:06 PM »
Of all the absurd posts I've ever read that was the most recent.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: reuse saved variables
« Reply #20 on: December 17, 2015, 07:29:42 PM »
We've got something in common.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ribarm

  • Gator
  • Posts: 3255
  • Marko Ribar, architect
Re: reuse saved variables
« Reply #21 on: December 18, 2015, 08:40:26 AM »
So what - it took me one day to figure this out correctly... So no need for different functions - I was wrong and Lee as always with good suggestion... Also thanks to Lee for his LM:Flatten subfunction which is all what it was supposed to be needed (besides vl-string-* functions)...

Code - Auto/Visual Lisp: [Select]
  1. ;;;
  2. ;;; put this lisp at line before last in acaddoc.lsp : (if (findfile "variables.lsp") (load "variables.lsp") (load (getfiled "Select variables.lsp file" "\\" "lsp" 16)))
  3. ;;;
  4. ;;; put this line as last one in acaddoc.lsp : (setq *atoms* (atoms-family 1))
  5. ;;;
  6.  
  7. (defun processlist ( **l** / LM:Flatten **lf** **lstr** **la** **lr** **nn** )
  8.  
  9.   (defun LM:Flatten ( **l** )
  10.     (if (atom **l**) (list **l**)
  11.       (append (LM:Flatten (car **l**)) (if (cdr **l**) (LM:Flatten (cdr **l**))))
  12.     )
  13.   )
  14.  
  15.   (setq **lf** (LM:Flatten **l**))
  16.   (setq **lstr** (vl-prin1-to-string **l**))
  17.   (foreach **x** **lf**
  18.     (if (not (or (eq (type **x**) 'INT) (eq (type **x**) 'REAL) (eq (type **x**) 'STR) (eq (type **x**) 'SYM)))
  19.       (setq **la** (cons (cons (vl-prin1-to-string **x**) (type **x**)) **la**))
  20.     )
  21.   )
  22.   (setq **la** (reverse **la**))
  23.   (foreach **x** **lf**
  24.     (if (eq (type **x**) 'REAL)
  25.       (setq **lr** (cons (cons (vl-prin1-to-string **x**) (rtos **x** 2 50)) **lr**))
  26.     )
  27.   )
  28.   (setq **lr** (reverse **lr**))
  29.   (setq **nn** 0)
  30.   (foreach **x** **la**
  31.     (if (setq **nn** (vl-string-search (car **x**) **lstr** **nn**))
  32.       (setq **lstr** (vl-string-subst (vl-prin1-to-string (cdr **x**)) (car **x**) **lstr** **nn**))
  33.     )
  34.     (setq **nn** (+ **nn** (strlen (vl-prin1-to-string (cdr **x**)))))
  35.   )
  36.   (setq **nn** 0)
  37.   (foreach **x** **lr**
  38.     (if (setq **nn** (vl-string-search (car **x**) **lstr** **nn**))
  39.       (setq **lstr** (vl-string-subst (cdr **x**) (car **x**) **lstr** **nn**))
  40.     )
  41.     (setq **nn** (+ **nn** (strlen (cdr **x**))))
  42.   )
  43.   **lstr**
  44. )
  45.  
  46. (defun c:var-save ( / **varlst** **f1** **f2** **nn** )
  47.   (setq **varlst** (vl-remove-if '(lambda ( x ) (vl-position x *atoms*)) (atoms-family 1)))
  48.   (setq **varlst** (vl-remove "*ATOMS*" **varlst**))
  49.   (foreach **var** **varlst**
  50.     (if (not (or (eq (type (eval (read **var**))) 'SYM) (eq (type (eval (read **var**))) 'INT) (eq (type (eval (read **var**))) 'STR) (eq (type (eval (read **var**))) 'LIST) (eq (type (eval (read **var**))) 'REAL)))
  51.       (setq **varlst** (vl-remove **var** **varlst**))
  52.     )
  53.   )
  54.   (setq **f1** (open (getfiled "Save variable names file" "\\varnames" "txt" 1) "w"))
  55.   (setq **nn** -1)
  56.   (foreach **var** **varlst**
  57.     (write-line (nth (setq **nn** (1+ **nn**)) **varlst**) **f1**)
  58.   )
  59.   (close **f1**)
  60.   (setq **f2** (open (getfiled "Save variable values file" "\\varvalues" "txt" 1) "w"))
  61.   (foreach **var** **varlst**
  62.     (cond
  63.       ( (eq (type (eval (read **var**))) 'REAL)
  64.         (write-line (rtos (eval (read **var**)) 2 50) **f2**)
  65.         (princ "\n" **f2**)
  66.       )
  67.       ( (eq (type (eval (read **var**))) 'LIST)
  68.         (write-line (processlist (eval (read **var**))) **f2**)
  69.         (princ "\n" **f2**)
  70.       )
  71.       ( t
  72.         (write-line (vl-prin1-to-string (eval (read **var**))) **f2**)
  73.         (princ "\n" **f2**)
  74.       )
  75.     )
  76.   )
  77.   (close **f2**)
  78.   (princ)
  79. )
  80.  
  81. (defun c:var-load nil
  82.   (setq **f1** (open (getfiled "Load variable names file" "\\varnames" "txt" 16) "r"))
  83.   (while (setq **l** (read-line **f1**))
  84.     (setq **varlst** (cons (read **l**) **varlst**))
  85.   )
  86.   (close **f1**)
  87.   (setq **ll** "")
  88.   (setq **f2** (open (getfiled "Load variable values file" "\\varvalues" "txt" 16) "r"))
  89.   (while (setq **l** (read-line **f2**))
  90.     (if (not (eq **l** ""))
  91.       (setq **ll** (strcat **ll** **l**))
  92.       (progn
  93.         (setq **varvallst** (cons (read **ll**) **varvallst**))
  94.         (setq **ll** "")
  95.       )
  96.     )
  97.   )
  98.   (close **f2**)
  99.   (setq **l** nil **ll** nil **f1** nil **f2** nil)
  100.   (mapcar 'set **varlst** **varvallst**)
  101.   (setq **varlst** nil **varvallst** nil)
  102.   (princ)
  103. )
  104.  

So no loosing data values - just tested it should also work good and for entity data lists... Thanks to all for support and Happy Holidays, Marko R.
« Last Edit: December 23, 2015, 02:29:24 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 3255
  • Marko Ribar, architect
Re: reuse saved variables
« Reply #22 on: December 18, 2015, 09:22:45 AM »
Of all the absurd posts I've ever read that was the most recent.

And just one more thing to add :
"It is NOT absurd..."

Look here :
http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-a-text-from-a-long-text/m-p/5955380/highlight/true#M337556
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reuse saved variables
« Reply #23 on: December 18, 2015, 10:56:18 AM »
And just one more thing to add :
"It is NOT absurd..."

Ummm, you misunderstand. I was commenting on John's absurd, pathetic comment:

What inspiration did Lee suggest (aside from the rtos suggestion)? I didn't see any inspiration .. bla bla bla ...
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: reuse saved variables
« Reply #24 on: December 18, 2015, 02:54:15 PM »
*sigh* Here we go again. Just so we don't run the risk of painting this bike-shed again...

My `absurd, pathetic comment' was:
1. Me trying to state that I don't think Lee would have inspired/suggested that you do it that way. The keeping of two files is a flawed approach and I honestly don't think he would approach the problem that way (Not fair to pin those inherited problems on him).

2. I have no way of taking what little code I posted any further. I don't have a way to help with the code anymore then I already did (resources or knowledge).

And as far as my last comment goes, it was directed at MP (not you ribarm). I returned his quip with one in kind--which I shouldn't have (it obviously struck a nerve so I apologize, MP). My reply was a snarky way of pointing out that no one is/would be interested in comments/thoughts he has about the quality of another person's post. Again, sorry for making that last comment (I should have paused before replying).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ribarm

  • Gator
  • Posts: 3255
  • Marko Ribar, architect
Re: reuse saved variables
« Reply #25 on: December 19, 2015, 01:06:10 AM »
I've tested it once again and I've found some lacks with previously posted code... Please, revised code here :
http://www.theswamp.org/index.php?topic=50628.msg557923#msg557923

Regards, M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: reuse saved variables
« Reply #26 on: December 19, 2015, 02:12:29 PM »
1. Me trying to state that I don't think Lee would have inspired/suggested that you do it that way.

The arrogance that gives you the illusion you have the authority to determine what inspires others is petty and immature. I'm embarrassed for you.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: reuse saved variables
« Reply #27 on: December 19, 2015, 05:36:43 PM »
1. Me trying to state that I don't think Lee would have inspired/suggested that you do it that way.

The arrogance that gives you the illusion you have the authority to determine what inspires others is petty and immature. I'm embarrassed for you.

Enough. At the risk of exposing more 'arrogance', I don't think the OP started this thread to hear your opinions about how much you pity me. Please, start a new poll/thread if you can spare enough of your time and good nature to save my soul.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ribarm

  • Gator
  • Posts: 3255
  • Marko Ribar, architect
Re: reuse saved variables
« Reply #28 on: December 21, 2015, 05:08:28 PM »
Sorry if all this caused conflicts, I apologize if I was insulting anyone... Like I said I thank to all that have replied and wish to all very good and happy upcoming New Year and pleasant Holiday time... Now I've noticed that with my code there may come to conflicts with variable names and variables used in defined functions for saving, loading and processlist function... So I revised once more, but I couldn't come to anything more reliable than to mix their names with **name** syntax - it's not original idea, but as I use "l" variable, "n" variable and similar I overcome this problem in this manner... So be careful - it's not 100% proof on every cases, but that's how it is unfortunately with ALISP and *CAD...
Revision :
http://www.theswamp.org/index.php?topic=50628.msg557923#msg557923

Regards, and forget all bad moments that were in the past and turn on to good and happy future I hope to all...
« Last Edit: December 23, 2015, 02:29:47 AM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube