Whats wrong with this simple dxf?

Discussion in 'AutoCAD' started by Zeroeffect, Feb 24, 2004.

  1. Zeroeffect

    Zeroeffect Guest

    I wrote a program a couple of years ago, that creates dxf files.
    But those dxf files wont load in Autocad 2000. (Autocad Map 2000i)
    And I can't figure out why. My very simple dxf looks like this:

    0
    SECTION
    2
    ENTITIES
    0
    LWPOLYLINE
    8
    MY_LAYER_NAME
    10
    117.0833862479526
    20
    236.273196326125
    10
    312.3927936853251
    20
    114.8195877336612
    0
    ENDSEC
    0
    EOF

    The errormessage:
    Undefined group code 10 for object on line 10.
    Invalid or incomplete DXF input -- drawing discarded.

    I have been looking at Autocads site, and found some pdf-files with a
    description of the dxf-format. But I still cant figure it out... I
    also found an example of a program in the pdf-documentation that
    created the folowing file, and it works! But I have to create a
    PLINE!.

    0
    SECTION
    2
    ENTITIES
    0
    LINE
    8
    Polygon
    10
    11.7
    20
    18.9
    11
    6.12
    21
    7.16
    0
    ENDSEC
    0
    EOF

    Please help me! I have been trying to figure this out the hole day,
    and Im totally stucked. I found the dxf-documentation here:

    http://www.autodesk.com/techpubs/autocad/

    Thanks,
    // Marcus
     
    Zeroeffect, Feb 24, 2004
    #1
  2. Zeroeffect

    Caveman Guest

    Hi! Your "MY_LAYER_NAME" may have spaces or other invalid characters. I have
    fixed many times these with simple word processing by searching and
    replacing these invalid layer names. After that the DXF usually loads with
    no problems.
     
    Caveman, Feb 24, 2004
    #2
  3. Zeroeffect

    R.K. McSwain Guest

    "MY_LAYER_NAME" doesn't have spaces, and even if it did, R2000 and up accepts spaces in table names.
     
    R.K. McSwain, Feb 25, 2004
    #3
  4. header missing?

    N.
     
    Norbert Grund, Feb 25, 2004
    #4
  5. Zeroeffect

    dbu Guest

    The group 90 (Number of vertices) is missing.

    Try:

    0
    SECTION
    2
    ENTITIES
    0
    LWPOLYLINE
    8
    MY_LAYER_NAME
    90
    2
    10
    117.0833862479526
    20
    236.273196326125
    10
    312.3927936853251
    20
    114.8195877336612
    0
    ENDSEC
    0
    EOF

    regards
    Dirk
     
    dbu, Feb 25, 2004
    #5
  6. Zeroeffect

    chrisasi Guest

    I've the exact same problem with AutoCAD 2005 LT. I paste below the
    simple dxf code.

    Could it be that it needs header / dictionary ?
    If anyone have any clue, that'd be a great help. Thanks much!!


    0
    SECTION
    2
    ENTITIES
    0
    LWPOLYLINE
    5
    2F
    100
    AcDbEntity
    8
    caming single mo mo
    6
    Continuous
    100
    AcDbPolyline
    90
    3
    70
    0
    43
    0.0
    10
    2.663232329117831
    20
    7.080058543318942
    10
    9.381858331151327
    20
    -0.8846364111031022
    10
    13.64245043782846
    20
    4.461528709355301
    0
    ENDSEC
    0
    EOF
     
    chrisasi, Oct 15, 2004
    #6
  7. Zeroeffect

    chrisasi Guest

    I've the exact same problem. If you have any clue, do we need the whole
    header or only certain group codes? Thanks!
     
    chrisasi, Oct 15, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.