Hello,
I need to store binary data that contain information about the document iside the drawing
For Examble i have data stored into the MyDat.dat binary file
If my information was a simple integer value i sould store it to document using userI1..5 System variables (which autocad stores with the drawing)
The system variables someone can keep stored in the drawing are 5 integers (userI1..5) and 5 reals (userR1..5)
There are aditionally 5 strings (userS1..5) who are lost by saving and closing the document.
So, i have no the ability sto store long binary information inside the drawing.
If it's bossible
a) To store the contents (the stream) of MyDat.dat file to drawing (dwg file) so that i don't need to keep a separate file.
b) to Retreive the data from drawing and store them to a temporay MyDat.dat file , and handle them.
I don't see something that helps me looking at the object model 's ActiveDocument object properties and methods.
Can anyone help me in this?
Gery
Not sure of the complexity of your binary data, but you have several a few options.
If you're not so good at coding, then the simplest way would be to add your own custom SystemVariable(s) as I show in this thread, just be sure to set the StorageType XmlAttribute's value to Database Type, so the data will be saved to the drawing (available in 2015+ only).
If you're adept at coding, or using 2014 (and older), then you might instead simply store your data to NOD (Named Object Dictionary) via XRecord, unless storing to individual Objects via XData is more ideal (again, not sure of the context of your binary data).
Cheers
"How we think determines what we do, and what we do determines what we get."
I use the Acad2006 vers.
As I see in object model , document property got the Dictionaries property wich has
1) the GetXData methode
2) the SetXData methode
My Data are binary (the contents of my binary file) - a stream of bytes
As I use Delphi (Pascal) to manipulate the acad ole sould i know a way to store data
if i use the following
var MyData:array of byte;
Wich is the DataType for this ?
Stupid question time: why does it have to be stored as binary data?
Hello
I am not at all a programmer but this document can help you if you plan to use Dictionnaries & Xrecords ...
Patrice BRAUD