Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automation Error: Problem in loading Application

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
darinp
3305 Views, 3 Replies

Automation Error: Problem in loading Application

Hello all.

I have a LISP routine that I wrote years ago that I am having an issue with in ACAD 2014.

The routine loads but when I try to run it I get an error stating "Automation Error: Problem in loading Application"

I have narrowed it down to this line of code where it is blowing up:

(setq colorObj (vla-getinterfaceobject (vlax-get-acad-object) "AutoCAD.AcCmColor.18"))

My belief is that is has something to do with the vla-getinterfaceobject function but I cant find a way around it.

Does anyone have any ideas for me?

Thanks in advance.

3 REPLIES 3
Message 2 of 4
Hallex
in reply to: darinp


create acad.lsp or acadoc.lsp if not exist then add this code line in there
(setvar "TRUSTEDPATHS"  (strcat (getvar "TRUSTEDPATHS") ";C:\\Test\\MyFolder1;C:\\Test\\MyFolder2;C:\\Test\\MyFolderEtc")))

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 3 of 4
wkmvrij
in reply to: darinp

Darinp,

In my registry I find "AutoCAD.AcCmColor.17" "AutoCAD.AcCmColor.18" and "AutoCAD.AcCmColor.19" 

 

On my computer while running Acad 2007 the line works if I change the definition to "AutoCAD.AcCmColor.17"

While running Acad 2012 the line works with the definition "AutoCAD.AcCmColor.18" but not with "AutoCAD.AcCmColor.17" or "AutoCAD.AcCmColor.19"

 

 

It seems to me it is related to your apparent update.

and I would suggest you to check which definitions you have available...

 

Message 4 of 4
hmsilva
in reply to: wkmvrij

Try

(vla-GetInterfaceObject
  (vlax-get-acad-object)
  (strcat "AutoCAD.AcCmColor." (substr (getvar 'ACADVER) 1 2))
)

HTH

Henrique

EESignature

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

Post to forums  

Autodesk Design & Make Report

”Boost