Hello all.
I have a form with picturebox, a picturebox is used for drawing some lines.
Now i want to save a line has been drawn on picturebox as .dwg format.
How i can do this? Anyone in here how to do this?
Printable View
Hello all.
I have a form with picturebox, a picturebox is used for drawing some lines.
Now i want to save a line has been drawn on picturebox as .dwg format.
How i can do this? Anyone in here how to do this?
You'll need to explore the AutoDesk DWG file format. A great place to start would be here which attempts to document the data specifications of AutoDesk's undocumented format:
http://www.opendesign.com/files/gues....dwg_files.pdf
Using that, then you take your graphic information and write a properly formatted DWG file; since all a file is, is just a big lump of ASCII and/or binary data formatted in a special way.
The trick is, creating that lump of data. When I've had to do it in the past with a complex file format, I realized from looking over the documented specifications, that I wouldn't need to worry about 99% of the data in my file, all I needed to do was to take an empty, generic file with all the default data in it, and insert my custom data into it in a specific format at a specific place. Thus, I "saved" an "empty" file (like saving an AutoCad file with no lines or elements), and opened and modified that with my program to insert my data. To test it, I then tried to open my modified file back in the native program and if it complained it couldn't read the file or the file was corrupt, I knew I did something wrong. When it finally did read back my file with the additions I inserted into it, I knew I had a winner.
The reference is perfectly clear. It explains exactly how a DWG file is constructed and what each section of data is.
I think what you're expecting is a code-chunk where someone has already done it, which while possible, I wouldn't hold my breath for. There are no native controls in .NET that handle .DWG files, which as the reference points out, is a proprietary, undocumanted AutoDesk format that has been laboriously reverse-engineered over many years.
I could say "I JUST want to put this ice-cream sundae on the moon"... but like a lot of things, the devil's in the details.
Thank you in advance sir. But exactly i'm new of create a drawing application like this. Ur reference is for advanced people who have a strong knowledge of mathematics. Btw i'm really want to say thank you for ur advice. I will back to research and testing until i have a result to post in here. Just for som tasks on my college.
You could buy a 3d party component that does that, like RealDWG from Autodesk.
But you better have deep pockets!
EDIT:
Sorry, I didn't see this line. Obviously you will not want to buy such a component....