algorithmic modeling for Rhino
I wrote a standalone VB program that continuously writes into a file using the random access mode.
(1) When I try to keep the file open in the VB program, the read component within grasshopper cannot read it.
(2) I then modified the VB program so that it continuously opens, writes and closes the file at some time interval. Then the grasshopper read component is able to read the file using a different time interval. However there are times the VB program and grasshopper tries to access the same file at the same time which causes the VB program to crash especially when the time intervals used are low <100 ms.
Was wondering whether there is anyway to circumvent the problem described in (1) where the file in VB remains open. This probably requires that the file is created as a shareable file but have not come across an option to do this.
The solution in (2) limits the lowest time interval to 400 ms which makes the response within grasshopper sluggish.
Many thanks
William
Tags:
Hi William,
somewhat surprising, the Read File component uses only Open and Read access modifiers, but it does seem the reading logic could be simplified and improved somewhat. In fact probably the best thing to do is copy the file somewhere private and only then try to read it, that should minimise the access conflicts.
However that's just a potential future fix, for the here and now you may need to implement your own custom reader component, or find some other way to pump data between different components in different files, for example using WCF.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2025 Created by Scott Davidson.
Powered by