trouble getting DXF code right for ellipse
trouble getting DXF code right for ellipse
(OP)
Hi,
I was wondering if anyone might be able to help me here. I was trying to write DXF code for drawing an Ellipse. So here is what i did. I got the code by drawing an ellipse and then saved it as DXF. So I started off with a blank page. I began writing it as follows
0
SECTION
2
ENTITIES
0
ELLIPSE
8
0
10
629.4185943561319
20
564.6465625762273
30
0.0
11
0.0
21
-182.0310286257299
31
0.0
210
0.0
220
0.0
230
1.0
40
0.3696612519921331
41
0.0
42
6.283185307179586
0
ENDSEC
0
EOF
I got an error while opening this DXF drawing. it said that "Undefined group code 10 for object on line 10"
I thought 10 denotes the X-Coordinates. Why is the autocad not able to define it?
Thank you in advance
I was wondering if anyone might be able to help me here. I was trying to write DXF code for drawing an Ellipse. So here is what i did. I got the code by drawing an ellipse and then saved it as DXF. So I started off with a blank page. I began writing it as follows
0
SECTION
2
ENTITIES
0
ELLIPSE
8
0
10
629.4185943561319
20
564.6465625762273
30
0.0
11
0.0
21
-182.0310286257299
31
0.0
210
0.0
220
0.0
230
1.0
40
0.3696612519921331
41
0.0
42
6.283185307179586
0
ENDSEC
0
EOF
I got an error while opening this DXF drawing. it said that "Undefined group code 10 for object on line 10"
I thought 10 denotes the X-Coordinates. Why is the autocad not able to define it?
Thank you in advance





RE: trouble getting DXF code right for ellipse
I don't know, but do yoe know this page:
ht
L.
ADT 2004
ACAD 2002
RE: trouble getting DXF code right for ellipse
I think i've got everything already based on the link you gave me. but it keeps on saying undefined group code 10. How do i define group code 10?
I don't know. This thing has driven me mad. I don't know if i should choose other shape. Ellipse is an ideal shape for my project. But i can't get it to work.
Is there anyone might have tried drawing ellipse using DXF code before that works? I'd really appreciate it.
Thank you in advance
RE: trouble getting DXF code right for ellipse
Your DXF file opens just fine in every viewer and Cad program that I have. I suspect that you can get Autocad to open it as an earlier format. Which version do you need this DXF to open in? You may need the expert advice of someone familiar with the later versions.
RE: trouble getting DXF code right for ellipse
Correction : I couldn't open your DXF in Voloview Express 2.01 . Evidently Autodesk's idea of a minimal CAD file is more elaborate than seems necessary.
RE: trouble getting DXF code right for ellipse
Thank you for your reply.
I was trying to open it via AutoCAD 2005. But it failed to open it giving me the error i described earlier.
Which AutoCAD program do you use if i may ask?
Thank you in advance
RE: trouble getting DXF code right for ellipse
Mike Halloran
Pembroke Pines, FL, USA
RE: trouble getting DXF code right for ellipse
I don't have Autocad. I use Intellicad V4 Standard. I also have Cadkey 19, used mostly for its STEP and IGES translators. Both Cadkey and Intellicad can read and write Autocad 2000 DWG and DXF and earlier files.
Mike Halloran reports he couldn't open your DXF in Autocad 2000, but if I load your DXF in Intellicad and save it as Autocad 2000 DWG, I can open it with Voloview, which is an Autodesk product and presumably recognizes all valid file versions! I am sorry I can't be of any more help. I have no experience writing DXF from scratch and I don't know what may be missing in your code.
RE: trouble getting DXF code right for ellipse
Which means that AutoCAD is expecting more of a preamble than you have provided, but I'm not sure how little it can be. Try re-reading the DXF documentation from AutoCAD.
Mike Halloran
Pembroke Pines, FL, USA
RE: trouble getting DXF code right for ellipse
When you typed in some text and chose a font; (plus slant, orientation, scale, etc) the program placed the appropriate codes into the DXF file. This was in ACAD14
Only when I attempted running this in Acad2000 did I encounter difficulties as the DXF file did not have the same expected inputs as before for each successive line.
I re-wrote the prog to get around that snag and all was ok. Eventually the company went with a commercial program for font needs; so it became obsolete.
During the trial and error procees, I would output a short DXF file just to see the order of inputs that ACAD was expecting.
What's required in Line10 should show up if you output a file to see what ACAD puts there.
RE: trouble getting DXF code right for ellipse
Mike Halloran
Pembroke Pines, FL, USA
RE: trouble getting DXF code right for ellipse
Don't know how or why this would affect the line following the 10 code, but I can look at work tomorrow and see what the Basic program was coding into the DXF file we were using.
Gatz
RE: trouble getting DXF code right for ellipse
I recall that even tho' some of the coding in the beginning of the DXF file looked to be superfluous, it was needed for ACAD to accept the file in version 2000 as compared to R14.
As noted, I'll look tomorrow and see if there's a short sample of a DXF that we had generated before.
RE: trouble getting DXF code right for ellipse
I had pared down a 13kb file to about 10, and kept deleting portions or sections of the file that didnt appear to be necessary, but kept running into either Fatal Errors when trying to load or things like "Document has no Namespace" ....whatever the heck that means, or Error in Line 10, etc.
Seems like every attempted change brought new errors.
BTW, AutoCad tells you in the documentation about DXF codes, that Errors for a certain line don't necessarily mean THAT line....the error could have been generated from somewhere else in the file.
A DXF file for a line was very simple and didn't require any extraneous info and was loaded back in with no hitches.
Polylines didnt present any problems either.
Sorry I couldn't help out more. I know how frustrating these kinds of things can be.
Gatz
RE: trouble getting DXF code right for ellipse
have you found a solution yet ?
This is starting to bug me as well......
Gatz
RE: trouble getting DXF code right for ellipse
ISTR the AutoCAD DXF documentation included some not too subtle insults aimed at people who write parsers that get confused by unexpected input and post unintelligible error messages in response.
Indeed.
Mike Halloran
Pembroke Pines, FL, USA