User Data
Entities in DG Kernel models can store a user-defined integer number and a user-defined variable length string. See details at
Object User Data.
The topic below describes how more complicated formatted data can be stored with
the model.
Unformatted User Data Stream
KerrnelCAD models maintain a raw data buffer for usr-defined unformatted data.
The data can be either binary or textual and can have any size.
Access to the stream is implemented via
IBlob_DG interface. To obtain the interface query
extended properties
IDictionary_DG of the model via
IModel_DG >
IDictionary_DG and use IDictionary_DG.GetInterface("RawUserDataV7")
to obtain the interface, the actual type of which is (can be safely cast to)
IBlob_DG.
To embed a file into the model: Obtain
IBlob_DG as described above. Call
IBlob_DG.Load() to embed the file
To save the data to a file: Obtain
IBlob_DG as described above and call
IBlob_DG.Save()
To obtain or modify the data in memory obtain
IBlob_DG as described above and.use
IBlob_DG.Copy() or IBlob_DG.CopyTo()
methods which read or modify the data as an array of bytes.
|