windows - VB6 program interacting with AutoCAD, is not longer able to create, or bind to the ACAD object -


stack,

to start, website fantastic, you've helped me through lot of issues in past; thanks.

moving forward, program has been in existence, , in use, since autocad 2000. current version of software compatible acad 2017.

i work small team, , out of nowhere, pc struggling vb6/autocad combination; other developers still working no issues...

late binding used get, or create, object; depending on whether acad running... e.g.

set oautocad = getobject(, "autocad.application") if err.number     err.clear     set oautocad = createobject("autocad.application")     if err.number         msgbox ucase$("unable launch autocad session")         end     else         oautocad.visible = true     end if end if 

there 2 different executables (using same binding technique) work acad different things. both of them, software fails on both createobject , getobject "run time error 429 - activex component cannot create object. however, adding '.20' call allows me create object, still can't bind existing. e.g...

call createobject("autocad.application.20") 

i believe difference between myself , team had re-install vb6 after 'error accessing registry' issues surfaced (immediately after windows update...weird). that's big difference; else has migrated 7 10 vb6 installed. i'm first 1 install on windows 10 machine directly.

we using sp6 vb6, though issue has brought things attention. apparently, still updating service pack. so, computer has been updated sp6d. i've tried installing cumulative service pack.

i've attempted change compatibility settings win 7, win 8, xp's (all of them)... have no idea.

i've run administrator

it's 64 bit machine.

the original vb6 msdn library has been installed... reason, sp6 wouldn't install correctly until was... matter, actual vb6 installation gets hung on end. doesn't appear affect much, must doing in background (or not doing)

any appreciated... here's hoping.

******* new information ******* apparently, adding '.20' enough 1 of exes, other requires , additional version number (e.g. "autocad.application.20.1")

to make more interesting, if start project '20.1', stop code moment object created, wait autocad launch, set visible, open drawing need connect using acad ui, allow program continue, getobject doesn't fail...

????

after seemed eternity of searching, found answer here...

late binding run-time error in vb6 when creating object .net assembly

the gist of this...

when using createobject/getobject class id (clsid) invoking stored in registry... both under hkey_classes_root hive , hkey_local_machine hive under (classes)-(autocad.application)(.x)

it seems createobject call uses hkey_classes_root, while getobject may using hkey_local_machine... of i'm not sure, explain why createobject call working , not getobject. hkey_local_machine hive somehow missing 'autocad.application' key; possibly due un-install or update of kind... i'm not sure.

what know comparing values between hives , adding 'curver' value , 'clsid' value newly created 'autocad.application' key, program able create , bind without specifying version (e.g...

createobject("autocad.application") getobject(, "autocad.application") 

instead of...

createobject("autocad.application.20.1") getobject(, "autocad.application.20") 

or worse

run-time error 429: activex component cannot create object

thanks again stack.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -