Author Topic: Problem by blockname with german mutated vowel on calling Database.Insert(..)  (Read 1772 times)

0 Members and 1 Guest are viewing this topic.

MarioR

  • Newt
  • Posts: 64
Hallo,

we have change our AutoCAD version from 2011 to 2014 on last weeks.
But now i have detect that the calling function Database.Insert()
(define public ObjectId Insert(string blockName, Database dataBase, bool preserveSourceDatabase);")
With a blockName starts with an german mutated vowel ("ÄÖÜäöü") throws an "FatalExecutionEngineError".
Is the position of mutated vowel later than the first works fine.

This effect is never comes on 2011 with .net 3.5., at first after change to 2014 with .NET 4.0 throws this exception.

Code from function:


on throw and cath the exception I have check the value of variables "blockName" and "blockPfadName"

by set the brakepoint on line number 344 is the value of "blockName" the correct "ÜberTage.Halde",
after throw the "FatalExecutionEngineError" on line 350 change the value from
"ÜberTage.Halde" to "Ýbertage.Halde".

what be the cause of this error?

regards Mario

kaefer

  • Guest
Your problem may stem in part from the specific combination of Visual Studio, .NET and Acad versions, and from the fact that you're trying to roll it alone when there's a sensible function in the API for the task at hand:
public static string Autodesk.AutoCAD.DatabaseServices.SymbolUtilityServices.GetBlockNameFromInsertPathName(string).

More importantly, try
public static void Autodesk.AutoCAD.DatabaseServices.SymbolUtilityServices.ValidateSymbolName(string name, bool allowVerticalBar),
which throws an exception if validation wasn't successful.

MarioR

  • Newt
  • Posts: 64
Hello,

i have found a workaround :

The Block was insert with an well-formed dummy name and after "..Insert"
i get the Block by "acBTRId" as "BlockTableRecord" and set his "Name" to realname.
This works fine.

regards Mario

Jeff H

  • Needs a day job
  • Posts: 6150
Your problem may stem in part from the specific combination of Visual Studio, .NET and Acad versions, and from the fact that you're trying to roll it alone when there's a sensible function in the API for the task at hand:
public static string Autodesk.AutoCAD.DatabaseServices.SymbolUtilityServices.GetBlockNameFromInsertPathName(string).

More importantly, try
public static void Autodesk.AutoCAD.DatabaseServices.SymbolUtilityServices.ValidateSymbolName(string name, bool allowVerticalBar),
which throws an exception if validation wasn't successful.
Good to see a couple post from you lately, was hoping you would come back and throw some more smarts our way. Hope all is well.

MarioR

  • Newt
  • Posts: 64
Hello,

sorry for late replay, i was spend a couple of days for holiday.

I have test the two functions:
public static string Autodesk.AutoCAD.DatabaseServices.SymbolUtilityServices.GetBlockNameFromInsertPathName(string).
public static void Autodesk.AutoCAD.DatabaseServices.SymbolUtilityServices.ValidateSymbolName(string name, bool allowVerticalBar),

The first function gets the "ÜberTage.Halde" back.
The second throws no exception with "ÜberTage.Halde".

mmmm.... I use my workaround.
regards Mario