请问斑竹:
那里能找到OBJECTDBX的编程接口API? 为什么运到这里时“dim objdbx as axdbdocument”
会弹出对话框出现以下的错误:
compile error:
user-defined type not defined gz-yzy发表于2003-7-13 8:35:00static/image/common/back.gif为什么运到这里时“dim objdbx as axdbdocument”
会弹出对话框出现以下的错误:
compile error:
user-defined type not defined
因为你没有引用ObjectDBX库。 小弟我刚学,还望大哥指导如何引用OBJEDTDBX库呀? 龙龙仔发表于2003-4-23 9:08:00static/image/common/back.gif可能是你還 好程序!
请问如何用VBA代码来注册objectdbx?
请问如何用VBA代码来注册objectdbx?用lisp注册比较麻烦 用那段lisp程序注册objectdbx后出现非法操作!vba中在什么地方引用类型库啊? 奇怪,我没有引用也可以运行下面的代码
Option Explicit
' 2000-03-08
' By Jimmy Bergmark
' Copyright (C) 1997-2002 JTB World, All Rights Reserved
' Website: www.jtbworld.com / http://jtbworld.vze.com
' E-mail: info@jtbworld.com / jtbworld@hotmail.com
' Runs in AutoCAD 2000 with axdb15.dll (must be referenced)
' Example of batch for listing all layers on all drawings in a directory.
Private Sub ListLayers()
Dim objDbx
Set objDbx = GetInterfaceObject("ObjectDBX.AxDbDocument")
'Dim inDir As String
Dim elem As Object
Dim filenom As String
Dim WholeFile As String
Dim newHeight As Double
'inDir = "r:\projekt\3828\A"
filenom = "l:\ttt.dwg"
'Do While filenom <> ""
ThisDrawing.Utility.Prompt vbCrLf & "File: " & filenom
ThisDrawing.Utility.Prompt vbCrLf & "-----------------"
WholeFile = filenom
objDbx.Open WholeFile
For Each elem In objDbx.Layers
ThisDrawing.Utility.Prompt vbCrLf & elem.Name
Next
' Set elem = Nothing
' objDbx.SaveAs WholeFile
' filenom = Dir$
' ThisDrawing.Utility.Prompt vbCrLf
'Loop
End Sub