MR MAN Posted June 3, 2009 Posted June 3, 2009 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 Quote
VVA Posted June 3, 2009 Posted June 3, 2009 There can be it will approach OpenDwgsCmds is a set of functions designed to execute a list of commands and functions on all open drawings. The CDC function, Current Drawing Commands, allows you to test these commands and functions on the current drawing. The ODC function, Open Drawings Commands, executes these commands and functions on all open drawings. There are several programming utilities included. Quote
fuccaro Posted June 3, 2009 Posted June 3, 2009 You can run a lisp on many files. See here: http://www.cadtutor.net/forum/showthread.php?t=19294 Quote
Lee Mac Posted June 3, 2009 Posted June 3, 2009 You could use a number of ways - see here for more details: http://www.cadtutor.net/forum/showthread.php?t=35060 Quote
Recommended Posts
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.