Automation is actually an object oriented interface in VB or C++. You must be familiar with the advanced programming concepts to be able to use these interfaces. If so, you can read Aspen Automation manual and follow the examples. This manual is available online.
That's great but i think this code just take the outlet of hysys and how I can operate on the outlet data of hysys on matlab and again transfer the results to hysys?!
The following link can be very helpful: https://www.youtube.com/watch?v=imthvC5bW08
I recommend setting the variables that you want to manipulate or extract in the Hysys spreadsheet. In addition, it is advisable to place a pause in the execution of the MATLAB algorithm (using "pause (n)", n = seconds) to give hysys time to converge the simulation.