Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Cannot create ObjectDBX
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Cannot create ObjectDBX (Read 1673 times)
0 Members and 2 Guests are viewing this topic.
cuda
Mosquito
Posts: 3
Cannot create ObjectDBX
«
on:
May 22, 2019, 03:27:13 AM »
Hello Guys,
I have a problem when running this code:
Code - Auto/Visual Lisp:
[Select]
(
vl-load-com
)
(
defun
c:Example_CopyObjects
(
)
;; This example creates a Circle object and uses the CopyObjects
;; method to make a copy of the new Circle.
(
setq
acadObj
(
vlax-get-acad-object
)
)
(
setq
doc
(
vla-get-ActiveDocument
acadObj
)
)
;; Load the ObjectDBX library
(
if
(
=
acLibImport
nil
)
(
progn
(
vlax-import-type-library
:tlb-filename
"C:
\\
Program Files
\\
Common Files
\\
Autodesk Shared
\\
axdb20enu.tlb"
:methods-prefix
"acdbm-"
:properties-prefix
"acdbp-"
:constants-prefix
"acdbc-"
)
(
setq
acLibImport T
)
)
)
;; Create a reference to the ObjectDBX object
(
setq
acdbObj
(
vlax-create-object
"ObjectDBX.AxDbDocument.20"
)
)
)
This piece of code is part of an example of "CopyObjects" method from ACAD2016 help file.
My problem is that the last line returns nil which isn't supposed to be. My AutoCAD2016 runs on windows10. I tried this code on another win7 machine with the same version ACAD and it's OK. Could anybody please help me out?
Logged
roy_043
Water Moccasin
Posts: 1895
BricsCAD 18
Re: Cannot create ObjectDBX
«
Reply #1 on:
May 22, 2019, 03:33:54 AM »
Within little over 30 minutes you have posted the same problem 10 times. Please stop reposting and be a little patient!
Logged
myloveflyer
Newt
Posts: 152
Re: Cannot create ObjectDBX
«
Reply #2 on:
May 22, 2019, 03:56:59 AM »
Hey, friend, it’s best to delete your same post.
Logged
Never give up !
kdub_nz
Mesozoic keyThumper
SuperMod
Water Moccasin
Posts: 2139
class keyThumper<T>:ILazy<T>
Re: Cannot create ObjectDBX
«
Reply #3 on:
May 22, 2019, 05:59:11 AM »
What does this return at the command line ( or in the VLIDE )
Code - Auto/Visual Lisp:
[Select]
(
findfile
"C:
\\
Program Files
\\
Common Files
\\
Autodesk Shared
\\
axdb20enu.tlb"
)
Logged
Called Kerry in my other life
Retired; but they dragged me back in !
I live at UTC + 13.00
---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Cannot create ObjectDBX