

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Excel Import to Rhinoscript</title>
	<atom:link href="http://cwwang.com/2008/04/08/excel-import-to-rhinoscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://cwwang.com/2008/04/08/excel-import-to-rhinoscript/</link>
	<description>Che-Wei Wang</description>
	<lastBuildDate>Sun, 13 Jun 2010 20:24:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: che-wei wang</title>
		<link>http://cwwang.com/2008/04/08/excel-import-to-rhinoscript/comment-page-1/#comment-450</link>
		<dc:creator>che-wei wang</dc:creator>
		<pubDate>Fri, 09 Apr 2010 15:22:04 +0000</pubDate>
		<guid isPermaLink="false">http://cwwang.com/?p=724#comment-450</guid>
		<description>Sorry. This is a known problem.  I would kill the process through your windows task manager.  Let me know if you find a solution for this.</description>
		<content:encoded><![CDATA[<p>Sorry. This is a known problem.  I would kill the process through your windows task manager.  Let me know if you find a solution for this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: office5280</title>
		<link>http://cwwang.com/2008/04/08/excel-import-to-rhinoscript/comment-page-1/#comment-449</link>
		<dc:creator>office5280</dc:creator>
		<pubDate>Thu, 08 Apr 2010 13:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://cwwang.com/?p=724#comment-449</guid>
		<description>Hey your scipt is great but i have a problem running it. 
I added it as a function and it runs great but it opens a new excel instance anytime I run it. have any ideas how to fix this?
thanks. 
Option Explicit
&#039;Script written by 
&#039;Script copyrighted by 
&#039;Script version Wednesday, April 07, 2010 8:22:36 PM

Call Main()
Sub Main()
	Rhino.EnableRedraw False
	Rhino.Print &quot;script started&quot;
	Dim arrCurves : arrCurves = Rhino.objectsbylayer(&quot;default&quot;)
	&#039;ReDim arrObjs(arrCurves)
	&#039;Dim Counta : Counta = 2
	Dim a 
	For a = 0 To ubound (arrCurves)
		Dim strCent : strCent = Rhino.CurveAreaCentroid(arrCurves(a))
		Dim dist : dist = exceldata ((a)+2,(4))
		&#039;Rhino.Print dist
		Dim newpt : newpt = Array(strCent(0)(0)+(2),strCent(0)(1),strCent(0)(2))
		&#039;Rhino.Print newpt
		Dim strpath : strpath = Rhino.addline(strcent(0),newpt)
		Dim strNewObj : strNewObj = Rhino.extrudecurve(arrCurves(a),strpath)
		&#039;arrObjs(a) = strNewObj
		Rhino.DeleteObject strpath
		&#039;Counta = Counta+1
		
	Next
	Rhino.Print &quot;script completed&quot;
	Rhino.EnableRedraw True
	Rhino.Redraw

End Sub
Function exceldata (a,b)
	Dim FileName, file, excel
	FileName = &quot;C:\Users\johncameronpalm\Desktop\master\centercitymaster1&quot;
	&#039;If isNull(FileName) Then Exit Function

	Set excel = CreateObject(&quot;Excel.Application&quot;)
	excel.Visible = False

	excel.Workbooks.Open(FileName)
	Set file = excel.ActiveSheet

	Dim x:x= file.Cells(a,b).Value

	Call Rhino.Print(x)

	excel.UserControl = True
End Function</description>
		<content:encoded><![CDATA[<p>Hey your scipt is great but i have a problem running it.<br />
I added it as a function and it runs great but it opens a new excel instance anytime I run it. have any ideas how to fix this?<br />
thanks.<br />
Option Explicit<br />
&#8216;Script written by<br />
&#8216;Script copyrighted by<br />
&#8216;Script version Wednesday, April 07, 2010 8:22:36 PM</p>
<p>Call Main()<br />
Sub Main()<br />
	Rhino.EnableRedraw False<br />
	Rhino.Print &#8220;script started&#8221;<br />
	Dim arrCurves : arrCurves = Rhino.objectsbylayer(&#8220;default&#8221;)<br />
	&#8216;ReDim arrObjs(arrCurves)<br />
	&#8216;Dim Counta : Counta = 2<br />
	Dim a<br />
	For a = 0 To ubound (arrCurves)<br />
		Dim strCent : strCent = Rhino.CurveAreaCentroid(arrCurves(a))<br />
		Dim dist : dist = exceldata ((a)+2,(4))<br />
		&#8216;Rhino.Print dist<br />
		Dim newpt : newpt = Array(strCent(0)(0)+(2),strCent(0)(1),strCent(0)(2))<br />
		&#8216;Rhino.Print newpt<br />
		Dim strpath : strpath = Rhino.addline(strcent(0),newpt)<br />
		Dim strNewObj : strNewObj = Rhino.extrudecurve(arrCurves(a),strpath)<br />
		&#8216;arrObjs(a) = strNewObj<br />
		Rhino.DeleteObject strpath<br />
		&#8216;Counta = Counta+1</p>
<p>	Next<br />
	Rhino.Print &#8220;script completed&#8221;<br />
	Rhino.EnableRedraw True<br />
	Rhino.Redraw</p>
<p>End Sub<br />
Function exceldata (a,b)<br />
	Dim FileName, file, excel<br />
	FileName = &#8220;C:\Users\johncameronpalm\Desktop\master\centercitymaster1&#8243;<br />
	&#8216;If isNull(FileName) Then Exit Function</p>
<p>	Set excel = CreateObject(&#8220;Excel.Application&#8221;)<br />
	excel.Visible = False</p>
<p>	excel.Workbooks.Open(FileName)<br />
	Set file = excel.ActiveSheet</p>
<p>	Dim x:x= file.Cells(a,b).Value</p>
<p>	Call Rhino.Print(x)</p>
<p>	excel.UserControl = True<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Methods: Excel &#38; Spreadsheets &#171; RhinoScripting Resources</title>
		<link>http://cwwang.com/2008/04/08/excel-import-to-rhinoscript/comment-page-1/#comment-194</link>
		<dc:creator>Methods: Excel &#38; Spreadsheets &#171; RhinoScripting Resources</dc:creator>
		<pubDate>Fri, 08 Aug 2008 06:30:27 +0000</pubDate>
		<guid isPermaLink="false">http://cwwang.com/?p=724#comment-194</guid>
		<description>[...] Excel import to RhinoScript Che-Wei Wag [...]</description>
		<content:encoded><![CDATA[<p>[...] Excel import to RhinoScript Che-Wei Wag [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
