setting SymbolTableRecord.Name throws "eInvalidInput" exception

setting SymbolTableRecord.Name throws "eInvalidInput" exception

cgcamilo
Enthusiast Enthusiast
880 Views
2 Replies
Message 1 of 3

setting SymbolTableRecord.Name throws "eInvalidInput" exception

cgcamilo
Enthusiast
Enthusiast

 

Hello, I am trying to integrate the new RealDWG 2018 library into my application. I used it to export dwg geometries.

 

I noticed that when creating BlockTableRecord objects (which inherits from SymbolTableRecord), setting "Name" attribute to a string that contains "/" character throws "eInvalidInput" exception. My question is, is it possible to know all "invalid" characters?

BlockTableRecord ret = new BlockTableRecord();
ret.Name = "example a/b" // eInvalidInput exception

Camilo Cifuentes
0 Likes
Accepted solutions (1)
881 Views
2 Replies
Replies (2)
Message 2 of 3

Keith.Brown
Advisor
Advisor

You can use SymbolUtilityServices.ValidateSymboleName(string name, bool allVerticalBar) to check if your proposed name is correct. 

Message 3 of 3

cgcamilo
Enthusiast
Enthusiast
Accepted solution

Hello Keith,

 

Thank you for your answer. You led me to the correct place. I didn't know about those utility methods. However, I found this one more useful "SymbolUtilityServices.RepairSymbolName(some_name, false)".

Camilo Cifuentes
0 Likes