Jump to content



Featured Articles

Check out the latest featured articles.

File Library

Check out the latest downloads available in the File Library.

New Article

Product Viscosity vs. Shear

Featured File

Vertical Tank Selection

New Blog Entry

Low Flow in Pipes- posted in Ankur's blog

Hysys Excel Vba Link


This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic
Share this topic:
| More

#1 Vijay_G_K

Vijay_G_K

    Brand New Member

  • Members
  • 6 posts

Posted 13 May 2014 - 09:25 AM

Hi,
 
I am trying to extract the content of notes tab of each stream of hysys.
I able to fetch other values of the stream through vba excel but not getting the way to fetch the Notes Tab content.
Below is a part of my code.
Please help on this.
 
Thank in advance.
 
 
 
 
    
    Set hyOperations = hyFlowsheet.Operations
    Set hyStreams = hyFlowsheet.Streams
 
 
 
    For Each hyStream In hyStreams
 
'I want the code to extract content of notes tab for each stream here.
 
 
    Next hyStream
 
 
End Sub


#2 Bobby Strain

Bobby Strain

    Gold Member

  • Members
  • 3,529 posts

Posted 13 May 2014 - 09:44 AM

Try Aspen Tech support site.

 

Bobby



#3 pavanayi

pavanayi

    Gold Member

  • ChE Plus Subscriber
  • 258 posts

Posted 13 May 2014 - 10:25 AM

Just checked the Hysys object browser. I couldn't find anything related, so I think it is either not available, or not exposed.



#4 Bobby Strain

Bobby Strain

    Gold Member

  • Members
  • 3,529 posts

Posted 13 May 2014 - 01:56 PM

So, you still haven't done as I suggested.

 

Bobby



#5 Vijay_G_K

Vijay_G_K

    Brand New Member

  • Members
  • 6 posts

Posted 13 May 2014 - 11:55 PM

Thanks Bobby,

 

just today I created my username in aspen tech support site.

 

May be I will receive the mail in 2 days as pr there info on site.



#6 Vijay_G_K

Vijay_G_K

    Brand New Member

  • Members
  • 6 posts

Posted 14 May 2014 - 06:16 AM

Just checked the Hysys object browser. I couldn't find anything related, so I think it is either not available, or not exposed.

If it is not in the object browser then how it can be displayed on hysys window. is there any other way to find this "Notes" tab.

Actually while modeling we go on writing the comments in this note tab only, and it becomes very much difficult to summarize all the notes from all the streams or operation object.

 

If it can be done using excel vba it will help me a lot.

 

thanks. 



#7 Bobby Strain

Bobby Strain

    Gold Member

  • Members
  • 3,529 posts

Posted 14 May 2014 - 09:18 AM

Download HSR from the site and you can find the code in there to do what you want. Notes are not exposed in the object model, so you have to use the backdoor approach to retrieve the note. Good luck.

 

Bobby



#8 Vijay_G_K

Vijay_G_K

    Brand New Member

  • Members
  • 6 posts

Posted 15 May 2014 - 12:06 AM

Thanks Bobby for the suggestion.

 

I have the HSR. Actually I learned the Excel hysys link by HSR. But in that no code is related to the "Notes" tab.

 

Backdoor approach I am not aware of. Can u post an example if it is readily available with you.

 

Vijay



#9 Bobby Strain

Bobby Strain

    Gold Member

  • Members
  • 3,529 posts

Posted 15 May 2014 - 09:20 AM

You should search all the code with the search feature. Search for whole word Notes. Seek and you shall find.

 

Bobby



#10 Vijay_G_K

Vijay_G_K

    Brand New Member

  • Members
  • 6 posts

Posted 21 May 2014 - 08:06 AM

Thanks bobby,

 

I got the solution in hsr. although it is verry much tricky but my purpose is solved.

 

Vijay



#11 pavanayi

pavanayi

    Gold Member

  • ChE Plus Subscriber
  • 258 posts

Posted 21 May 2014 - 09:07 AM

Please note, that back door approach may stop working when a new version is released. (Even though, the methods  I have used have not changed between versions till now, that does not mean it won't in the next release)



#12 Vijay_G_K

Vijay_G_K

    Brand New Member

  • Members
  • 6 posts

Posted 22 May 2014 - 02:23 AM

OK.

 

Although We are using 6.5 which is much latest. and if that script dont work atleast i know the steps how it works.

 

but i will take care of version change. 

 

Thanks

Vijay 






Similar Topics