Jump to content

Recommended Posts

Posted

in the following vba i try run lisp (its name b0) for many drawings but it give my this error message

method 'open' of object 'Iaxdbdocument' faild

and it open one drawing only then give above message

can any one help me solving this problem

 

vba program:

Private Sub runlisp()

Set objdbx = GetInterfaceObject("ObjectDBX.AxDbDocument.17")

Dim inDir As String

Dim filenom As String

Dim WholeFile As String

inDir = "C:\mine"

filenom = Dir$(inDir & "\*.dwg")

Do While filenom ""

ThisDrawing.SendCommand "b0" & vbCr

WholeFile = inDir & "\" & filenom

objdbx.Open WholeFile

filenom = Dir$

ThisDrawing.Utility.Prompt vbCrLf

Loop

Set objdbx = Nothing

End Sub

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...