Author Topic: Cannot create ObjectDBX  (Read 247 times)

0 Members and 1 Guest 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]
  1. (defun c:Example_CopyObjects()
  2.     ;; This example creates a Circle object and uses the CopyObjects
  3.     ;; method to make a copy of the new Circle.
  4.     (setq acadObj (vlax-get-acad-object))
  5.     (setq doc (vla-get-ActiveDocument acadObj))
  6.  
  7.     ;; Load the ObjectDBX library
  8.     (if (= acLibImport nil)
  9.                (progn
  10.                    (vlax-import-type-library :tlb-filename "C:\\Program Files\\Common Files\\Autodesk Shared\\axdb20enu.tlb"
  11.                                              :methods-prefix "acdbm-"
  12.                                              :properties-prefix "acdbp-"
  13.                                              :constants-prefix "acdbc-"
  14.                    )
  15.             (setq acLibImport T)
  16.         )
  17.     )
  18.  
  19.     ;; Create a reference to the ObjectDBX object
  20.     (setq acdbObj (vlax-create-object "ObjectDBX.AxDbDocument.20"))
  21. )
  22.  
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?

roy_043

  • Water Moccasin
  • Posts: 1720
  • 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!

myloveflyer

  • Newt
  • Posts: 128
Re: Cannot create ObjectDBX
« Reply #2 on: May 22, 2019, 03:56:59 AM »
Hey, friend, itís best to delete your same post.
Never give up !

kdub

  • Mesozoic relic
  • SuperMod
  • Swamp Rat
  • Posts: 1368
  • 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]
  1. (findfile "C:\\Program Files\\Common Files\\Autodesk Shared\\axdb20enu.tlb")
called Kerry in my other life

Sometimes the question is more important than the answer.
#ridesober