block name restrictions
![]() 9/15/2008 10:19 PM
|
---|
Hello, I am having problems creating DxfBlock objects. I would like to use names with non-english characters but I am getting exceptions like this: C# Code: Error: InvalidName, for objects nap??ov?_reference ( |
![]() 9/15/2008 11:09 PM
|
---|
Hi Vaclav, What version of DXF are you writing? The earlier versions (release 14 and earlier) had some constraints on the name, like no spaces, and maximum length of 31 characters. Each character may be a letter, digit, underscore (_), dash (-), dollar ($) or asterisk (*). For later versions these restrictions should be gone. Wout |
![]() 9/15/2008 11:22 PM
|
---|
Hi Wout, It is version 14. I am new to DXF. I do not know which version I should export to reach the most audience. If I use a newer version, will most people able to open it in their CAD apps? I replaced spaces with _ but there is still a problem with non-english characters that are shown as ?. Maybe I should convert the names to 8bit. Vaclav |
![]() 9/15/2008 11:25 PM
|
---|
Version 15 should be pretty safe, 15 = AutoCad 2000, 18 = AutoCad 2004, 21 = AutoCad 2007. Wout |
![]() 9/15/2008 11:48 PM
|
---|
It works fine with version 15 Thanks! Vaclav |
![]() 5/9/2023 3:47 PM
|
---|
Hi all I am running into an issue where a comma is not supported in a block name. Is that correct? See the two dxf files created. xxx.dxf has an error because of the comma and in the other file where the comma was replaced with a dot it works fine. Are there any other characters not supported besides the standard unsupported Windows filename characters? |
![]() 5/9/2023 4:06 PM
|
---|
What do you mean by "has an error" exactly? - Wout |
![]() 5/9/2023 4:13 PM
|
---|
When I try and open xxx.dxf I get this in AutoCAD Error in BLOCK_RECORD Table Invalid symbol table record name: "Bend Notes Check - No Rebase 3,25mm" on line 2534. Invalid or incomplete DXF input -- drawing discarded. When opening the other file which was created with the same two dxf files but just with a dot instead of a comma in the name, it works. |
![]() 5/9/2023 4:42 PM
|
---|
Hi, Yes that's correct, any of the following characters are not allowed: \ < > / ? " : ; * | , = `. I'll add a name validation check for block, layer names etc in the next CadLib version. - Wout |
![]() 5/9/2023 8:13 PM
|
---|
You have a "." at the end of your string. That actually works fine in my file. ...or was that just to end the sentence? |