Is it just this one sub that's not working? Check the project's references for missing type libraries (Tools>References).
|
I did these from the reference:
uncheck - MISSING: AutoCAD 2008 type Library
check - AutoCAD 2010 type Library
check - AutoCAD/ObjectDBX Common 18.0 Library
but still doest work, error "Problem Loading Application"
also, the "AutoCAD 2010 type Library" is using this file "acax18enu.tlb" and the 'AutoCAD/ObjectDBX Common 18.0 Library' is using this file 'axdb18enu.tlb' both in the autodesk shared folder. Shouldnt it be using the from the this file 'axdb.dll' in the AutoCAD 2010 root folder? Honestly, idnno anything about vba but just guessing.
Many Thanks
Hi cftorres,
I had the same issue and I have since altered the VBA code so that it now works okay on AutoCAD 2010 using axdb18.dll (ObjectDBX Common 18.0 Library). Please let me know if this has sorted out your issue.
I also had an issue with Excel truncating leading zeros off attribute text that were in the blocks that I was referencing. The code is now modified so that it changes the format of the cell to text immediately prior to inserting the attribute text.
Best Regards,
Colin
Hi
Just found this thread and tried the excel on autocad 2011 64bit and got an error. The program opens and runs on Excel 2010 but gives complile error "cannot find project or library". The first line "Function dbxOpen(Path As String, DwgNam As String) As AxDbDocument" is highlighted.
is there a way to run it with Autocad 2011?
thanks
Roby
Go to Tools>References and you will notice that an entry that starts with "MISSING:". Uncheck that an find the version that ships with your version of acad. The name will be similar but end with a different number.
Thanks for the help.
I set both autocad 2011 64bit and Office Excel 2010 64bit to the same ( Autocad/ObjectDBX Common 18.0 type Library)
It is actually list at first as "AXDBLib" down the list. After picking it changes its name to "Autocad/ObjectDBX Common 18.0 type Library"
this is the same in both VBA editors.
The excel program finds the drawings and ceates the list OK.
When I pick the "Get Attributes" button I get an error " Sub or function not defined" and the debug.printuger jumps to this line:
Set AcadDbx = GetInterfaceObject("ObjectDBX.AxDbDocument.18")
with the word GetInterfaceObject highlighted in blue.
The little spinng wheel cursor comes on and stays on even after resetting the code with the blue square button, it stays spinning until I exit excel.
This has me confused because I have programmed in autocad and excel prior to 2007 and that code still works with the newer type libraries.
I tried it with and without acad 2011 running, and there was no change.
Otherwise a very nice program, I would use it.
thanks again.
Roby
This post certainly has been going for a while. I actually was trying to figure out why my utility wasn't working, did a search on Google, and got sent back to my original post....
Anyways, here is what fixed the problem with me. I downloaded the Autocad 2011 Object Enabler package from Autodesk (since they are "phasing out" vba).
http://www.autodesk.com/vba-download
or do a search on the Autodesk website for "VBA support in Autocad 2011"
Then I revised my references to point to the updated dlls (not sure this is required). I am uploading the file again since I have made some tweaks here and there. That darn hourglass glitch is hopefully gone now. Sorry for the sloppy coding. That is what you get when an engineer programs.
I am sure that I will eventually have to put the time in and convert over to ".NET". After Autocad 2012, VBA support is probably going away...bummer.
Also note, the utility will take up less space and work better in newer versions of office if you save it as a "Macro Enabled" file (ie *.xlsm).
Last edited by katrinanjim; 2011-12-30 at 05:30 AM. Reason: I revised the utility to incorporate the Attribute truncating issue corrected by C. White.
Hi Jim,
i got it to work a few times, but only with a few tweaks:
I had to change the path for the regserv line to current path not 2004.
I added 2 mode autodesk .dll into the autodesk VBAide references
and I found by luck that it works with autocad running, but hangs trying to open the axdb.dll just from excel.
I think this a "feature" related to the 64 bit Office 2010 and Autocad 2011.
Other Apps are not allowed to access the autocad ObjectDBX directly any longer. ( I think I read this somewhere)
Maybe an instance of autocad can be started from excel code and run invisible???
I am going to have to .NET as well, Jerry winters ahs a book and has a few lectures archive at autodesk university website. Migth be the places to start from. I sure miss VBdesign web site with the LLama, back in the day I learned a lot there.
I will help you test this some more if I can, but it is late here.
thanks again
Roby
This is some thread necromancy but I wanted to comment that this Excel file is absolutely fantastic. I couldn't get either of the ones that ended in a year to work, but I tried the one posted by colin.b.white with no year at the end; thank you SO MUCH.
I can now modify thousands of drawings in MINUTES (well, my labour part takes minutes, the computer plugs on for more than minutes ... but I have a PC dedicated specifically for this task); I couldn't figure out how to do what you did after MANY hours of searching, so thank you.
I would like to use it!
But i get error-messages in Excel 2010: compilation errors.
Can someone fix that problem? I'm not a macro expert