See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

  1. #1
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    128
    Login to Give a bone
    0

    Default Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    Hi all,

    I've been experiencing several "Filer Error" Runtime Errors when using VBA Macros in AutoCAD 2007. The macros are used for inserting blocks and the .InsertBlock method is getting the error. If I change the block name in the code, get another error, select debug, and change the name back to the correct name it works fine. The same code works perfectly in 2006. Does anyone have any ideas on what the issue may be? Any work arounds?

    Thanks!
    MC

  2. #2
    Active Member rcrabb's Avatar
    Join Date
    2007-02
    Posts
    99
    Login to Give a bone
    0

    Default Re: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    can anyone help with this error? exactly what causes a "filer error" ? i need to either work around it, or figure out how to prevent it, or something ... it has my latest attempt at a batch macro stopped in its tracks ...

    many thanks in advance!

  3. #3
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    128
    Login to Give a bone
    0

    Default Re: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    I was able to resolve the issue by using this code:

    Code:
    ''FindFile by Bob Wahr now of theSwamp.org, as found on cadvault.com
    Public Function FindFile(strFile As String)
    	'Dimension Variables
    		Dim strSupPth As String
    		Dim varPaths As Variant
    		Dim intCnt As Integer
    		Dim strFnd As String
    		Dim strTest As String
    		Dim strDwgDir As String
    	
    	'Get path information
    		strSupPth = ThisDrawing.GetVariable("acadprefix")
    		strDwgDir = ThisDrawing.GetVariable("dwgprefix")
    		strTest = Dir(CurDir & "\" & strFile, 31)
    	
    	'Search for file sequentially in path information.
    		If strTest <> "" Then
    			strFnd = CurDir & "\" & strTest
    		Else
    			strTest = Dir(strDwgDir & "\" & strFile, 31)
    			If strTest <> "" Then
    				strFnd = strDwgDir & "\" & strFile
    			Else
    				If strSupPth <> "" Then
    					varPaths = Split(strSupPth, ";", -1, vbTextCompare)
    					For intCnt = 0 To UBound(varPaths)
    						strTest = Dir(varPaths(intCnt) & "\" & strFile, 31)
    						If strTest <> "" Then
    							strFnd = varPaths(intCnt) & "\" & strFile
    							Exit For
    						End If
    					Next intCnt
    				End If
    			End If
    		End If
    		
    		FindFile = strFnd
    End Function
    This code builds the complete file path for the desired file and outputs a string with that data. It can be used to open drawings, insert blocks, etc. This seems to apease the appetite of whatever ACAD 07 is looking for. Since I started using this I haven't had the error anymore.

    Hope this helps!

    MC

  4. #4
    Active Member rcrabb's Avatar
    Join Date
    2007-02
    Posts
    99
    Login to Give a bone
    0

    Default Re: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    i think im a little too new to VBA to incorporate that code into my existing project ... is there any way to detect a filer error before it occurs?

    the FindFile routine that I am using has a Const variable MAX_LEN set at 260. Is there a reason for this specific number? Would that be causing the filer error? Would anything be hurt by increasing this number to, say, 300?

    Thanks for all your suggestions!

  5. #5
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    128
    Login to Give a bone
    0

    Default Re: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    Quote Originally Posted by rcrabb
    i think im a little too new to VBA to incorporate that code into my existing project ... is there any way to detect a filer error before it occurs?

    the FindFile routine that I am using has a Const variable MAX_LEN set at 260. Is there a reason for this specific number? Would that be causing the filer error? Would anything be hurt by increasing this number to, say, 300?

    Thanks for all your suggestions!
    All that is necessary to use the code would be to paste it into a module and then use the function. For example:

    dim strFile as string
    strFile = mdlTest.FindFile("Test.dwg")

    You could then use the resulting value of strFile for any use requiring a file of any type. I'm not aware of any other fixes to the issue. It's not a syntax or code issue so much as it is a bug in the software that came with 2007. It's quite frustrating. If I remember correctly the Autodesk forums have some good threads on the topic.

    Sorry I couldn't be of more help.

    MC

  6. #6
    Active Member rcrabb's Avatar
    Join Date
    2007-02
    Posts
    99
    Login to Give a bone
    0

    Default Re: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    Quote Originally Posted by mcoffman
    All that is necessary to use the code would be to paste it into a module and then use the function. For example:

    dim strFile as string
    strFile = mdlTest.FindFile("Test.dwg")

    You could then use the resulting value of strFile for any use requiring a file of any type. I'm not aware of any other fixes to the issue. It's not a syntax or code issue so much as it is a bug in the software that came with 2007. It's quite frustrating. If I remember correctly the Autodesk forums have some good threads on the topic.

    Sorry I couldn't be of more help.

    MC

    no, you have been a great help! i just didn't understand how to use that function, I am sorry! I am running a batch right now, as soon as it finishes, ill add in your function and try again - i'll post the results here - thank you so much!

  7. #7
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    128
    Login to Give a bone
    1

    Default Re: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    You're welcome. I hope that the function works for you.

    MC

  8. #8
    Active Member rcrabb's Avatar
    Join Date
    2007-02
    Posts
    99
    Login to Give a bone
    0

    Default Re: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    had to do some string manipulation before i sent it into the module, but got it to work ...

    i am running a batch now using your module, cross your fingers (and thanks again!)

  9. #9
    100 Club mcoffman's Avatar
    Join Date
    2005-08
    Location
    Porland, OR
    Posts
    128
    Login to Give a bone
    0

    Default Re: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    You're welcome but I can't take the credit as I didn't write the code. It's the folks like those here and on CADVault that deserve the credit for posting fixes like the one above. I just got lucky to find it when I needed it so I thought I'd pass it on.

    I hope it works out well for you.

    Sincerely,
    MC

  10. #10
    Active Member rcrabb's Avatar
    Join Date
    2007-02
    Posts
    99
    Login to Give a bone
    0

    Default Re: Experiencing several "Filer Error" Runtime Errors in AutoCAD 2007

    the file giving me the error was not a valid file ... thats why it gave me the error

    i guess i need to write an ERR_CHECKER in case the file can't be opened or something
    Last edited by rcrabb; 2007-04-03 at 06:55 PM.

Page 1 of 2 12 LastLast

Similar Threads

  1. Runtime error -2145386390 (8020006a) in VBA Autocad 2007
    By jodolrui414021 in forum VBA/COM Interop
    Replies: 2
    Last Post: 2013-09-16, 07:39 AM
  2. 2012: Revit Icon "R Logo" in top left screen errors (Not blackout error)
    By rbcameron1 in forum Revit Architecture - General
    Replies: 0
    Last Post: 2012-09-27, 01:42 PM
  3. Autocad 2005 "Errors & Warnings" while plotting....
    By jroseeng389213 in forum AutoCAD General
    Replies: 1
    Last Post: 2011-12-29, 04:31 PM
  4. Replies: 16
    Last Post: 2007-04-09, 05:45 PM
  5. Replies: 2
    Last Post: 2006-06-20, 05:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •