How to deal with Document.GetPrivateStream() in VB2005 or VB6?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I want to use the private stream OR the private storage of an inventor document. So any help is very welcome!
What I figured out until now is:
1) You can only use a private stream or a private storage in one document, not both at the same time.
2) The StreamName parameter is limited to 31 chars max
3) I can successfully create a private stream (or similar a storage) with the following code:
Dim oMyPrivateStream as Object = Document.GetPrivateStream("TestStreamName", True)
And now???
- What Type is oMyPrivateStream? I tried to cast it to System.IO.Stream, but this fails. I cast it to Inventor.IStream, this works but I does'n found any documentation how to use Inventor.IStream
- How to read and write data to the stream?
- How to seek, flush, close ... ?
A small full working sample code for VB2005 or VB6 would be great!
My goal is to save binary data (which can be large) with the Inventor.Document.
Other ways to do this are well known, attributes, iProperties, but I have no documentation about the limitations there. So I came to the private stream / storage.
Thanks,
Guido