saving . . . saved The DWSIM inbuilt functions has been deleted. The DWSIM inbuilt functions has been hidden .
The DWSIM inbuilt functions
Title
Question
Hello,
where can I find all the DWSIM inbuilt functions? such as Getphase, Getprop, Setprop, WriteMessage and ...
secondly, in DWSIM Flowsheet, I make stream called feed which is ims1. ims1 includes multiple components. I want to extract mole fraction of every component by Getprop function:
ims1.GetProp('fraction', 'Overall', Ethylene, '', 'mole')
ims1.GetProp('fraction', 'Overall', Oxygen, '', 'mole')
  .
  .

but an Error occurs!
<table><tbody><tr><td>
</td><td>2</td><td>8/12/2021 5:24:59 PM</td><td>Error</td><td>UO-01: KeyNotFoundException : The given key was not present in the dictionary.
  at System.ThrowHelper.ThrowKeyNotFoundException()
  at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
  at DWSIM.Thermodynamics.Streams.MaterialStream.GetProp(String property, String phase, Object compIds, String calcType, String basis) in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM.Thermodynamics\Material Stream\MaterialStream.vb:line 3255



What should I do?
Regards
</td><td>+ Info</td></tr></tbody></table>

<table><tbody><tr><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td></tr></tbody></table>

DWSIM Custom-Unit-Operation-using-Python 03-04 min 10-20 sec 12-08-21, 7:28 p.m. Amirnmt

Answers:

It is difficult to fix the error from this post. Kindly upload the DWSIM file in a g-drive and share the link over here.
27-08-21, 9:05 p.m. priyamnayak


Thanks for your response!
I found the documentations of inbuilt python functions in DWSIM.
https://dwsim.inforside.com.br/api_help60/html/T_DWSIM_Thermodynamics_Streams_MaterialStream.htm
For any body else that see this answer, in the Script Manager section of  DWSIM UI you can find *insert Snippet*. When you click on insert snippet you can choose which object from Flowsheet you need to extract or set data from it and then choose which parameter you need to get or set. then an example of code will be shown in the python console!
27-08-21, 9:53 p.m. Amirnmt


Log-in to answer to this question.