VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cannot find project or library on other PC's

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
xpeter88
4265 Views, 7 Replies

Cannot find project or library on other PC's

Hi all,

I have one macro written in VBA that is available in AutoCAD Application. My issue is that I have written macro on my laptop and works really fine. But when I share it on other PC's which are running the same AutoCAD with the same settings I will get this error "compile error: can't find project or library".

 

I know that the problem is with the references and that is what I want understand to.

If I take into Tools-References I see following;

 

AutoCAD 2012 Type Library is missing. BUT, I have linked AutoCAD 2012 Type Library as well so there are two items;

 

Missing: AutoCAD 2012 Type Library

AutoCAD 2012 Type Library

 

When I uncheck missing one it works fine again.

 

My question why this happens and how can I fix this so I dont need to go to each PC and uncheck this option every time I make some changes of code.

 

Many thanks,


references error.png

7 REPLIES 7
Message 2 of 8
Alfred.NESWADBA
in reply to: xpeter88

Hi,

 

When you click onto the line with "AutoCAD 2012 Type Library" that is functional and look to the file, wich it references, is the file the same as the one for the "MISSING..." line?

 

2014-01-22 08-43-49.png

 

>> When I uncheck missing one it works fine again.

Just to make sure: you have saved the DVB-file after that change?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 8
xpeter88
in reply to: Alfred.NESWADBA

Hi,

thanks for your response. Yes I did save that *.dvb file but you are probably right with 2 different files. I have to check in tomorrow and let you know.

 

Peter

Message 4 of 8
xpeter88
in reply to: Alfred.NESWADBA

I can cofirn that it is the same file. See attachment please.

Any idea what could cause this issue?

 

 

Untitled.png

 

 

 

Untitled2.png

 

 

 

 

 

Message 5 of 8
norman.yuan
in reply to: xpeter88

My guess is that the 2 computers have different versions of AutoCAD: both are AutoCAD 2012, but one is 32-bit and the other is 64 bit. Iin this case even the type library file is the same, they have different class Id in windows registry, and they are not exchangeable in terms of being used in VBA.

Norman Yuan

Drive CAD With Code

EESignature

Message 6 of 8
xpeter88
in reply to: norman.yuan

Hi,

you were right, all the PC's there is installed 64-bit OS works fine, but that one where is 32-bit installed gives me this error.

Dont knot why 50% of our PC's is having 32-bit OS when we have the same machines...

 

Many thanks, I see that have to handle this somehow on my own.


Peter

Message 7 of 8
wodecro
in reply to: xpeter88

Hi,

 

have you found a vba work-around to your problem?

 

Kind regards,

 

Wouter

 

Kind regards

Wouter
Message 8 of 8
xpeter88
in reply to: wodecro

Hi, actually yes, I moved to .NET.

To be honest, I did not find any solution for this, I had to change it on each PC manualy (depending on 32 or 64 bit)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost