<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836747#M160395</link>
    <description>Frank Oquendo escribió en mensaje &amp;lt;87nfff$kee19@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt;I'm not questioning you Michael, I just don't see your point. I'd&lt;BR /&gt;
appreciate&lt;BR /&gt;
&amp;gt;you taking the time to enlighten me because I'm sure you're right but I'm&lt;BR /&gt;
&amp;gt;also short-sighted.&lt;BR /&gt;
&lt;BR /&gt;
Just like an example:&lt;BR /&gt;
&lt;BR /&gt;
Why do you need to create variables on-the-fly&lt;BR /&gt;
i.e.&lt;BR /&gt;
    (eval (read (strcat "(setq v" (itoa 1) " 1)")))&lt;BR /&gt;
    (eval (read ....&lt;BR /&gt;
    etc&lt;BR /&gt;
if you can have a list like this:&lt;BR /&gt;
&lt;BR /&gt;
'(&lt;BR /&gt;
    ("v1" . 1)&lt;BR /&gt;
    ("v2" . 2)&lt;BR /&gt;
    ("v3" . 3)&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
where given the "name" you have the value&lt;BR /&gt;
&lt;BR /&gt;
(cdr (assoc "v3" mylist))&lt;BR /&gt;
&lt;BR /&gt;
Eduardo Muñoz</description>
    <pubDate>Mon, 07 Feb 2000 22:58:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2000-02-07T22:58:50Z</dc:date>
    <item>
      <title>Create Variables on the Fly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836736#M160384</link>
      <description>What Frank and Randy have shown do exactly what I need but before I go&lt;BR /&gt;
with the big move I am interested in how this method works.&lt;BR /&gt;
&lt;BR /&gt;
For instance both Frank and Randy showed how it could be done by&lt;BR /&gt;
providing the snipit code how do you suppose this is going to work&lt;BR /&gt;
without using set or read?&lt;BR /&gt;
&lt;BR /&gt;
Thank you all very much I never knew about the set command and I am&lt;BR /&gt;
extremely excited. \\\\Kicking myself//////&lt;BR /&gt;
&lt;BR /&gt;
David at the CADapult&lt;BR /&gt;
http://geocities.com/~cadapult&lt;BR /&gt;
&lt;BR /&gt;
On Mon, 7 Feb 2000 15:16:03 -0800, "R. Robert Bell"&lt;BR /&gt;
&lt;NOT.ROBERTB&gt; wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;I don't think that's a good example.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;Michael means that (nth I MyList) or (foreach I MyList), where MyList =&lt;BR /&gt;
&amp;gt;'("A" "B" "C"), is just as good as incrementing variable names (in fact,&lt;BR /&gt;
&amp;gt;less work!). Do I get a gold star, Mike? There is no compelling reason for&lt;BR /&gt;
&amp;gt;incrementing, dxf-style, lists, either.&lt;/NOT.ROBERTB&gt;</description>
      <pubDate>Mon, 07 Feb 2000 03:22:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836736#M160384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T03:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create Variables on the Fly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836737#M160385</link>
      <description>I want to know if it is possible to create variables on the fly inside&lt;BR /&gt;
a program.&lt;BR /&gt;
&lt;BR /&gt;
Lets say that I want to create 3 variables and I have  a function that&lt;BR /&gt;
will create those variables I have no problems creating them using&lt;BR /&gt;
this method&lt;BR /&gt;
&lt;BR /&gt;
(setq v1 "cool"&lt;BR /&gt;
        v2 "really cool"&lt;BR /&gt;
       v3 "Xtra cool"&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
Now lets say that I want to create 4 variables.  I would have to&lt;BR /&gt;
repeat the same process again, by defining v(1) v(2) v(3) and v(4)&lt;BR /&gt;
&lt;BR /&gt;
What I would really like to do is have v(4) created on the fly.  I&lt;BR /&gt;
guess what I really want to do is setup some kind of counter that as I&lt;BR /&gt;
loop though it generates the variable name "V" that has a strcat or&lt;BR /&gt;
something like it to add on the counter number to it so I would end up&lt;BR /&gt;
with (strcat "V" cnt) -&amp;gt; v1 is now a variable.&lt;BR /&gt;
&lt;BR /&gt;
Can this be done?  I have tried a number of ways but I keep throwing&lt;BR /&gt;
myself in a loop (more like spaghetti) and I get all kinds of&lt;BR /&gt;
confused.&lt;BR /&gt;
&lt;BR /&gt;
If this doesn't make sence let me know and I will try and explain it&lt;BR /&gt;
differently.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
David at the CADapult&lt;BR /&gt;
http://geocities.com/~cadapult/</description>
      <pubDate>Mon, 07 Feb 2000 21:30:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836737#M160385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T21:30:15Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836738#M160386</link>
      <description>It is possible using set, read and strcat etc., but why not rethink the dependent logic and use a&lt;BR /&gt;
list instead?&lt;BR /&gt;
&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
puckettm@bantrel.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
Imagination makes all things possible&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
David Garrigues wrote in message &amp;lt;38a133fc.457476039@adesknews.autodesk.com&amp;gt;...&lt;BR /&gt;
I want to know if it is possible to create variables on the fly inside&lt;BR /&gt;
a program.&lt;BR /&gt;
&lt;BR /&gt;
Lets say that I want to create 3 variables and I have  a function that&lt;BR /&gt;
will create those variables I have no problems creating them using&lt;BR /&gt;
this method&lt;BR /&gt;
&lt;BR /&gt;
(setq v1 "cool"&lt;BR /&gt;
        v2 "really cool"&lt;BR /&gt;
       v3 "Xtra cool"&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
Now lets say that I want to create 4 variables.  I would have to&lt;BR /&gt;
repeat the same process again, by defining v(1) v(2) v(3) and v(4)&lt;BR /&gt;
&lt;BR /&gt;
What I would really like to do is have v(4) created on the fly.  I&lt;BR /&gt;
guess what I really want to do is setup some kind of counter that as I&lt;BR /&gt;
loop though it generates the variable name "V" that has a strcat or&lt;BR /&gt;
something like it to add on the counter number to it so I would end up&lt;BR /&gt;
with (strcat "V" cnt) -&amp;gt; v1 is now a variable.&lt;BR /&gt;
&lt;BR /&gt;
Can this be done?  I have tried a number of ways but I keep throwing&lt;BR /&gt;
myself in a loop (more like spaghetti) and I get all kinds of&lt;BR /&gt;
confused.&lt;BR /&gt;
&lt;BR /&gt;
If this doesn't make sence let me know and I will try and explain it&lt;BR /&gt;
differently.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
David at the CADapult&lt;BR /&gt;
http://geocities.com/~cadapult/</description>
      <pubDate>Mon, 07 Feb 2000 21:40:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836738#M160386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T21:40:03Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836739#M160387</link>
      <description>You need to use the SET and READ functions. Here's an example. It'll create&lt;BR /&gt;
the variables v1 through v5, setting the value to 5n (5, 10, etc.)&lt;BR /&gt;
&lt;BR /&gt;
(setq c 0)&lt;BR /&gt;
(repeat 5&lt;BR /&gt;
  (set (read (strcat "v" (itoa (setq c (1+ c))))) (* c 5))&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Get free software and more at:&lt;BR /&gt;
http://msnhomepages.talkcity.com/protectionfault/foquendo&lt;BR /&gt;
&lt;BR /&gt;
"David Garrigues" &lt;DAVIDGUS&gt; wrote in message&lt;BR /&gt;
news:38a133fc.457476039@adesknews.autodesk.com...&lt;BR /&gt;
&amp;gt; I want to know if it is possible to create variables on the fly inside&lt;BR /&gt;
&amp;gt; a program.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Lets say that I want to create 3 variables and I have  a function that&lt;BR /&gt;
&amp;gt; will create those variables I have no problems creating them using&lt;BR /&gt;
&amp;gt; this method&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (setq v1 "cool"&lt;BR /&gt;
&amp;gt;         v2 "really cool"&lt;BR /&gt;
&amp;gt;        v3 "Xtra cool"&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Now lets say that I want to create 4 variables.  I would have to&lt;BR /&gt;
&amp;gt; repeat the same process again, by defining v(1) v(2) v(3) and v(4)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; What I would really like to do is have v(4) created on the fly.  I&lt;BR /&gt;
&amp;gt; guess what I really want to do is setup some kind of counter that as I&lt;BR /&gt;
&amp;gt; loop though it generates the variable name "V" that has a strcat or&lt;BR /&gt;
&amp;gt; something like it to add on the counter number to it so I would end up&lt;BR /&gt;
&amp;gt; with (strcat "V" cnt) -&amp;gt; v1 is now a variable.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Can this be done?  I have tried a number of ways but I keep throwing&lt;BR /&gt;
&amp;gt; myself in a loop (more like spaghetti) and I get all kinds of&lt;BR /&gt;
&amp;gt; confused.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; If this doesn't make sence let me know and I will try and explain it&lt;BR /&gt;
&amp;gt; differently.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; David at the CADapult&lt;BR /&gt;
&amp;gt; http://geocities.com/~cadapult/&lt;BR /&gt;
&amp;gt;&lt;/DAVIDGUS&gt;</description>
      <pubDate>Mon, 07 Feb 2000 21:49:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836739#M160387</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T21:49:33Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836740#M160388</link>
      <description>(setq counter_variable 4)&lt;BR /&gt;
(eval (read (strcat "(setq v" (itoa counter_variable) " " \"Cooler&lt;BR /&gt;
still!\")")))</description>
      <pubDate>Mon, 07 Feb 2000 21:52:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836740#M160388</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T21:52:39Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836741#M160389</link>
      <description>Interesting idea, Michael. Could you elaborate? If I'm not sure how many&lt;BR /&gt;
variables I need, how would you recommend approaching this?&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Get free software and more at:&lt;BR /&gt;
http://msnhomepages.talkcity.com/protectionfault/foquendo&lt;BR /&gt;
&lt;BR /&gt;
"Michael Puckett" &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
news:87ne8c$ke329@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; It is possible using set, read and strcat etc., but why not rethink the&lt;BR /&gt;
dependent logic and use a&lt;BR /&gt;
&amp;gt; list instead?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; puckettm@bantrel.com&lt;BR /&gt;
&amp;gt; &amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
&amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; ________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; David Garrigues wrote in message&lt;BR /&gt;
&amp;lt;38a133fc.457476039@adesknews.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; I want to know if it is possible to create variables on the fly inside&lt;BR /&gt;
&amp;gt; a program.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Lets say that I want to create 3 variables and I have  a function that&lt;BR /&gt;
&amp;gt; will create those variables I have no problems creating them using&lt;BR /&gt;
&amp;gt; this method&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (setq v1 "cool"&lt;BR /&gt;
&amp;gt;         v2 "really cool"&lt;BR /&gt;
&amp;gt;        v3 "Xtra cool"&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Now lets say that I want to create 4 variables.  I would have to&lt;BR /&gt;
&amp;gt; repeat the same process again, by defining v(1) v(2) v(3) and v(4)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; What I would really like to do is have v(4) created on the fly.  I&lt;BR /&gt;
&amp;gt; guess what I really want to do is setup some kind of counter that as I&lt;BR /&gt;
&amp;gt; loop though it generates the variable name "V" that has a strcat or&lt;BR /&gt;
&amp;gt; something like it to add on the counter number to it so I would end up&lt;BR /&gt;
&amp;gt; with (strcat "V" cnt) -&amp;gt; v1 is now a variable.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Can this be done?  I have tried a number of ways but I keep throwing&lt;BR /&gt;
&amp;gt; myself in a loop (more like spaghetti) and I get all kinds of&lt;BR /&gt;
&amp;gt; confused.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; If this doesn't make sence let me know and I will try and explain it&lt;BR /&gt;
&amp;gt; differently.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; David at the CADapult&lt;BR /&gt;
&amp;gt; http://geocities.com/~cadapult/&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/PUCKETTM&gt;</description>
      <pubDate>Mon, 07 Feb 2000 21:56:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836741#M160389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T21:56:53Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836742#M160390</link>
      <description>Like I said, rethink the dependent logic.&lt;BR /&gt;
&lt;BR /&gt;
Show me an example where a list won't work.&lt;BR /&gt;
&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
puckettm@bantrel.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
Imagination makes all things possible&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
Frank Oquendo wrote in message &amp;lt;87neun$ke331@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
Interesting idea, Michael. Could you elaborate? If I'm not sure how many&lt;BR /&gt;
variables I need, how would you recommend approaching this?&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Get free software and more at:&lt;BR /&gt;
http://msnhomepages.talkcity.com/protectionfault/foquendo&lt;BR /&gt;
&lt;BR /&gt;
"Michael Puckett" &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
news:87ne8c$ke329@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; It is possible using set, read and strcat etc., but why not rethink the&lt;BR /&gt;
dependent logic and use a&lt;BR /&gt;
&amp;gt; list instead?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; puckettm@bantrel.com&lt;BR /&gt;
&amp;gt; &amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
&amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; ________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; David Garrigues wrote in message&lt;BR /&gt;
&amp;lt;38a133fc.457476039@adesknews.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; I want to know if it is possible to create variables on the fly inside&lt;BR /&gt;
&amp;gt; a program.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Lets say that I want to create 3 variables and I have  a function that&lt;BR /&gt;
&amp;gt; will create those variables I have no problems creating them using&lt;BR /&gt;
&amp;gt; this method&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (setq v1 "cool"&lt;BR /&gt;
&amp;gt;         v2 "really cool"&lt;BR /&gt;
&amp;gt;        v3 "Xtra cool"&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Now lets say that I want to create 4 variables.  I would have to&lt;BR /&gt;
&amp;gt; repeat the same process again, by defining v(1) v(2) v(3) and v(4)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; What I would really like to do is have v(4) created on the fly.  I&lt;BR /&gt;
&amp;gt; guess what I really want to do is setup some kind of counter that as I&lt;BR /&gt;
&amp;gt; loop though it generates the variable name "V" that has a strcat or&lt;BR /&gt;
&amp;gt; something like it to add on the counter number to it so I would end up&lt;BR /&gt;
&amp;gt; with (strcat "V" cnt) -&amp;gt; v1 is now a variable.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Can this be done?  I have tried a number of ways but I keep throwing&lt;BR /&gt;
&amp;gt; myself in a loop (more like spaghetti) and I get all kinds of&lt;BR /&gt;
&amp;gt; confused.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; If this doesn't make sence let me know and I will try and explain it&lt;BR /&gt;
&amp;gt; differently.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; David at the CADapult&lt;BR /&gt;
&amp;gt; http://geocities.com/~cadapult/&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/PUCKETTM&gt;</description>
      <pubDate>Mon, 07 Feb 2000 21:57:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836742#M160390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T21:57:06Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836743#M160391</link>
      <description>I'm not questioning you Michael, I just don't see your point. I'd appreciate&lt;BR /&gt;
you taking the time to enlighten me because I'm sure you're right but I'm&lt;BR /&gt;
also short-sighted.&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Get free software and more at:&lt;BR /&gt;
http://msnhomepages.talkcity.com/protectionfault/foquendo&lt;BR /&gt;
&lt;BR /&gt;
"Michael Puckett" &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
news:87nf88$ke125@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Like I said, rethink the dependent logic.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Show me an example where a list won't work.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; puckettm@bantrel.com&lt;BR /&gt;
&amp;gt; &amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
&amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; ________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Frank Oquendo wrote in message &amp;lt;87neun$ke331@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; Interesting idea, Michael. Could you elaborate? If I'm not sure how many&lt;BR /&gt;
&amp;gt; variables I need, how would you recommend approaching this?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; Get free software and more at:&lt;BR /&gt;
&amp;gt; http://msnhomepages.talkcity.com/protectionfault/foquendo&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Michael Puckett" &lt;PUCKETTM&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:87ne8c$ke329@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; &amp;gt; It is possible using set, read and strcat etc., but why not rethink the&lt;BR /&gt;
&amp;gt; dependent logic and use a&lt;BR /&gt;
&amp;gt; &amp;gt; list instead?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; ________________________________&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; puckettm@bantrel.com&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
&amp;gt; &amp;gt; Imagination makes all things possible&lt;BR /&gt;
&amp;gt; &amp;gt; ________________________________&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; David Garrigues wrote in message&lt;BR /&gt;
&amp;gt; &amp;lt;38a133fc.457476039@adesknews.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt; I want to know if it is possible to create variables on the fly inside&lt;BR /&gt;
&amp;gt; &amp;gt; a program.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Lets say that I want to create 3 variables and I have  a function that&lt;BR /&gt;
&amp;gt; &amp;gt; will create those variables I have no problems creating them using&lt;BR /&gt;
&amp;gt; &amp;gt; this method&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; (setq v1 "cool"&lt;BR /&gt;
&amp;gt; &amp;gt;         v2 "really cool"&lt;BR /&gt;
&amp;gt; &amp;gt;        v3 "Xtra cool"&lt;BR /&gt;
&amp;gt; &amp;gt; )&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Now lets say that I want to create 4 variables.  I would have to&lt;BR /&gt;
&amp;gt; &amp;gt; repeat the same process again, by defining v(1) v(2) v(3) and v(4)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; What I would really like to do is have v(4) created on the fly.  I&lt;BR /&gt;
&amp;gt; &amp;gt; guess what I really want to do is setup some kind of counter that as I&lt;BR /&gt;
&amp;gt; &amp;gt; loop though it generates the variable name "V" that has a strcat or&lt;BR /&gt;
&amp;gt; &amp;gt; something like it to add on the counter number to it so I would end up&lt;BR /&gt;
&amp;gt; &amp;gt; with (strcat "V" cnt) -&amp;gt; v1 is now a variable.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Can this be done?  I have tried a number of ways but I keep throwing&lt;BR /&gt;
&amp;gt; &amp;gt; myself in a loop (more like spaghetti) and I get all kinds of&lt;BR /&gt;
&amp;gt; &amp;gt; confused.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; If this doesn't make sence let me know and I will try and explain it&lt;BR /&gt;
&amp;gt; &amp;gt; differently.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; David at the CADapult&lt;BR /&gt;
&amp;gt; &amp;gt; http://geocities.com/~cadapult/&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/PUCKETTM&gt;&lt;/PUCKETTM&gt;</description>
      <pubDate>Mon, 07 Feb 2000 22:05:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836743#M160391</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T22:05:48Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836744#M160392</link>
      <description>A list is exactly what I had in mind the problem is that I am basing&lt;BR /&gt;
everything on a function that will already be inside a function that&lt;BR /&gt;
has a list.  So what I am looking for is a way to set it.&lt;BR /&gt;
&lt;BR /&gt;
Then if the variable exists I can call it by name in a menu.&lt;BR /&gt;
&lt;BR /&gt;
Hey I have never used the set command so this is new territory for me&lt;BR /&gt;
but it looks like it will work.&lt;BR /&gt;
&lt;BR /&gt;
Thanks! I will give it a shot.&lt;BR /&gt;
David at the CADapult&lt;BR /&gt;
http://geocities.com/~cadapult/&lt;BR /&gt;
&lt;BR /&gt;
On Mon, 7 Feb 2000 14:40:03 -0700, "Michael Puckett"&lt;BR /&gt;
&lt;PUCKETTM&gt; wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;It is possible using set, read and strcat etc., but why not rethink the dependent logic and use a&lt;BR /&gt;
&amp;gt;list instead?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;puckettm@bantrel.com&lt;BR /&gt;
&amp;gt;&amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
&amp;gt;Imagination makes all things possible&lt;BR /&gt;
&amp;gt;________________________________&lt;/PUCKETTM&gt;</description>
      <pubDate>Mon, 07 Feb 2000 22:06:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836744#M160392</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T22:06:24Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836745#M160393</link>
      <description>Why not post the code?&lt;BR /&gt;
&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
puckettm@bantrel.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
Imagination makes all things possible&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
David Garrigues wrote in message &amp;lt;38a33ecc.460244202@adesknews.autodesk.com&amp;gt;...&lt;BR /&gt;
A list is exactly what I had in mind the problem is that I am basing&lt;BR /&gt;
everything on a function that will already be inside a function that&lt;BR /&gt;
has a list.  So what I am looking for is a way to set it.&lt;BR /&gt;
&lt;BR /&gt;
Then if the variable exists I can call it by name in a menu.&lt;BR /&gt;
&lt;BR /&gt;
Hey I have never used the set command so this is new territory for me&lt;BR /&gt;
but it looks like it will work.&lt;BR /&gt;
&lt;BR /&gt;
Thanks! I will give it a shot.&lt;BR /&gt;
David at the CADapult&lt;BR /&gt;
http://geocities.com/~cadapult/&lt;BR /&gt;
&lt;BR /&gt;
On Mon, 7 Feb 2000 14:40:03 -0700, "Michael Puckett"&lt;BR /&gt;
&lt;PUCKETTM&gt; wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;It is possible using set, read and strcat etc., but why not rethink the dependent logic and use a&lt;BR /&gt;
&amp;gt;list instead?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;________________________________&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;puckettm@bantrel.com&lt;BR /&gt;
&amp;gt;&amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
&amp;gt;Imagination makes all things possible&lt;BR /&gt;
&amp;gt;________________________________&lt;/PUCKETTM&gt;</description>
      <pubDate>Mon, 07 Feb 2000 22:08:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836745#M160393</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T22:08:25Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836746#M160394</link>
      <description>I hope you don't mind me joining in on the fun.&lt;BR /&gt;
&lt;BR /&gt;
I had a condition where I had to create differing types of block.&lt;BR /&gt;
&lt;BR /&gt;
So I added a modifier which would be determined based off the position,&lt;BR /&gt;
size, angle, and rotation.&lt;BR /&gt;
&lt;BR /&gt;
My modifier would be placed at the beginning then have the application&lt;BR /&gt;
attach the rest.&lt;BR /&gt;
&lt;BR /&gt;
The rest being, size and some xdata.&lt;BR /&gt;
&lt;BR /&gt;
I had to be able to separate certain blocks and categorize.&lt;BR /&gt;
&lt;BR /&gt;
I would have to see exactly what you're trying to accomplish to suggest&lt;BR /&gt;
anything else though.&lt;BR /&gt;
&lt;BR /&gt;
Should be the same principle.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rudy@whainc.com&lt;BR /&gt;
"Automation Equal Imagination..." - "Automating Success"&lt;BR /&gt;
Programmer/Developer/MIS Assist.&lt;BR /&gt;
www.wharchitects.com&lt;BR /&gt;
&lt;BR /&gt;
David Garrigues &lt;DAVIDGUS&gt; wrote in article&lt;BR /&gt;
&amp;lt;38a133fc.457476039@adesknews.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; I want to know if it is possible to create variables on the fly inside&lt;BR /&gt;
&amp;gt; a program.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Lets say that I want to create 3 variables and I have  a function that&lt;BR /&gt;
&amp;gt; will create those variables I have no problems creating them using&lt;BR /&gt;
&amp;gt; this method&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; (setq v1 "cool"&lt;BR /&gt;
&amp;gt;         v2 "really cool"&lt;BR /&gt;
&amp;gt;        v3 "Xtra cool"&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Now lets say that I want to create 4 variables.  I would have to&lt;BR /&gt;
&amp;gt; repeat the same process again, by defining v(1) v(2) v(3) and v(4)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; What I would really like to do is have v(4) created on the fly.  I&lt;BR /&gt;
&amp;gt; guess what I really want to do is setup some kind of counter that as I&lt;BR /&gt;
&amp;gt; loop though it generates the variable name "V" that has a strcat or&lt;BR /&gt;
&amp;gt; something like it to add on the counter number to it so I would end up&lt;BR /&gt;
&amp;gt; with (strcat "V" cnt) -&amp;gt; v1 is now a variable.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Can this be done?  I have tried a number of ways but I keep throwing&lt;BR /&gt;
&amp;gt; myself in a loop (more like spaghetti) and I get all kinds of&lt;BR /&gt;
&amp;gt; confused.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; If this doesn't make sence let me know and I will try and explain it&lt;BR /&gt;
&amp;gt; differently.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; David at the CADapult&lt;BR /&gt;
&amp;gt; http://geocities.com/~cadapult/&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;&lt;/DAVIDGUS&gt;</description>
      <pubDate>Mon, 07 Feb 2000 22:42:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836746#M160394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T22:42:15Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836747#M160395</link>
      <description>Frank Oquendo escribió en mensaje &amp;lt;87nfff$kee19@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt;I'm not questioning you Michael, I just don't see your point. I'd&lt;BR /&gt;
appreciate&lt;BR /&gt;
&amp;gt;you taking the time to enlighten me because I'm sure you're right but I'm&lt;BR /&gt;
&amp;gt;also short-sighted.&lt;BR /&gt;
&lt;BR /&gt;
Just like an example:&lt;BR /&gt;
&lt;BR /&gt;
Why do you need to create variables on-the-fly&lt;BR /&gt;
i.e.&lt;BR /&gt;
    (eval (read (strcat "(setq v" (itoa 1) " 1)")))&lt;BR /&gt;
    (eval (read ....&lt;BR /&gt;
    etc&lt;BR /&gt;
if you can have a list like this:&lt;BR /&gt;
&lt;BR /&gt;
'(&lt;BR /&gt;
    ("v1" . 1)&lt;BR /&gt;
    ("v2" . 2)&lt;BR /&gt;
    ("v3" . 3)&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
where given the "name" you have the value&lt;BR /&gt;
&lt;BR /&gt;
(cdr (assoc "v3" mylist))&lt;BR /&gt;
&lt;BR /&gt;
Eduardo Muñoz</description>
      <pubDate>Mon, 07 Feb 2000 22:58:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836747#M160395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T22:58:50Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836748#M160396</link>
      <description>Ok. Now I get it. Thanks for the tip. I can see where that would come in&lt;BR /&gt;
handy.&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Get free software and more at:&lt;BR /&gt;
http://msnhomepages.talkcity.com/protectionfault/foquendo&lt;BR /&gt;
&lt;BR /&gt;
"Eduardo Muñoz" &lt;EMF&gt; wrote in message&lt;BR /&gt;
news:87nj0m$ke232@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Frank Oquendo escribió en mensaje&lt;BR /&gt;
&amp;lt;87nfff$kee19@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt;I'm not questioning you Michael, I just don't see your point. I'd&lt;BR /&gt;
&amp;gt; appreciate&lt;BR /&gt;
&amp;gt; &amp;gt;you taking the time to enlighten me because I'm sure you're right but I'm&lt;BR /&gt;
&amp;gt; &amp;gt;also short-sighted.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Just like an example:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Why do you need to create variables on-the-fly&lt;BR /&gt;
&amp;gt; i.e.&lt;BR /&gt;
&amp;gt;     (eval (read (strcat "(setq v" (itoa 1) " 1)")))&lt;BR /&gt;
&amp;gt;     (eval (read ....&lt;BR /&gt;
&amp;gt;     etc&lt;BR /&gt;
&amp;gt; if you can have a list like this:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; '(&lt;BR /&gt;
&amp;gt;     ("v1" . 1)&lt;BR /&gt;
&amp;gt;     ("v2" . 2)&lt;BR /&gt;
&amp;gt;     ("v3" . 3)&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; where given the "name" you have the value&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (cdr (assoc "v3" mylist))&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Eduardo Muñoz&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/EMF&gt;</description>
      <pubDate>Mon, 07 Feb 2000 23:14:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836748#M160396</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T23:14:20Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836749#M160397</link>
      <description>David Garrigues escribió en mensaje&lt;BR /&gt;
&amp;lt;38a33ecc.460244202@adesknews.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt;A list is exactly what I had in mind the problem is that I am basing&lt;BR /&gt;
&amp;gt;everything on a function that will already be inside a function that&lt;BR /&gt;
&amp;gt;has a list.  So what I am looking for is a way to set it.&lt;BR /&gt;
&lt;BR /&gt;
I don't know what you're trying&lt;BR /&gt;
to do, but...&lt;BR /&gt;
&lt;BR /&gt;
Even a function is a list, so you can nest it.&lt;BR /&gt;
Example:&lt;BR /&gt;
&lt;BR /&gt;
(defun c:test ()&lt;BR /&gt;
    (setq sOpt (getstring "\nFunction: "))&lt;BR /&gt;
    (setq a&lt;BR /&gt;
        '(&lt;BR /&gt;
            ("a" . (defun c:func () (princ "\nHello a.")(princ)))&lt;BR /&gt;
            ("b" . (defun c:func () (princ "\nHello b.")(princ)))&lt;BR /&gt;
        )&lt;BR /&gt;
    )&lt;BR /&gt;
    (eval (cdr (assoc sOpt a)))&lt;BR /&gt;
    (princ)&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
Command: test&lt;BR /&gt;
Function: a&lt;BR /&gt;
Command: func&lt;BR /&gt;
Hello a.&lt;BR /&gt;
Command: test&lt;BR /&gt;
Function: b&lt;BR /&gt;
Command: func&lt;BR /&gt;
Hello b.&lt;BR /&gt;
&lt;BR /&gt;
You don't need to buid code at run time via (read ....&lt;BR /&gt;
&lt;BR /&gt;
Just trying to help&lt;BR /&gt;
&lt;BR /&gt;
    Eduardo Muñoz</description>
      <pubDate>Mon, 07 Feb 2000 23:14:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836749#M160397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T23:14:24Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836750#M160398</link>
      <description>I don't think that's a good example.&lt;BR /&gt;
&lt;BR /&gt;
Michael means that (nth I MyList) or (foreach I MyList), where MyList =&lt;BR /&gt;
'("A" "B" "C"), is just as good as incrementing variable names (in fact,&lt;BR /&gt;
less work!). Do I get a gold star, Mike? There is no compelling reason for&lt;BR /&gt;
incrementing, dxf-style, lists, either.&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
R. Robert Bell, MCSE&lt;BR /&gt;
Network Administrator (or, Modern-day Wizard)&lt;BR /&gt;
(remove the "not." in my address for direct e-mail)&lt;BR /&gt;
&lt;BR /&gt;
Eduardo Muñoz &lt;EMF&gt; wrote in message&lt;BR /&gt;
news:87nj0m$ke232@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Frank Oquendo escribió en mensaje&lt;BR /&gt;
&amp;lt;87nfff$kee19@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt;I'm not questioning you Michael, I just don't see your point. I'd&lt;BR /&gt;
&amp;gt; appreciate&lt;BR /&gt;
&amp;gt; &amp;gt;you taking the time to enlighten me because I'm sure you're right but I'm&lt;BR /&gt;
&amp;gt; &amp;gt;also short-sighted.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Just like an example:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Why do you need to create variables on-the-fly&lt;BR /&gt;
&amp;gt; i.e.&lt;BR /&gt;
&amp;gt;     (eval (read (strcat "(setq v" (itoa 1) " 1)")))&lt;BR /&gt;
&amp;gt;     (eval (read ....&lt;BR /&gt;
&amp;gt;     etc&lt;BR /&gt;
&amp;gt; if you can have a list like this:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; '(&lt;BR /&gt;
&amp;gt;     ("v1" . 1)&lt;BR /&gt;
&amp;gt;     ("v2" . 2)&lt;BR /&gt;
&amp;gt;     ("v3" . 3)&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; where given the "name" you have the value&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (cdr (assoc "v3" mylist))&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Eduardo Muñoz&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/EMF&gt;</description>
      <pubDate>Mon, 07 Feb 2000 23:16:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836750#M160398</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T23:16:03Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836751#M160399</link>
      <description>*&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
puckettm@bantrel.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
Imagination makes all things possible&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
R. Robert Bell wrote in message &amp;lt;87njo4$ke236@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
I don't think that's a good example.&lt;BR /&gt;
&lt;BR /&gt;
Michael means that (nth I MyList) or (foreach I MyList), where MyList =&lt;BR /&gt;
'("A" "B" "C"), is just as good as incrementing variable names (in fact,&lt;BR /&gt;
less work!). Do I get a gold star, Mike? There is no compelling reason for&lt;BR /&gt;
incrementing, dxf-style, lists, either.&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
R. Robert Bell, MCSE&lt;BR /&gt;
Network Administrator (or, Modern-day Wizard)&lt;BR /&gt;
(remove the "not." in my address for direct e-mail)&lt;BR /&gt;
&lt;BR /&gt;
Eduardo Muñoz &lt;EMF&gt; wrote in message&lt;BR /&gt;
news:87nj0m$ke232@adesknews2.autodesk.com...&lt;BR /&gt;
&amp;gt; Frank Oquendo escribió en mensaje&lt;BR /&gt;
&amp;lt;87nfff$kee19@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt; &amp;gt;I'm not questioning you Michael, I just don't see your point. I'd&lt;BR /&gt;
&amp;gt; appreciate&lt;BR /&gt;
&amp;gt; &amp;gt;you taking the time to enlighten me because I'm sure you're right but I'm&lt;BR /&gt;
&amp;gt; &amp;gt;also short-sighted.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Just like an example:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Why do you need to create variables on-the-fly&lt;BR /&gt;
&amp;gt; i.e.&lt;BR /&gt;
&amp;gt;     (eval (read (strcat "(setq v" (itoa 1) " 1)")))&lt;BR /&gt;
&amp;gt;     (eval (read ....&lt;BR /&gt;
&amp;gt;     etc&lt;BR /&gt;
&amp;gt; if you can have a list like this:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; '(&lt;BR /&gt;
&amp;gt;     ("v1" . 1)&lt;BR /&gt;
&amp;gt;     ("v2" . 2)&lt;BR /&gt;
&amp;gt;     ("v3" . 3)&lt;BR /&gt;
&amp;gt; )&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; where given the "name" you have the value&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (cdr (assoc "v3" mylist))&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Eduardo Muñoz&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/EMF&gt;</description>
      <pubDate>Mon, 07 Feb 2000 23:17:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836751#M160399</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T23:17:34Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836752#M160400</link>
      <description>Thanks for the star! But it wasn't gold! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;</description>
      <pubDate>Mon, 07 Feb 2000 23:27:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836752#M160400</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T23:27:21Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836753#M160401</link>
      <description>Hmmm, was when it left here.&lt;BR /&gt;
&lt;BR /&gt;
You must be running a MS newsreader.&lt;BR /&gt;
&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
puckettm@bantrel.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an AutoDESK classroom monitor&lt;BR /&gt;
Imagination makes all things possible&lt;BR /&gt;
________________________________&lt;BR /&gt;
&lt;BR /&gt;
R. Robert Bell wrote in message &amp;lt;87nkda$ke734@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
Thanks for the star! But it wasn't gold! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;</description>
      <pubDate>Mon, 07 Feb 2000 23:28:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836753#M160401</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T23:28:47Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836754#M160402</link>
      <description>Ah, you caught me! How can I be a MCSE, otherwise? Bill would be really&lt;BR /&gt;
upset with me, if I didn't. . .&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
R. Robert Bell, MCSE&lt;BR /&gt;
Network Administrator (or, Modern-day Wizard)&lt;BR /&gt;
(remove the "not." in my address for direct e-mail)</description>
      <pubDate>Mon, 07 Feb 2000 23:50:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836754#M160402</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-07T23:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create Variables on the Fly</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836755#M160403</link>
      <description>Why not post your code?&lt;BR /&gt;
&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
Michael Puckett&lt;BR /&gt;
programmer@cadvision.com&lt;BR /&gt;
&amp;gt; Not &amp;lt; an Autodesk hall monitor.&lt;BR /&gt;
Imagination makes all things possible.&lt;BR /&gt;
__________________________________&lt;BR /&gt;
&lt;BR /&gt;
"David Garrigues" &lt;DAVIDGUS&gt; wrote in message&lt;BR /&gt;
news:389e386d.198286876@adesknews.autodesk.com...&lt;BR /&gt;
What Frank and Randy have shown do exactly what I need but before I go&lt;BR /&gt;
with the big move I am interested in how this method works.&lt;BR /&gt;
&lt;BR /&gt;
For instance both Frank and Randy showed how it could be done by&lt;BR /&gt;
providing the snipit code how do you suppose this is going to work&lt;BR /&gt;
without using set or read?&lt;BR /&gt;
&lt;BR /&gt;
Thank you all very much I never knew about the set command and I am&lt;BR /&gt;
extremely excited. \\\\Kicking myself//////&lt;BR /&gt;
&lt;BR /&gt;
David at the CADapult&lt;BR /&gt;
http://geocities.com/~cadapult&lt;BR /&gt;
&lt;BR /&gt;
On Mon, 7 Feb 2000 15:16:03 -0800, "R. Robert Bell"&lt;BR /&gt;
&lt;NOT.ROBERTB&gt; wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;I don't think that's a good example.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;Michael means that (nth I MyList) or (foreach I MyList), where MyList =&lt;BR /&gt;
&amp;gt;'("A" "B" "C"), is just as good as incrementing variable names (in fact,&lt;BR /&gt;
&amp;gt;less work!). Do I get a gold star, Mike? There is no compelling reason for&lt;BR /&gt;
&amp;gt;incrementing, dxf-style, lists, either.&lt;/NOT.ROBERTB&gt;&lt;/DAVIDGUS&gt;</description>
      <pubDate>Tue, 08 Feb 2000 04:18:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-variables-on-the-fly/m-p/836755#M160403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-08T04:18:09Z</dc:date>
    </item>
  </channel>
</rss>

