<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1953180787040293602</id><updated>2011-04-21T19:17:45.957-07:00</updated><title type='text'>ecoScript</title><subtitle type='html'>A few tutorials about scripting in ecotect.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ecoscript.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ecoscript.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1953180787040293602.post-5695624006065075114</id><published>2007-11-16T22:29:00.000-08:00</published><updated>2007-11-16T22:30:40.228-08:00</updated><title type='text'>new version of script</title><content type='html'>this version of the script will give you all the node values in the form of a list.&lt;br /&gt;&lt;br /&gt;The list is formated as Value, X,Y,Z&lt;br /&gt;&lt;br /&gt;x,y = get("grid.size")&lt;br /&gt;print("Cells", x, y)&lt;br /&gt;count = 0&lt;br /&gt;&lt;br /&gt;for j = 0, y-1 do&lt;br /&gt;&lt;br /&gt;line = ""&lt;br /&gt;&lt;br /&gt;for i = 0, x-1 do&lt;br /&gt;value = get("grid.cell", i, j, 0)&lt;br /&gt;a, b, c = get("grid.position", i, j)&lt;br /&gt;&lt;br /&gt;line = value&lt;br /&gt;&lt;br /&gt;excel("start", "Testing")&lt;br /&gt;&lt;br /&gt;excel("cell", 1, count)&lt;br /&gt;excel("value", line)&lt;br /&gt;excel("cell", 2, count)&lt;br /&gt;excel("value", a/100)&lt;br /&gt;excel("cell", 3, count)&lt;br /&gt;excel("value", b/100)&lt;br /&gt;excel("cell", 4, count)&lt;br /&gt;excel("value", c/100)&lt;br /&gt;&lt;br /&gt;count = count + 1&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953180787040293602-5695624006065075114?l=ecoscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ecoscript.blogspot.com/feeds/5695624006065075114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953180787040293602&amp;postID=5695624006065075114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/5695624006065075114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/5695624006065075114'/><link rel='alternate' type='text/html' href='http://ecoscript.blogspot.com/2007/11/new-version-of-script.html' title='new version of script'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953180787040293602.post-7542835945664715217</id><published>2007-10-28T12:17:00.001-07:00</published><updated>2007-10-28T12:17:41.845-07:00</updated><title type='text'>Thermal Comfort Tutorial</title><content type='html'>&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/-1dAyKuzh6k&amp;amp;rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/-1dAyKuzh6k&amp;amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953180787040293602-7542835945664715217?l=ecoscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ecoscript.blogspot.com/feeds/7542835945664715217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953180787040293602&amp;postID=7542835945664715217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/7542835945664715217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/7542835945664715217'/><link rel='alternate' type='text/html' href='http://ecoscript.blogspot.com/2007/10/thermal-comfort-tutorial.html' title='Thermal Comfort Tutorial'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953180787040293602.post-575858241367017222</id><published>2007-10-26T15:13:00.000-07:00</published><updated>2007-10-26T15:14:13.636-07:00</updated><title type='text'>sun tracking commands</title><content type='html'>If any one wants to have objects track objects in your file these are good commands to start your research with.&lt;br /&gt;&lt;br /&gt;                --find the orientation to the sun&lt;br /&gt;                --query that result&lt;br /&gt;                cmd("object.normal", objNum, 0)&lt;br /&gt;                --asumiuth&lt;br /&gt;                azm = get("object.angle", objNum, 3)&lt;br /&gt;                --altitude&lt;br /&gt;                alt = get("object.angle", objNum, 1)&lt;br /&gt;&lt;br /&gt;                --orient the alt and use the lock angle for the azmith&lt;br /&gt;                cmd("object.orient", objNum, azm, angLock)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953180787040293602-575858241367017222?l=ecoscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ecoscript.blogspot.com/feeds/575858241367017222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953180787040293602&amp;postID=575858241367017222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/575858241367017222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/575858241367017222'/><link rel='alternate' type='text/html' href='http://ecoscript.blogspot.com/2007/10/sun-tracking-commands.html' title='sun tracking commands'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953180787040293602.post-4297646367720725479</id><published>2007-10-26T14:55:00.000-07:00</published><updated>2007-10-26T14:59:46.577-07:00</updated><title type='text'>Friday Class</title><content type='html'>This is the sript we wrote in class friday. Enjoy....&lt;br /&gt;&lt;br /&gt;x,y = get("grid.size")&lt;br /&gt;print("Cells", x, y)&lt;br /&gt;&lt;br /&gt;for j = 0, y-1 do&lt;br /&gt;&lt;br /&gt;    line = ""&lt;br /&gt;&lt;br /&gt;    for i = 0, x-1 do&lt;br /&gt;        value = get("grid.cell", i, j, 0)&lt;br /&gt;       &lt;br /&gt;        line = value&lt;br /&gt;&lt;br /&gt;            excel("start", "Testing")&lt;br /&gt;&lt;br /&gt;            excel("cell", j, i)&lt;br /&gt;                excel("value", line)&lt;br /&gt;&lt;br /&gt;    end&lt;br /&gt;&lt;br /&gt;end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953180787040293602-4297646367720725479?l=ecoscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ecoscript.blogspot.com/feeds/4297646367720725479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953180787040293602&amp;postID=4297646367720725479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/4297646367720725479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/4297646367720725479'/><link rel='alternate' type='text/html' href='http://ecoscript.blogspot.com/2007/10/friday-class.html' title='Friday Class'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953180787040293602.post-7736874786402995058</id><published>2007-10-02T14:49:00.000-07:00</published><updated>2007-10-02T17:57:18.713-07:00</updated><title type='text'>Cycling Through Dates</title><content type='html'>&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Lbydh8iMdSE"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/Lbydh8iMdSE" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;This script gives builds on the previous example. This example cycles through months and checks the temperature of a wall after doing a spatial comfort calculation.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;filename = getUserFile(1, "Save Script Output to...")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;file = openfile (filename, "w")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; for i = 0,11,1 do&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  set("model.date", 21, i, 14)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  wallTemp = get("object.attr2", 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  write(file, wallTemp)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  write(file, "\n")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;closefile(file)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;For the second iteration of this script  we will tell the script to check what happens when you change the material of the surface that we are analyzing. To do this you will need to build an array of material index numbers. To do this you execute the following commands.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;matIndex = {}&lt;br /&gt;matIndex[0] = get("material.index", "ConcBlockPlaster")&lt;br /&gt;matIndex[1] = get("material.index", "FramedTimberPlaster")&lt;br /&gt;&lt;br /&gt;print(matIndex[1])&lt;br /&gt;&lt;br /&gt;set("object.material", 1, matIndex[1])&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 0);"&gt;Now, we need to build this into the existing script that we have been working on by adding a second loop that iterates through the materials.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;matIndex = {}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;matIndex[0] = get("material.index", "ConcBlockPlaster")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;matIndex[1] = get("material.index", "FramedTimberPlaster")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;filename = getUserFile(1, "Save Script Output to...")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;for x = 0,1,1 do&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;    set("object.material", 1, matIndex[x])&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    cmd("app.menu", "calculate.comfort", 0)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    file = openfile (filename, "a")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    for i = 0,11,1 do&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        set("model.date", 21, i, 14)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        wallTemp = get("object.attr2", 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        write(file, wallTemp)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        write(file, "\n")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    end&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;closefile(file)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953180787040293602-7736874786402995058?l=ecoscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ecoscript.blogspot.com/feeds/7736874786402995058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953180787040293602&amp;postID=7736874786402995058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/7736874786402995058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/7736874786402995058'/><link rel='alternate' type='text/html' href='http://ecoscript.blogspot.com/2007/10/cycling-through-dates.html' title='Cycling Through Dates'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953180787040293602.post-8701053248679998519</id><published>2007-09-30T12:22:00.000-07:00</published><updated>2007-10-02T17:58:28.085-07:00</updated><title type='text'>Drag and Drop</title><content type='html'>&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/4dYPADxLqY8"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/4dYPADxLqY8" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;These few video tutorials show you how the script editor in Ecotect makes it extremely easy to write scripts using the "drag and drop" style code editor.&lt;br /&gt;&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/PqWvuKgQnKk"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/PqWvuKgQnKk" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;first you will open the ecotect script editor&lt;br /&gt;&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/cK4MvuU9YPo"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/cK4MvuU9YPo" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;to start you will want to write this simple framework for exporting data to a txt file.&lt;br /&gt;&lt;br /&gt;the code will look like this.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;filename = getUserFile(1, "Save Script Output to...")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;file = openfile (filename, "w")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;write(file, "Print this text to the selected file.")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;closefile(file)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/KjsGERUWLcE"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/KjsGERUWLcE" type="application/x-shockwave-flash" wmode="transparent" height="350" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;next you will want to use the drag and drop code editor to drop in some predefined code that iterates though the analysis grid in ecotet.&lt;br /&gt;&lt;br /&gt;under the script editor language help you will go to Example Code templates &gt; User Defined Templates &gt; Customizing your templates &gt; Cycle through grid data and drop that item into your editor window.&lt;br /&gt;&lt;br /&gt;when you are done your code will look like this...&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;filename = getUserFile(1, "save script output to....");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;file = openfile (filename, "w");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;x,y = get("grid.size")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;print("Cells", x, y)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;for j = 0, y-1 do&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; line = ""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; for i = 0, x-1 do&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  value = get("grid.cell", i, j, 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  line = line..format("%0.4f, ", value);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  write(file, value);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  write(file, "\n");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; print(line)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;closefile(file);&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953180787040293602-8701053248679998519?l=ecoscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ecoscript.blogspot.com/feeds/8701053248679998519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953180787040293602&amp;postID=8701053248679998519' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/8701053248679998519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/8701053248679998519'/><link rel='alternate' type='text/html' href='http://ecoscript.blogspot.com/2007/09/lesson-one.html' title='Drag and Drop'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953180787040293602.post-3693149768900136946</id><published>2007-09-30T12:11:00.000-07:00</published><updated>2007-09-30T12:17:06.935-07:00</updated><title type='text'>Basics</title><content type='html'>&lt;span style="font-weight: bold;"&gt;variable types&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;&lt;span style="font-weight: bold;"&gt;integers&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;x = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;x,y,z = 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;strings are in quotations&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;name = "string"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;tables can store many variables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;table = {1,2,3,4,5,6}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;print(table[1])&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;print(table[4])&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;you can organize you code into functions if you plan to reuse the same command many times.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;function function_name ( args ) body end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;function count(n)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;return n*2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;// use the count function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;cont(7)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;loops&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;this for loop will print the letter i 11 times&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;for i = 0, 10 do&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;print(i)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;end&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953180787040293602-3693149768900136946?l=ecoscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ecoscript.blogspot.com/feeds/3693149768900136946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953180787040293602&amp;postID=3693149768900136946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/3693149768900136946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/3693149768900136946'/><link rel='alternate' type='text/html' href='http://ecoscript.blogspot.com/2007/09/basics.html' title='Basics'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1953180787040293602.post-6531895696579968628</id><published>2007-09-30T11:42:00.001-07:00</published><updated>2007-09-30T12:18:33.954-07:00</updated><title type='text'>Important Concepts/Commands</title><content type='html'>For this tutorial there are a few key concepts/commands you will need to understand if you want to begin to export your own data sets from Ecotect.&lt;br /&gt;&lt;br /&gt;Firstly, it is important to know where you can store data after calculations are performed and how to access that data after calculations are finished.&lt;br /&gt;&lt;br /&gt;- All objects in Ecotect can hold up to three attributes. What these attributes are will change depending on what you kind of calculations you ask the software to preform.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Accessing the attributes:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;get.object.XXX &lt;/strong&gt;object&lt;br /&gt;&lt;strong&gt;set.object.XXX  &lt;/strong&gt;object value&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-size:130%;" &gt;result = get("object.attr1", object)&lt;/span&gt;&lt;br /&gt;&lt;p&gt;XXX can equal any of the following....&lt;br /&gt;&lt;/p&gt;  &lt;table style="width: 542px; height: 244px;"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/th&gt; &lt;th&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;are&lt;/strong&gt;a&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Surface area (m²) - if planar.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;exp&lt;/strong&gt;osure&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Surface area exposed to outside conditions (m²) - if planar.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;len&lt;/strong&gt;gth&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Total length (m) - if linear.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;und&lt;/strong&gt;erground&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Surface area exposed to ground conditions (m²) - if planar.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;pan&lt;/strong&gt;elarea&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Surface overlapping a WINDOW / DOOR in adjacent zone (m²)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;res&lt;/strong&gt;olution&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Curve resolution for virtual polylines.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;attr1&lt;/strong&gt;&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Calculated Attribute Number 1.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;attr2&lt;/strong&gt;&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Calculated Attribute Number 2.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;attr3&lt;/strong&gt;&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Calculated Attribute Number 3.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;&lt;strong&gt;ind&lt;/strong&gt;ex&lt;/code&gt;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Calculated Numerical Index.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Exporting to Microsoft Excel:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:85%;" &gt;excel("start", "Testing")&lt;br /&gt;&lt;br /&gt;-- Fill up 15 rows of data&lt;br /&gt;for i = 1, 15 do&lt;br /&gt;excel("cell", 3, i)&lt;br /&gt;excel("value", i*5)&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;-- Add a formula to the bottom cell.&lt;br /&gt;excel("cell", 5, 16)&lt;br /&gt;excel("value", "=SUM(E1:E15)")&lt;br /&gt;excel("font bold")&lt;br /&gt;&lt;br /&gt;-- Make the cell in the 9th row bold and italic.&lt;br /&gt;excel("cell", 5, 9)&lt;br /&gt;excel("font", "bold italic")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Export to a .txt file:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:85%;" &gt;&lt;br /&gt;filename = getUserFile(1, "Save Script Output to...")&lt;br /&gt;&lt;br /&gt;file = openfile (filename, "w")&lt;br /&gt;&lt;br /&gt;write(file, "Print this text to the selected file.")&lt;br /&gt;&lt;br /&gt;closefile(file)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;if you want to export the contents of ecotect's annalysis grid to a text file your code would look like this. (as outlined in the above tutorial.)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-size:85%;" &gt;&lt;br /&gt;filename = getUserFile(1, "save script output to....");&lt;br /&gt;&lt;br /&gt;file = openfile (filename, "w");&lt;br /&gt;&lt;br /&gt;x,y = get("grid.size")&lt;br /&gt;print("Cells", x, y)&lt;br /&gt;&lt;br /&gt;for j = 0, y-1 do&lt;br /&gt;&lt;br /&gt; line = ""&lt;br /&gt;&lt;br /&gt; for i = 0, x-1 do&lt;br /&gt;     value = get("grid.cell", i, j, 0)&lt;br /&gt;     line = line..format("%0.4f, ", value);&lt;br /&gt;     write(file, value);&lt;br /&gt;     write(file, "\n");&lt;br /&gt; end&lt;br /&gt;&lt;br /&gt; print(line)&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;closefile(file);&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1953180787040293602-6531895696579968628?l=ecoscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ecoscript.blogspot.com/feeds/6531895696579968628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1953180787040293602&amp;postID=6531895696579968628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/6531895696579968628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1953180787040293602/posts/default/6531895696579968628'/><link rel='alternate' type='text/html' href='http://ecoscript.blogspot.com/2007/09/important-conceptscommands.html' title='Important Concepts/Commands'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><thr:total>0</thr:total></entry></feed>
