keberle Posted October 27, 2008 Posted October 27, 2008 I am a newbie in making DXF files. I have created a simple file to test the file syntax but can't get this simple ellipse file to work. Any suggestions would be greatly appreciated. 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 Quote
rocheey Posted October 27, 2008 Posted October 27, 2008 The format of the file looks .... "early-ish".... like v12 or something. For the heck of it, I tried exporting a v2000 dxf with only the ellipse, and got the acad dictionary references (AcDbEntity/AcDbEllipse). I tried exporting as version 12, and it came back exported as a polyline. In try and avoid, at all costs, having to insert a dictionary section into my own dxf files.- but it looks like its generating a "bad group code" error if you leave the reference out. Quote
keberle Posted October 27, 2008 Author Posted October 27, 2008 Thanks for the information! I generated a simple ellipse in AutoCad and saved as a DXF to look at the code. There were many lines of codes, some appear to be standard or template settings and such. Can you tell me more about the dictionary settings or do you have a sample that gives the bare minimium required for the extra information that needs to be included in the DXF to allow the ellipse to be created? Quote
keberle Posted October 27, 2008 Author Posted October 27, 2008 Just to let you know, the sample code I sent generated by an Excel spreadsheet that I am using to automate some simple drawings. I wanted to have the bare minimum amount of DXF coding to keep the spreadsheet simple. Quote
ASMI Posted October 27, 2008 Posted October 27, 2008 Example of minimal DXF list for ellipse: (entmake '((0 . "ELLIPSE") (100 . "AcDbEntity") (100 . "AcDbEllipse") (10 1704.87 780.189 0.0) (11 -446.288 319.677 0.0) (40 . 0.442176))) Look DXF reference for details. Quote
keberle Posted October 28, 2008 Author Posted October 28, 2008 I copied and pasted your text to run in AutoCad 2008 and the LISP routine ran fine. I then tried to make an equivalent entry in a DXF file as shown below. I get an error message "Undefined group code 10 for object". I don't understand this. The code seems dead-simple and should work but I don't know where the error could be. Any other suggestions would be appreciated. 0 SECTION 2 ENTITIES 0 ELLIPSE 100 AcDbEntity 100 AcDbEllipse 10 5.542505223636108 20 5.117784716298604 30 0.0 11 0.0 21 4.120124803269405 31 0.0 210 0.0 220 0.0 230 1.0 40 0.4307358650946463 41 3.141592653589793 42 6.283185307179586 0 ENDSEC 0 EOF Quote
keberle Posted October 28, 2008 Author Posted October 28, 2008 Also many of our users have only AutoCad LT so creating a LISP routine is not a solution. The DXF route seems the only solution so far. Are there any "editors" that help with creating DXF files, other than simple text editors? Quote
Kevin Brown Posted October 21, 2012 Posted October 21, 2012 Keberle did you ever get a resolution to this difficulty ? It sounds much the same problem that I have. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.