simple routine does not work anymore in version 2019

simple routine does not work anymore in version 2019

pdn
Advocate Advocate
835 Views
4 Replies
Message 1 of 5

simple routine does not work anymore in version 2019

pdn
Advocate
Advocate

Hello there

 

scratching my head, the following simple routine to get the colorobject table has always worked without any problem on versions 2013, 2015 and 2017 but in version 2019 it returns an error

 

;; get the colorobject table depending on ACAD version
;;
(defun getcolorobject ()
(vla-getinterfaceobject
(vlax-get-acad-object)
(strcat "AutoCAD.AcCmColor." (substr (getvar "acadver") 1 2))
)
)

in previous versions I get <VLA-OBJECT IAcadAcCmColor 000000004160f250> back but 2019 gives me

error: Automation Error. Problem in loading application

 

any idea where to look for, maybe I used it wrong for all the time

 

Thanks in advance

Patrick

0 Likes
Accepted solutions (1)
836 Views
4 Replies
Replies (4)
Message 2 of 5

dbroad
Mentor
Mentor

Works fine here (AutoCAD 2019)

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 5

CodeDing
Advisor
Advisor

@pdn ,

 

Works fine for me also in 2018.

Perhaps try including (vl-load-com)? Maybe it is not being loaded anymore.

 

EDIT:

Also, how are you calling this function? Do any error messages appear when LOADING your lisp?

 

Best,

~DD

0 Likes
Message 4 of 5

Scottu2
Advocate
Advocate

Hi pdn,

 

Verify that the routine exists.

At the command line enter the IF statement below. A result of 1 = yes the routine exist, 0 = no routine

If you get a 0 (zero) then i suspect the registry a file link is missing, Click Here.

 

(if vla-getinterfaceobject 1 0)

(if vlax-get-acad-object 1 0)

 

Also try,

(if vlax-ename->vla-object 1 0)

 

Scott

0 Likes
Message 5 of 5

pdn
Advocate
Advocate
Accepted solution

OK

 

turned out to happen only on one system (for the moment, will have to check with the other users)

I had to uninstall completely ACAD 2019 (even had to use MicrosoftProgram_Install_and_Uninstall.meta.diagcab) and re-install from scratch

 

regards

Patrick

0 Likes