QQ糖 发表于 2003-7-12 00:48:00

mccad发表于2003-7-10 6:51:00static/image/common/back.gif不可以,因为这个OBJECTDBX版本只能依赖于AutoCAD存在



请问斑竹:

那里能找到OBJECTDBX的编程接口API?

gz-yzy 发表于 2003-7-13 08:35:00

为什么运到这里时“dim objdbx as axdbdocument”
会弹出对话框出现以下的错误:
compile error:
user-defined type not defined

mccad 发表于 2003-7-13 12:24:00

gz-yzy发表于2003-7-13 8:35:00static/image/common/back.gif为什么运到这里时“dim objdbx as axdbdocument”
会弹出对话框出现以下的错误:
compile error:
user-defined type not defined


因为你没有引用ObjectDBX库。

gz-yzy 发表于 2003-7-13 14:56:00

小弟我刚学,还望大哥指导如何引用OBJEDTDBX库呀?

gz-yzy 发表于 2003-7-13 16:12:00

龙龙仔发表于2003-4-23 9:08:00static/image/common/back.gif可能是你還

myfreemind 发表于 2003-7-21 23:37:00

好程序!

topirol 发表于 2003-7-26 00:51:00

请问如何用VBA代码来注册objectdbx?

请问如何用VBA代码来注册objectdbx?

用lisp注册比较麻烦

myfreemind 发表于 2003-7-27 18:20:00

用那段lisp程序注册objectdbx后出现非法操作!vba中在什么地方引用类型库啊?

myfreemind 发表于 2003-7-27 18:45:00

奇怪,我没有引用也可以运行下面的代码

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


myfreemind 发表于 2003-7-27 18:48:00

把声明改一下

Dim objDbx As AxDbDocument改为Dim objDbx 就好了!一开始我引用了类型库也不行,后来干脆改了声明,反倒不引用类型库也可以运行了,真是百思不得其解!@
页: 1 2 3 [4] 5 6 7 8 9 10 11
查看完整版本: [VBA]利用ObjectDbx技术在当前图形中插入其它未打开的图形中的图块