Trouble creating mesh entity via dxf

Trouble creating mesh entity via dxf

spagmess
Contributor Contributor
934 Views
5 Replies
Message 1 of 6

Trouble creating mesh entity via dxf

spagmess
Contributor
Contributor

I'm having a hell of a time with the dxf format for a MESH entity. I'm probably making a stupid mistake...

 

I have no problem generating a valid Polyface Mesh dxf entity that imports nicely into Autocad, but the limits of that entity are annoying, so I've tried to create the same geometry using MESH entities. But the dxf file refuses to import. It usually gets tripped up after the 100. "AcDbSubDMesh" line.

 

The error is something like "Undefined group code 71 for object on line 12."

 

I've gone as far as to export a dxf file of a single mesh from Autocad, copy and paste the entity data directly into a new dxf file, and try to re-import, and it doesn't take.

 

The exact same dxf codes work fine when creating the mesh using ENTMAKE.

 

What am I missing?

0 Likes
Accepted solutions (1)
935 Views
5 Replies
Replies (5)
Message 2 of 6

cheryl.buck
Autodesk Support
Autodesk Support

Hi @spagmess,

 

I am sorry to hear about the trouble you are having with your file. I found the following Autodesk Knowledge Network article that sounds like the error you are seeing. It looks like this error is most common when opening a file, but can occur while working in one as well. 

 

"Undefined group code xx for object on line xx" when opening a DXF in AutoCAD

 

I hope it helps. 

 

If a post answered your question or resolved the issue, please click the Accept Solution button.

Likes are always welcome.

 

All the best,

 

Cheryl Buck
Technical Support Specialist



Did a post answer your question or help resolve the issue? Please click the Accept Solution button.
If you find a response helpful, consider Liking the post.

0 Likes
Message 3 of 6

spagmess
Contributor
Contributor

Thanks Cheryl, but I've already tried that. No dice.

 

Do I need to add a BLOCK_RECORD table or something into the dxf file to make it work? The DXF reference says that DXF code 330 is optional...

0 Likes
Message 4 of 6

cheryl.buck
Autodesk Support
Autodesk Support

Hi @spagmess,

 

I am not familiar with the coding in question, but the AutoCAD Customization Forum members may be.  

 

From what I could find, this error generally indicates file corruption, without understanding the specific DXF code, it would be difficult to know what is missing. 

 

If a post answered your question or resolved the issue, please click the Accept Solution button.

Likes are always welcome.

 

All the best,

 

Cheryl Buck
Technical Support Specialist



Did a post answer your question or help resolve the issue? Please click the Accept Solution button.
If you find a response helpful, consider Liking the post.

0 Likes
Message 5 of 6

artc2
Autodesk
Autodesk
Accepted solution
Your dxf file is an entities only dxf file (i.e. it only has an entities section). Entities only dxf files can only be in the R12 dxf file format. The R12 dxf format does not include AcDbSubDMesh entities nor does it support group code 100 (nor many other group codes).

If you want to use an AcDbSubDMesh in a dxf file, then the dxf file will need to include a header section that has the dxf version in it, and that version will need to be one that supports the AcDbSubDMesh entity type. You may also need to include some other sections - you'll need to experiment to see.
Message 6 of 6

spagmess
Contributor
Contributor
Thanks artc2. I'll play around with that.
Good notes about the format version. I'll look more into that.
0 Likes