Writing DXF file with solid block but only getting outline

Discussion in 'AutoCAD' started by David Graham, Jan 30, 2017.

  1. David Graham

    David Graham

    Joined:
    Jan 30, 2017
    Messages:
    2
    Likes Received:
    0
    I have written a VB program to create a DXF file.
    It creates a block in the frame and the block should be solid.
    I'm creating a block using a LWPOLYLINE entity to draw the outline followed by a HATCH entity to fill it using SOLID.
    I then Insert this into the frame and this is inserted into the drawing.

    When viewing in AutoCAD, the drawing is loaded with no errors, the drawing is displayed correctly but the only the outline of the block is shown with a red dot at the seed point - rather than the block being infilled (in red).

    I have tried to compare the file with a DXF file created from solid block and I cannot see any errors in the structure of the file. But maybe there are some tables or objects missing, or something more obvious.

    I have attached a very cut down example dxf file (with the extension txt) and also a screen shot showing the effect.
     

    Attached Files:

    David Graham, Jan 30, 2017
    #1
    1. Advertisements

  2. David Graham

    David Graham

    Joined:
    Jan 30, 2017
    Messages:
    2
    Likes Received:
    0
    I fixed the problem myself. I had omitted a 230 1.0 (extrude in Z direction). As it was a 2D file I didn't think it was important.
     
    David Graham, Feb 2, 2017
    #2
    1. Advertisements

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.