<?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:blogger='http://schemas.google.com/blogger/2008' 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-8188475891671035565</id><updated>2026-10-14T03:23:11.625+07:00</updated><category term="hysys training"/><category term="hysys tutorial"/><category term="hysys simulation"/><category term="molar fraction"/><title type='text'>Hysys Excel Automation</title><subtitle type='html'>Hysys Excel Automation Training</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hysyssimulations.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://hysyssimulations.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Blog&#39;s Admin</name><uri>http://www.blogger.com/profile/14442932876555332550</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8188475891671035565.post-1798541144168780245</id><published>2013-10-01T16:20:00.003+07:00</published><updated>2014-05-03T19:02:09.226+07:00</updated><title type='text'>How to Use Hysys Splitter in VBA</title><content type='html'>&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Hi there,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This post is requested by Mayembe. He asked me to post a VBA code in Excel to access Hysys splitter.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Here is the VBA example&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;=================================================&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&#39; VBA code starts here&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Option Explicit&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public hyApp As HYSYS.Application&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public simCase As SimulationCase&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public tee1 As TeeOp&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public Sub StartHYSYS()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Dim filename As String&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Dim ratio As Variant&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp;&#39; LOADING HYSYS SIMULATION FILE&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set hyApp = CreateObject(&quot;HYSYS.Application&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; hyApp.Visible = True&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set simCase = hyApp.ActiveDocument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; If simCase Is Nothing Then&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename = Worksheets(&quot;Sheet1&quot;).Range(&quot;c4&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If filename &amp;lt;&amp;gt; &quot;False&quot; And simCase Is Nothing Then&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set simCase = GetObject(filename, &quot;HYSYS.SimulationCase&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; simCase.Visible = True&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; End If&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Set tee1 = simCase.Flowsheet.Operations(&quot;teeop&quot;).Item(&quot;tee-101&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;ratio = tee1.SplitsValue&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;ratio(0) = Worksheets(&quot;Sheet1&quot;).Range(&quot;c5&quot;).Value&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;ratio(1) = Worksheets(&quot;Sheet1&quot;).Range(&quot;c6&quot;).Value&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;tee1.Splits.SetValues ratio, &quot;&quot;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;End Sub&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&#39;this is the end of VBA code&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;=====================================&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Just for your note, &quot;&lt;b&gt;TEEOP&lt;/b&gt;&quot; is a operation code name for &quot;TEE&quot; or splitter in Hysys.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;And here is the excel interface. I use previous example of hysys file to develop our model. If you forget about our previous hysys model, check &lt;a href=&quot;http://hysyssimulations.blogspot.com/2013/05/pipe-segment-of-aspen-hysys-through.html&quot;&gt;previous example&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqpQ-GbPANu_HpVpmrbGJ3TYOIY01JdCnT7z8-lwCekIRNgTIC2CpGxcz_WvZ9N5U-AbdM3CBtVQYEsDOU3yVay3RytwafdhtMJkBeC73FXtF_Xq-oovuhDMP0-1cUft2u67i2Tci7ckUM/s1600/hysys+splitter+2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqpQ-GbPANu_HpVpmrbGJ3TYOIY01JdCnT7z8-lwCekIRNgTIC2CpGxcz_WvZ9N5U-AbdM3CBtVQYEsDOU3yVay3RytwafdhtMJkBeC73FXtF_Xq-oovuhDMP0-1cUft2u67i2Tci7ckUM/s400/hysys+splitter+2.PNG&quot; height=&quot;231&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJXhDFYC1EZzamlN84ojqvOtQSivSaemxppbgVAvMjWVDPYCQx78DCAGlA8ttOzqDWxdEjPb3LFBAPBcwgmlysG95DO_3ygnEaAkoClzAKWQla5MqgeAxQZ5ql4_yMAifwL_iMu-2lP2Th/s1600/SPLITTER+HYSYS.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJXhDFYC1EZzamlN84ojqvOtQSivSaemxppbgVAvMjWVDPYCQx78DCAGlA8ttOzqDWxdEjPb3LFBAPBcwgmlysG95DO_3ygnEaAkoClzAKWQla5MqgeAxQZ5ql4_yMAifwL_iMu-2lP2Th/s400/SPLITTER+HYSYS.PNG&quot; height=&quot;171&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Grab &lt;a href=&quot;http://adf.ly/leZo0&quot; target=&quot;_blank&quot;&gt;hysys file &lt;/a&gt;&amp;nbsp;and &lt;a href=&quot;http://adf.ly/leZxj&quot; target=&quot;_blank&quot;&gt;excel file&amp;nbsp;&lt;/a&gt;from google drive&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;That&#39;s it. Hysys splitter is in your hand.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Let me know that you have comment or request. We&#39;ll see what I can do. I hope.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Alex&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://hysyssimulations.blogspot.com/feeds/1798541144168780245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hysyssimulations.blogspot.com/2013/10/how-to-use-hysys-splitter-in-vba.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/1798541144168780245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/1798541144168780245'/><link rel='alternate' type='text/html' href='http://hysyssimulations.blogspot.com/2013/10/how-to-use-hysys-splitter-in-vba.html' title='How to Use Hysys Splitter in VBA'/><author><name>Blog&#39;s Admin</name><uri>http://www.blogger.com/profile/14442932876555332550</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqpQ-GbPANu_HpVpmrbGJ3TYOIY01JdCnT7z8-lwCekIRNgTIC2CpGxcz_WvZ9N5U-AbdM3CBtVQYEsDOU3yVay3RytwafdhtMJkBeC73FXtF_Xq-oovuhDMP0-1cUft2u67i2Tci7ckUM/s72-c/hysys+splitter+2.PNG" height="72" width="72"/><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8188475891671035565.post-7645954369359162281</id><published>2013-05-15T21:44:00.000+07:00</published><updated>2013-10-01T16:30:49.690+07:00</updated><title type='text'>Pipe Segment of Aspen Hysys Through Excel VBA</title><content type='html'>&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-0081060815620807&quot;;
google_ad_host = &quot;pub-1556223355139109&quot;;
/* 728155 */
google_ad_slot = &quot;5387905254&quot;;
google_ad_width = 728;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Now, we&#39;re trying to access pipesegment on Aspen Hysys 7.3 through VBA. This post is an answer of previous post comment.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Here is the example&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Create a table as shown figure&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOqFKWCKha_PVBHOd9ZnghLlcBZ9Scl_OlIo6plEzL03roOAxsZuFBOf2YH1GW_6ySp_UDvPE6GRUn2qJ5N_ZhdJzXKTnUYAcmXtG1MI_90dUbqK6Kl8vcgBUPbC5XiWvXV5Kf2sh9PexQ/s400/Capture333.PNG&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Then add following VBA code&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;
&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;Option Explicit&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Public hyApp As HYSYS.Application&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Public simCase As SimulationCase&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Public pStream As ProcessStream&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Public psegment As PipeSegment&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Public Sub StartHYSYS()&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Dim filename As String&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Dim ITEM As Integer&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Dim lengthVar As Variant&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Dim p_length, p_elev, p_rough, p_idiam, p_odiam, p_cond As Variant&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39; HYSYS CUSTOMATION THROUGH EXCEL TO ACCESS PIPE SEGMENT&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39; LOADING HYSYS SIMULATION FILE&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Set hyApp = CreateObject(&quot;HYSYS.Application&quot;)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; hyApp.Visible = True&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Set simCase = hyApp.ActiveDocument&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; If simCase Is Nothing Then&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename = Worksheets(&quot;HYSYS&quot;).Range(&quot;C4&quot;).Text&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If filename &amp;lt;&amp;gt; &quot;False&quot; And simCase Is Nothing Then&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set simCase = GetObject(filename, &quot;HYSYS.SimulationCase&quot;)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; simCase.Visible = True&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; End If&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39; define operation&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Set psegment = simCase.Flowsheet.Operations(&quot;pipeseg&quot;).ITEM(&quot;pipe-100&quot;)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39; define pipesegment&#39;s parameters&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; p_length = psegment.SegmentLengthValue&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; p_elev = psegment.SegmentElevationChangeValue&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; p_rough = psegment.RoughnessValue&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; p_idiam = psegment.SegmentInnerDiamValue&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; p_odiam = psegment.SegmentOuterDiamValue&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; p_cond = psegment.PipeConductValue&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;
&lt;i&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39; collecting data as variant&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; For ITEM = 1 To 4&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p_length(ITEM - 1) = Cells(6, ITEM + 2)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p_elev(ITEM - 1) = Cells(7, ITEM + 2)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p_odiam(ITEM - 1) = Cells(8, ITEM + 2)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p_idiam(ITEM - 1) = Cells(9, ITEM + 2)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p_rough(ITEM - 1) = Cells(10, ITEM + 2)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p_cond(ITEM - 1) = Cells(11, ITEM + 2)&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Next ITEM&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39; inputting data to hysys&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; psegment.SegmentLength.Values = p_length&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; psegment.SegmentElevationChange.Values = p_elev&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; psegment.Roughness.Values = p_rough&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; psegment.SegmentInnerDiam.Values = p_idiam&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; psegment.SegmentOuterDiam.Values = p_odiam&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; psegment.PipeConduct.Values = p_cond&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39; FINISH&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;End Sub&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;As you can see, Hysys model is just as simple as following figure.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaZobJePejXB06ZTC6Hd7h0-5xv0OSkEsdqCBKruvota5z1iMkw4UM2W-iqlUVC5A3CD2q3e_wxrkPfrTROniKqxUHdiWgOEInIGLfT8PIlZTS5CBtnzLBftoxA8O5n2ya9FOQqLicLPbA/s1600/Capture222.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;241&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaZobJePejXB06ZTC6Hd7h0-5xv0OSkEsdqCBKruvota5z1iMkw4UM2W-iqlUVC5A3CD2q3e_wxrkPfrTROniKqxUHdiWgOEInIGLfT8PIlZTS5CBtnzLBftoxA8O5n2ya9FOQqLicLPbA/s400/Capture222.PNG&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcgmapf6sVBee2jj6RLfMsScgoAAVcj47F-e_LCyzjpyyyti-2Uqqrxa3fcQdQ29Vcwc3b05lv3OhjtlfEc9SRtvh_Q2SrjALKDb8DLHGNCUyBIA_jeKEqIpTDqnjjAK_ZY6apBBYX_IOV/s1600/Capture22.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;113&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcgmapf6sVBee2jj6RLfMsScgoAAVcj47F-e_LCyzjpyyyti-2Uqqrxa3fcQdQ29Vcwc3b05lv3OhjtlfEc9SRtvh_Q2SrjALKDb8DLHGNCUyBIA_jeKEqIpTDqnjjAK_ZY6apBBYX_IOV/s400/Capture22.PNG&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;And now, pipe segment is on your hand :D&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://hysyssimulations.blogspot.com/feeds/7645954369359162281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hysyssimulations.blogspot.com/2013/05/pipe-segment-of-aspen-hysys-through.html#comment-form' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/7645954369359162281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/7645954369359162281'/><link rel='alternate' type='text/html' href='http://hysyssimulations.blogspot.com/2013/05/pipe-segment-of-aspen-hysys-through.html' title='Pipe Segment of Aspen Hysys Through Excel VBA'/><author><name>Blog&#39;s Admin</name><uri>http://www.blogger.com/profile/14442932876555332550</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOqFKWCKha_PVBHOd9ZnghLlcBZ9Scl_OlIo6plEzL03roOAxsZuFBOf2YH1GW_6ySp_UDvPE6GRUn2qJ5N_ZhdJzXKTnUYAcmXtG1MI_90dUbqK6Kl8vcgBUPbC5XiWvXV5Kf2sh9PexQ/s72-c/Capture333.PNG" height="72" width="72"/><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8188475891671035565.post-1124811169422375151</id><published>2013-05-03T10:07:00.006+07:00</published><updated>2013-10-01T16:31:19.913+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hysys simulation"/><category scheme="http://www.blogger.com/atom/ns#" term="hysys training"/><category scheme="http://www.blogger.com/atom/ns#" term="hysys tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="molar fraction"/><title type='text'>How to create and acces molar component (molar flowrate, composition, ect)</title><content type='html'>&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;It has been so long time not to update this blog. And now I&#39;m posting how to access stream component fraction, component molar flowrate and mass flowrate.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
Here is the VBA example&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Option Explicit&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public hyApp As HYSYS.Application&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public simCase As SimulationCase&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public pStream As ProcessStream&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public Sub StartHYSYS()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Dim filename As String&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Dim ITEM As Integer&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Dim Compositions As Variant&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&#39; HYSYS CUSTOMATION THROUGH EXCEL TO ACCESS STREAM COMPONENTS&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&#39; LOADING HYSYS SIMULATION FILE&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;Set hyApp = CreateObject(&quot;HYSYS.Application&quot;)&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;hyApp.Visible = True&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Set simCase = hyApp.ActiveDocument&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;If simCase Is Nothing Then&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename = Worksheets(&quot;HYSYS&quot;).Range(&quot;C4&quot;).Text&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;If filename &amp;lt;&amp;gt; &quot;False&quot; And simCase Is Nothing Then&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set simCase = GetObject(filename, &quot;HYSYS.SimulationCase&quot;)&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; simCase.Visible = True&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;End If&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;End If&lt;/i&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&#39; READ DATA FROM EXCEL TO &quot;STREAM 1&quot;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Set pStream = simCase.Flowsheet.MaterialStreams.ITEM(&quot;STREAM 1&quot;)&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Compositions = pStream.ComponentMolarFractionValue&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;For ITEM = 0 To 11&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;collect composition data as variant&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Compositions(ITEM) = Worksheets(&quot;HYSYS&quot;).Range(&quot;D&quot; &amp;amp; ITEM + 7).Value&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Next ITEM&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&#39; apply composition data&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;pStream.ComponentMolarFraction.Values = Compositions&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&#39; WRITE COMPOSITION DATA FROM HYSYS TO EXCEL FROM &quot;STREAM 3&quot;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;Set pStream = simCase.Flowsheet.MaterialStreams.ITEM(&quot;STREAM 3&quot;)&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;For ITEM = 0 To 11&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; number of components are 12&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&#39; component molar fraction&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Worksheets(&quot;HYSYS&quot;).Range(&quot;E&quot; &amp;amp; ITEM + 7).Value = pStream.ComponentMolarFraction(ITEM)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &#39; component mass flowrate&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Worksheets(&quot;HYSYS&quot;).Range(&quot;F&quot; &amp;amp; ITEM + 7).Value = pStream.ComponentMassFlow(ITEM)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&#39; component molar fraction&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Worksheets(&quot;HYSYS&quot;).Range(&quot;G&quot; &amp;amp; ITEM + 7).Value = pStream.ComponentMolarFlow(ITEM)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Next ITEM&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&#39; FINISH&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;i&gt;End Sub&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
Spreadsheet is look like this figure&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVe-Dg5-IapBmTf-sKGY15CAWfS1BSad1CoFMyCgWsFMsehAUSxmI2ykmeKZzn9rl3ZJJTFq8OnOMQapd-HIV1FzGHe9QyTmmgY3g73f1bM8Xrrrke6EHZ16xJOs0aE6MluwYvQ9ZtXlK6/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVe-Dg5-IapBmTf-sKGY15CAWfS1BSad1CoFMyCgWsFMsehAUSxmI2ykmeKZzn9rl3ZJJTFq8OnOMQapd-HIV1FzGHe9QyTmmgY3g73f1bM8Xrrrke6EHZ16xJOs0aE6MluwYvQ9ZtXlK6/s400/Capture.PNG&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Please note, hysys file source is located in Cell C4, refer to following code&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;filename = Worksheets(&quot;HYSYS&quot;).Range(&quot;C4&quot;).Text&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
Hysys stream is configured as following figure&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh62MQ2XYtvegZTfdraLJd4d3IiR7O6wA78pDWtzL4vY6XIlL6W5YzsqfdjiO3tuIvkXpSYJU6cqJj3vU1cCaH2cFImFi3i4LeHkLWrFl0A16RTAHpZYRcadARmruHU3kKPP7KsqejdJXUY/s1600/Capture2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;182&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh62MQ2XYtvegZTfdraLJd4d3IiR7O6wA78pDWtzL4vY6XIlL6W5YzsqfdjiO3tuIvkXpSYJU6cqJj3vU1cCaH2cFImFi3i4LeHkLWrFl0A16RTAHpZYRcadARmruHU3kKPP7KsqejdJXUY/s400/Capture2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Hope that helps. Any thought? Please feel free to comment.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://hysyssimulations.blogspot.com/feeds/1124811169422375151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hysyssimulations.blogspot.com/2013/05/how-to-create-and-acces-molar-component.html#comment-form' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/1124811169422375151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/1124811169422375151'/><link rel='alternate' type='text/html' href='http://hysyssimulations.blogspot.com/2013/05/how-to-create-and-acces-molar-component.html' title='How to create and acces molar component (molar flowrate, composition, ect)'/><author><name>Blog&#39;s Admin</name><uri>http://www.blogger.com/profile/14442932876555332550</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVe-Dg5-IapBmTf-sKGY15CAWfS1BSad1CoFMyCgWsFMsehAUSxmI2ykmeKZzn9rl3ZJJTFq8OnOMQapd-HIV1FzGHe9QyTmmgY3g73f1bM8Xrrrke6EHZ16xJOs0aE6MluwYvQ9ZtXlK6/s72-c/Capture.PNG" height="72" width="72"/><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8188475891671035565.post-5869149005892818839</id><published>2011-06-10T17:05:00.000+07:00</published><updated>2013-10-01T16:31:51.918+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hysys simulation"/><title type='text'>Hysys Type Library</title><content type='html'>&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;I forgot to mention about this one. Hysys simulation won&#39;t run if there is no Hysys Library on Excel. Hysys library can be found and activated through &lt;a href=&quot;http://www.amazon.com/Microsoft-Visual-Basic-2010-Step/dp/0735626693?ie=UTF8&amp;amp;tag=gly-21&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Microsoft Visual Basic&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=gly-21&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0735626693&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt; - Tools - References. Find Hysys Type Library, activate by check mark and OK.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4oRojteZK9k8cxoE4cAdFu7TmCEZQTrAdJCpVJ6C8iQJTduBzkZ5a1hIALW0X0ciTLkw3Stc2cEtjl7WfPw-H8JZBqoLhKmzyEP9bkJe6rtlVK3ndsbRhF1lCMeUcfDip2xEBjGCTf2iu/s1600/hysys+type+library.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4oRojteZK9k8cxoE4cAdFu7TmCEZQTrAdJCpVJ6C8iQJTduBzkZ5a1hIALW0X0ciTLkw3Stc2cEtjl7WfPw-H8JZBqoLhKmzyEP9bkJe6rtlVK3ndsbRhF1lCMeUcfDip2xEBjGCTf2iu/s640/hysys+type+library.PNG&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;This blog doesn&#39;t&amp;nbsp;contain&amp;nbsp;any tutorial of using &lt;a href=&quot;http://www.amazon.com/Yourself-Visual-Complete-Starter-ebook/dp/B003Q6CX28?ie=UTF8&amp;amp;tag=gly-21&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Visual Basic Application&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=gly-21&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B003Q6CX28&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;. You may learn by others literatures, like &lt;a href=&quot;http://www.amazon.com/Microsoft-Visual-Basic-2008-Step/dp/0735625379?ie=UTF8&amp;amp;tag=gly-21&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Visual Basic Application&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=gly-21&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0735625379&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://hysyssimulations.blogspot.com/feeds/5869149005892818839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hysyssimulations.blogspot.com/2011/06/hysys-type-library.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/5869149005892818839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/5869149005892818839'/><link rel='alternate' type='text/html' href='http://hysyssimulations.blogspot.com/2011/06/hysys-type-library.html' title='Hysys Type Library'/><author><name>Blog&#39;s Admin</name><uri>http://www.blogger.com/profile/14442932876555332550</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4oRojteZK9k8cxoE4cAdFu7TmCEZQTrAdJCpVJ6C8iQJTduBzkZ5a1hIALW0X0ciTLkw3Stc2cEtjl7WfPw-H8JZBqoLhKmzyEP9bkJe6rtlVK3ndsbRhF1lCMeUcfDip2xEBjGCTf2iu/s72-c/hysys+type+library.PNG" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8188475891671035565.post-404679779391861366</id><published>2011-06-10T15:23:00.000+07:00</published><updated>2014-05-03T18:59:52.450+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hysys training"/><category scheme="http://www.blogger.com/atom/ns#" term="hysys tutorial"/><title type='text'>Hysys Training to Link Hysys Valve to Excel</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Linking Hysys Simulation to access &lt;a href=&quot;http://www.amazon.com/Plantwide-Simulators-Chemical-Processing-Industries/dp/0824708016?ie=UTF8&amp;amp;tag=gly-21&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;HYSYS UNIT OPERATION VALVE&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-color: initial !important; border-width: initial !important;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=gly-21&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0824708016&quot; height=&quot;1&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/span&gt; using VBA macro.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Here is the source code:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;Option Explicit&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;Public hyApp As &lt;a href=&quot;http://www.amazon.com/Steady-Simulation-Refinery-Commercial-Software/dp/096792748X?ie=UTF8&amp;amp;tag=gly-21&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;HYSYS.Application&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=gly-21&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=096792748X&quot; height=&quot;1&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;Public simCase As SimulationCase&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;Public FEED1 As ProcessStream, FEED2 As ProcessStream&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;Public Sub Start&lt;a href=&quot;http://www.amazon.com/Refinery-Process-Modeling-Gerald-Kaes/dp/0967927471?ie=UTF8&amp;amp;tag=gly-21&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;HYSYS&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=gly-21&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0967927471&quot; height=&quot;1&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;()&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;Dim fileName As String&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;Dim PRESSFEED2 As Double, FLOWFEED2 As Double, TEMPFEED2 As Double&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;Dim VALVE1 As Valve, VALVE2 As Valve&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;Dim PRESSDROP1 As Double&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &#39; LOADING HYSYS SIMULATION FILE&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set hyApp = CreateObject(&quot;HYSYS.Application&quot;)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; hyApp.Visible = True&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set simCase = hyApp.ActiveDocument&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; If simCase Is Nothing Then&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName = Worksheets(&quot;Sheet1&quot;).Range(&quot;c2&quot;)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If fileName &amp;lt;&amp;gt; &quot;False&quot; And simCase Is Nothing Then&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set simCase = GetObject(fileName, &quot;HYSYS.SimulationCase&quot;)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; simCase.Visible = True&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; End If&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set FEED1 = simCase.Flowsheet.MaterialStreams.Item(&quot;FEED1&quot;)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D6&quot;).Value = FEED1.MassFlow.GetValue(&quot;LB/HR&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; import data MASS FLOWRATE from hysys simulation streams&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D7&quot;).Value = FEED1.Pressure.GetValue(&quot;PSIG&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; import data PRESSURE from hysys tutorial streams&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D8&quot;).Value = FEED1.Temperature.GetValue(&quot;C&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; import data TEMPERATURE from&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;hysys tutorial&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&amp;nbsp;streams&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set FEED2 = simCase.Flowsheet.MaterialStreams.Item(&quot;FEED2&quot;)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; PRESSFEED2 = Worksheets(&quot;Sheet1&quot;).Range(&quot;H7&quot;).Value&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FEED2.Pressure.SetValue PRESSFEED2, &quot;PSIA&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39; export pressure&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FLOWFEED2 = &lt;a href=&quot;http://www.amazon.com/Steady-Simulation-Refinery-Commercial-Software/dp/096792748X?ie=UTF8&amp;amp;tag=gly-21&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Worksheets&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=gly-21&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=096792748X&quot; height=&quot;1&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;(&quot;Sheet1&quot;).Range(&quot;H6&quot;).Value&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FEED2.MolarFlow.SetValue FLOWFEED2, &quot;MMSCFD&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39; export molar flowrate&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; TEMPFEED2 = Worksheets(&quot;Sheet1&quot;).Range(&quot;H8&quot;).Value&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FEED2.Temperature.SetValue TEMPFEED2, &quot;F&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; export temperature&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &#39;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set VALVE1 = simCase.Flowsheet.Operations.Item(&quot;VALVE-1&quot;)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; PRESSDROP1 = Worksheets(&quot;Sheet1&quot;).Range(&quot;D16&quot;).Value&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; VALVE1.PressureDrop.SetValue PRESSDROP1, &quot;inHg(60F)&quot; &amp;nbsp; &amp;nbsp;&#39; send data pressure drop to hysys&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D12&quot;).Value = FEED1.Pressure.GetValue(&quot;psia&quot;) &amp;nbsp; &#39; get data from &lt;a href=&quot;http://www.amazon.com/Steady-Simulation-Refinery-Commercial-Software/dp/096792748X?ie=UTF8&amp;amp;tag=gly-21&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;hysys simulation&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=gly-21&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=096792748X&quot; height=&quot;1&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D13&quot;).Value = FEED1.Pressure.GetValue(&quot;inHg(60F)&quot;) &#39; get data from&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;hysys tutorial&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D14&quot;).Value = FEED1.Temperature.GetValue(&quot;c&quot;) &#39; get data from&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;hysys tutorial&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D15&quot;).Value = FEED1.Temperature.GetValue(&quot;r&quot;) &#39; get data from&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;hysys tutorial&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D18&quot;).Value = VALVE1.PressureDrop.GetValue(&quot;mmHg(0C)&quot;) &#39; get data from hysys simulation&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D19&quot;).Value = VALVE1.PressureDrop.GetValue(&quot;bar&quot;) &#39; get data from &lt;a href=&quot;http://www.amazon.com/Steady-Simulation-Refinery-Commercial-Software/dp/096792748X?ie=UTF8&amp;amp;tag=gly-21&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;hysys simulation&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=gly-21&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=096792748X&quot; height=&quot;1&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D20&quot;).Value = VALVE1.PressureDrop.GetValue(&quot;kPa&quot;) &#39; get data from&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;hysys tutorial&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D21&quot;).Value = VALVE1.PressureDrop.GetValue(&quot;atm&quot;) &#39; get data from&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;hysys tutorial&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D22&quot;).Value = VALVE1.PressureDrop.GetValue(&quot;psi&quot;) &#39; get data from&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;hysys tutorial&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;i&gt;End Sub&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;HYSYS simulation and excel file can be &lt;a href=&quot;http://adf.ly/leZER&quot; target=&quot;_blank&quot;&gt;downloaded here&lt;/a&gt;. &lt;b&gt;REMEMBER TO CHANGE HYSYS SIMULATION DIRECTORY ADDRESS ON CELL &quot;C2&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Note: Hysys simulation is generated by Hysys V7.1, may not work well in previous version of Hysys, s.a Hysys 2006 or Hysys 3.2.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If Hysys V7.1 is not available, make your own simulation.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Stream FEED1 and FEED2 specification can be found in &lt;a href=&quot;http://hysyssimulations.blogspot.com/2011/06/how-to-link-hysys-simulation-to-excel.html&quot;&gt;previous post&lt;/a&gt;&amp;nbsp;. Read and simulate&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://hysyssimulations.blogspot.com/2011/06/how-to-link-hysys-simulation-to-excel.html&quot;&gt;previous post&lt;/a&gt;, add two Valves named &quot;VALVE-1&quot; and &quot;VALVE-2&quot;, add two more streams and named &quot;OUT-1&quot; and &quot;OUT-2&quot;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2lpGKv9_qFSzD1rdcFH1e1-I0CGyK0Gz0WkGTOrStQo4RT0icu1_W7jw5iglH2GzdrI8KUrvoXPiDrC8yQGHrhbvA8TYJGwVRINcaKQEXE2_K8uqjV8cfrT3PZ3rX0CC1PGv-kz4ID6GM/s1600/HYSYS+EXCEL+EXAMPLE+2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2lpGKv9_qFSzD1rdcFH1e1-I0CGyK0Gz0WkGTOrStQo4RT0icu1_W7jw5iglH2GzdrI8KUrvoXPiDrC8yQGHrhbvA8TYJGwVRINcaKQEXE2_K8uqjV8cfrT3PZ3rX0CC1PGv-kz4ID6GM/s320/HYSYS+EXCEL+EXAMPLE+2.PNG&quot; height=&quot;214&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Save in a specific folder/directory you like.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;MAKE SURE TO WRITE DIRECTORY ADDRESS TO CELL &quot;C2&quot; OR HYSYS FILE WILL NOT BE FOUND.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Make some test. Input pressure drop in Cell &quot;D16&quot;, and click &quot;RUN HYSYS&quot;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;widget FollowByEmail&quot; id=&quot;FollowByEmail1&quot;&gt;
&lt;span class=&quot;item-control blog-admin&quot;&gt;&lt;span class=&quot;widget-item-control&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;item-control blog-admin&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;clear&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/404679779391861366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/404679779391861366'/><link rel='alternate' type='text/html' href='http://hysyssimulations.blogspot.com/2011/06/how-to-link-hysys-simulation-to-excel_10.html' title='Hysys Training to Link Hysys Valve to Excel'/><author><name>Blog&#39;s Admin</name><uri>http://www.blogger.com/profile/14442932876555332550</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2lpGKv9_qFSzD1rdcFH1e1-I0CGyK0Gz0WkGTOrStQo4RT0icu1_W7jw5iglH2GzdrI8KUrvoXPiDrC8yQGHrhbvA8TYJGwVRINcaKQEXE2_K8uqjV8cfrT3PZ3rX0CC1PGv-kz4ID6GM/s72-c/HYSYS+EXCEL+EXAMPLE+2.PNG" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-8188475891671035565.post-8752232829404680884</id><published>2011-06-09T19:04:00.000+07:00</published><updated>2014-05-03T18:56:35.277+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hysys training"/><category scheme="http://www.blogger.com/atom/ns#" term="hysys tutorial"/><title type='text'>Hysys Tutorial to Link Hysys Streams on Excel</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;How to link Hysys Simulation to Excel?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Open &lt;a href=&quot;http://adf.ly/leXnl&quot; target=&quot;_blank&quot;&gt;Example1.HSC.&lt;/a&gt; This file is generated in Aspen Hysys V7.1, may not work in previous version of Hysys, such as Hysys 2006 or Hysys 3.2. If you have older version of Hysys, make your own simulation with two streams named FEED1 and FEED2. Here is some operating condition of the streams.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg65Hv2-brZSSt6v-LAFX33IAk9unTzHZbvfP7Y71DxoGnjRqUE4-73BtChY1vo5fysKclNgplLIzkxkQl8cpr39us9uUSF73jEa6SWx8sKQpAmS8Ixt0_s95Ej27mt9t35Q2rtODJp2zEq/s1600/data+example1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg65Hv2-brZSSt6v-LAFX33IAk9unTzHZbvfP7Y71DxoGnjRqUE4-73BtChY1vo5fysKclNgplLIzkxkQl8cpr39us9uUSF73jEa6SWx8sKQpAmS8Ixt0_s95Ej27mt9t35Q2rtODJp2zEq/s320/data+example1.PNG&quot; height=&quot;268&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Linking between Hysys Simulations and Excel using Macro VBA (Visual Basic Application). Create new module in Macro VBA and put this code.&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;Option Explicit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Public hyApp As HYSYS.Application&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Public simCase As SimulationCase&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;i&gt;&#39; LOADING HYSYS TUTORIAL FILE&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Set hyApp = CreateObject(&quot;HYSYS.Application&quot;)&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; hyApp.Visible = True&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set simCase = hyApp.ActiveDocument&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; If simCase Is Nothing Then&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName = Worksheets(&quot;inputhysys&quot;).Range(&quot;c2&quot;)&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If fileName &amp;lt;&amp;gt; &quot;False&quot; And simCase Is Nothing Then&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set simCase = GetObject(fileName, &quot;HYSYS.SimulationCase&quot;)&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; simCase.Visible = True&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; End If&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Note: I put directory address of Hysys file (HSC file) in cell C2. And the address is &lt;i&gt;H:\BLOG\hysys\example1.hsc.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;/i&gt;&lt;b&gt;PUT HSC FILE IN YOUR DIRECTORY, MAKE SURE YOU EDIT&amp;nbsp;&amp;nbsp;EDIT THE &amp;nbsp;DIRECTORY ADDRESS, OR HYSYS FILE WILL NOT BE LOADED&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;How to&amp;nbsp;Access&amp;nbsp;Hysys Streams from Excel?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Put this code to make link to Hysys Streams&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Public FEED1 As ProcessStream, FEED2 As ProcessStream&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Set FEED1 = simCase.Flowsheet.MaterialStreams.Item(&quot;FEED1&quot;)&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;How to Export Data from Excel To Hysys Simulation?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;How to Import Data from Hysys Streams to Excel File?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Write down this code to export and import data from and to excel&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Set FEED1 = simCase.Flowsheet.MaterialStreams.Item(&quot;FEED1&quot;)&lt;/i&gt;&lt;i&gt;Worksheets(&quot;Sheet1&quot;).Range(&quot;D6&quot;).Value = FEED1.MassFlow.GetValue(&quot;LB/HR&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; import data MASS FLOWRATE from hysys streams&lt;/i&gt;&lt;i&gt;Worksheets(&quot;Sheet1&quot;).Range(&quot;D7&quot;).Value = FEED1.Pressure.GetValue(&quot;PSIG&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; import data PRESSURE from hysys streams&lt;/i&gt;&lt;i&gt;Worksheets(&quot;Sheet1&quot;).Range(&quot;D8&quot;).Value = FEED1.Temperature.GetValue(&quot;C&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; import data TEMPERATURE from hysys streams&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Set FEED2 = simCase.Flowsheet.MaterialStreams.Item(&quot;FEED2&quot;)&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;PRESSFEED2 = Worksheets(&quot;Sheet1&quot;).Range(&quot;H7&quot;).Value&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FEED2.Pressure.SetValue PRESSFEED2, &quot;PSIA&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; export pressure&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;FLOWFEED2 = Worksheets(&quot;Sheet1&quot;).Range(&quot;H6&quot;).Value&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FEED2.MolarFlow.SetValue FLOWFEED2, &quot;MMSCFD&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39; export molar flowrate&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;TEMPFEED2 = Worksheets(&quot;Sheet1&quot;).Range(&quot;H8&quot;).Value&lt;/i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FEED2.Temperature.SetValue TEMPFEED2, &quot;F&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; export temperature&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://adf.ly/leYB9&quot; target=&quot;_blank&quot;&gt;Hysys file can be found here&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://adf.ly/leXnl&quot; target=&quot;_blank&quot;&gt;Excel file can be found here&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;MAKE SURE TO PUT CORRECT DIRECTORY ADDRESS OF HYSYS FILE IN CELL&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Here is complete code from example.xls&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Option Explicit&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public hyApp As HYSYS.Application&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public simCase As SimulationCase&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public FEED1 As ProcessStream, FEED2 As ProcessStream&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Public Sub StartHYSYS()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Dim fileName As String&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;Dim PRESSFEED2 As Double, FLOWFEED2 As Double, TEMPFEED2 As Double&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &#39; LOADING HYSYS TUTORIAL FILE&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set hyApp = CreateObject(&quot;HYSYS.Application&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; hyApp.Visible = True&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set simCase = hyApp.ActiveDocument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; If simCase Is Nothing Then&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName = Worksheets(&quot;Sheet1&quot;).Range(&quot;c2&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If fileName &amp;lt;&amp;gt; &quot;False&quot; And simCase Is Nothing Then&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set simCase = GetObject(fileName, &quot;HYSYS.SimulationCase&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; simCase.Visible = True&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; End If&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set FEED1 = simCase.Flowsheet.MaterialStreams.Item(&quot;FEED1&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D6&quot;).Value = FEED1.MassFlow.GetValue(&quot;LB/HR&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; import data MASS FLOWRATE from hysys streams&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D7&quot;).Value = FEED1.Pressure.GetValue(&quot;PSIG&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; import data PRESSURE from hysys streams&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Worksheets(&quot;Sheet1&quot;).Range(&quot;D8&quot;).Value = FEED1.Temperature.GetValue(&quot;C&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; import data TEMPERATURE from hysys streams&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; Set FEED2 = simCase.Flowsheet.MaterialStreams.Item(&quot;FEED2&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; PRESSFEED2 = Worksheets(&quot;Sheet1&quot;).Range(&quot;H7&quot;).Value&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FEED2.Pressure.SetValue PRESSFEED2, &quot;PSIA&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; export pressure&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FLOWFEED2 = Worksheets(&quot;Sheet1&quot;).Range(&quot;H6&quot;).Value&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FEED2.MolarFlow.SetValue FLOWFEED2, &quot;MMSCFD&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; export molar flowrate&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; TEMPFEED2 = Worksheets(&quot;Sheet1&quot;).Range(&quot;H8&quot;).Value&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; FEED2.Temperature.SetValue TEMPFEED2, &quot;F&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39; export temperature&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;End Sub&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Hysys Stream&amp;nbsp;Parameters&amp;nbsp;and units can be found here. REMEMBER TO TYPE UNIT AND PARAMETER AS DESCRIBED HERE.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://hysyssimulations.blogspot.com/feeds/8752232829404680884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hysyssimulations.blogspot.com/2011/06/how-to-link-hysys-simulation-to-excel.html#comment-form' title='82 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/8752232829404680884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8188475891671035565/posts/default/8752232829404680884'/><link rel='alternate' type='text/html' href='http://hysyssimulations.blogspot.com/2011/06/how-to-link-hysys-simulation-to-excel.html' title='Hysys Tutorial to Link Hysys Streams on Excel'/><author><name>Blog&#39;s Admin</name><uri>http://www.blogger.com/profile/14442932876555332550</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg65Hv2-brZSSt6v-LAFX33IAk9unTzHZbvfP7Y71DxoGnjRqUE4-73BtChY1vo5fysKclNgplLIzkxkQl8cpr39us9uUSF73jEa6SWx8sKQpAmS8Ixt0_s95Ej27mt9t35Q2rtODJp2zEq/s72-c/data+example1.PNG" height="72" width="72"/><thr:total>82</thr:total></entry></feed>