Is it possible to keep a variable active with Revit Python Shell, using canned commands?
<p>I'm currently using Revit Python Shell <strong>2017</strong> and I'd like let's say to make "communicate" different canned commands.<br>
For instance, let's say I load a house model, and I create some additional walls on it, via a canned command that I would have previously created. While creating these walls, I could store all these new walls IDs in a variable, as a list.  </p>

<p>Now, if I want to delete exactly these walls afterwards, I'd like to identify them using their IDs that I stored in the list, then delete them.<br>
If I was in an interactive Python Shell session, well the "IDs list" variable would still be accessible (as long as I don't close the shell), and I could just retrieve the IDs from it, then delete the walls.<br>
But what if I'm using canned commands? The first command would be "create the walls", and the 2nd would be "erase these walls". But that "IDs list" variable doesn't exists in the second canned command environment, so that I can't use it to erase the walls.</p>

<p>So, what would be the approach? Of course in this example I could identify the walls in the second command using a different methodology, such as asking the user to select them etc etc.. But the idea I'm going for would be the store that list from the first command "somewhere in Revit", and retrieve it when calling the second command. </p>

<p>I could write the list to an external text file, and read the file in the second command... but is there a cleaner way?</p>

<p>I'm sorry for the beginner's language used here, and hope that my question is clear enough! And that somebody can help ;)</p>

<p>Best,<br>
Arnaud.</p>