Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble creating DXF code for an ellipse 2

Status
Not open for further replies.

HookedOnHalo

Mechanical
Jul 26, 2006
22
0
0
CA
This thread referred to a problem with creating an ellipse with DXF code. There was no resolution to this problem.

I am a new DXF programmer and I am encountering the same problem. Are there any suggestions as to how to solve thsi problem?

thread555-173361

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

 
Replies continue below

Recommended for you

Why do you want to generate ellipses?

Seriously, somehow they're treated differently inside AutoCAD from any other curve, and the internal conversions that should allow manipulation just like any other curve are either incomplete or buggy... and have been for decades.





Mike Halloran
Pembroke Pines, FL, USA
 
I have a Excel spreadsheet where users enter dimensions for a pressure vessel. The Excel sheet converts the dimensions into LINE and ARC commands to create a 2D drawing of the vessel in a DXF file.

The ARC does not accurately represent the actual geometry which is a 2:1 ellipse shape. I want to use the ELLIPSE command instead of the ARC command. I've read the DXF documentation several times but had no luck with generating the correct syntax in the DXF file to generate an ellipse. I get an error message "Undefined group code 10 for object" when I open the DXF file in AutoCad.
 
If eventually you just want to create a drawing, instead of Excel why not have user enter data via a lisp or VBA routine in AutoCAD?

(or were you the one at another site who said you're using LT version so that's not an option...)
 

Another approach would be to have Excel create the AutoCAD commands to draw the ellipse, either with a script file, or as a series of commands you could paste into the command line.
 
Create a test case that will produce known geometry, run your program, generate the same geometry in AutoCAD, save that as a DXF file, and compare the two DXF files, bit for bit.

You've got an extra|missing CR|LF or a leading or trailing space that AutoCAD can't parse correctly.




Mike Halloran
Pembroke Pines, FL, USA
 
I created a simple ellipse and tried to reverse engineer a simple DXF. The DXF for only the ellipse had a ton of other code in the file. I still haven't been able to work this out yet.
 
Status
Not open for further replies.
Back
Top