Autodesk.Autocad.Runtime.Exception: eFileSystemErr

Autodesk.Autocad.Runtime.Exception: eFileSystemErr

Anonymous
Not applicable
1,391 Views
2 Replies
Message 1 of 3

Autodesk.Autocad.Runtime.Exception: eFileSystemErr

Anonymous
Not applicable

Autodesk.Autocad.Runtime.Exception: eFileSystemErr

AutoCAD 2020 / Vollversion
Visual Studio 17
Zielframework: .Net Framework 4.7

Good Morning,
I have older .Net programs that I would now like to
make suitable for Autocad 2020, so far so good.
Before the program starts I get an error message
Autodesk.Autocad.Runtime.Exception: eFileSystemErr.
Code line 56 in myCommand, see attachment.

Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.ApplicationServices.Application
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Colors
Imports Autodesk.AutoCAD.Runtime
'<Assembly: CommandClass(GetType(HI_STAHL_VKR.myCommands))>
Namespace HI_Stahl_VKR
Public Class MyCommands
<CommandMethod("HI:VKR")>
Public Sub HIVKR()
Dim acDoc As Document = DocumentManager.MdiActiveDocument
Dim acCurDb As Database = acDoc.Database
Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction
Try
Dim acLineTypTable As LinetypeTable = acTrans.GetObject(acCurDb.LinetypeTableId, OpenMode.ForRead)
Dim myCONTINUOUS As String = "Continuous"
If acLineTypTable.Has(myCONTINUOUS) = False Then
                        acCurDb.LoadLineTypeFile(myCONTINUOUS, "acad.lin")
End If

eFehlerzeile_56.JPGeFileSystemErr.JPG
AutoCAD 2020 / full version
Visual Studio 17
Target framework: .Net Framework 4.7

Does anyone have any idea what that might be?

Thanks in advance.

0 Likes
1,392 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Good Morning,

for whatever reason the "acad.lin" was not found although the
support path was / is entered under Options.
I have now implemented it and now everything works again without
an error message.

 

Dim LinPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
LinPath &= "\AppData\Roaming\Autodesk\AutoCAD 2020\R23.1\deu\Support"
Dim acadlin As String = New IO.DirectoryInfo(LinPath).GetFiles("acad.lin").ToString
			
If acLiTypTbl.Has("STRICHPUNKT") = False Then
   acCurDb.LoadLineTypeFile("STRICHPUNKT", acadlin)
   acTrans.Commit()
End If	
0 Likes
Message 3 of 3

Alexander.Rivilis
Mentor
Mentor

What about using HostApplicationServices.FindFile?

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes