Author Topic: vla-addobject - Automation Error. Description was not provided  (Read 1413 times)

0 Members and 1 Guest are viewing this topic.

BazzaCAD

  • Guest
vla-addobject - Automation Error. Description was not provided
« on: October 12, 2016, 06:50:55 PM »
I posted this issue a few months ago.
https://www.theswamp.org/index.php?topic=51292.0
I added the reg keys and everything worked fine, until now...

I'm now having a new issue, but it's happening with the very same sets of code.

Code - Auto/Visual Lisp: [Select]
  1.  
  2. (setq LFILTOBJ (vla-addobject
  3.         (vlax-Get-Acad-Object)
  4.       )
  5.     )
  6.   )
  7.   "ACAD_LAYERFILTERS"
  8.   "AcDbDictionary"
  9. ))
  10.  

I get: error: Automation Error. Description was not provided.


Code - Auto/Visual Lisp: [Select]
  1. (setq mldrdict (vla-item (vla-get-dictionaries *doc*)"ACAD_MLEADERSTYLE"))
  2. (setq newmldrstyle (vlax-invoke mldrdict 'addobject (cadr x1) "AcDbMLeaderStyle"))
  3.  

And here I get: error: Exception occurred

I've rechecked the registry & all the ActiveXCLSID keys are there.
I've re-installed Acad & still no change.
This issue is effecting my computer & 2 others in the office, but the 30 other computers seem fine with this same code.
I haven't installed any beta software on my computer. And I especially didn't install anything on the other 2 production computers.
Any ideas, suggestions?

Thanks for the help.


It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8705
  • AKA Daniel
Re: vla-addobject - Automation Error. Description was not provided
« Reply #1 on: October 13, 2016, 12:35:42 AM »
Cylons!

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2139
  • class keyThumper<T>:ILazy<T>
Re: vla-addobject - Automation Error. Description was not provided
« Reply #2 on: October 13, 2016, 01:34:42 AM »
Quote
Any ideas, suggestions?

Hi Barry,

Have you been leaving daily gratuities to the programming fairies ??

I've found that helps, and the Taxation Department  recognise the necessity for a regular small payment, so the cash/goods ** are reimbursable.

** note : black jelly beans are usually a particularly good form of payment.


//-------------
Sorry, I can't be of further help with your issue.

Stay well.


Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

BazzaCAD

  • Guest
Re: vla-addobject - Automation Error. Description was not provided
« Reply #3 on: October 19, 2016, 04:38:26 PM »
I was hoping I'd be able to get a better answer than these...?
Anyone else have any ideas?

ifncdylan

  • Guest
Re: vla-addobject - Automation Error. Description was not provided
« Reply #4 on: October 19, 2016, 11:39:24 PM »
Perhaps run a report on environment variables that differ between the non-functioning systems and not.

One technique I have used to debug those automation errors is putting a crude print-line between every call in my code, that way I know at least which vlax call has caused the automation error - but make sure to remove all nesting - set a temp variable for every (vla-) return value and then it will should cause an automation error on the specific operation that is at fault.

BazzaCAD

  • Guest
Re: vla-addobject - Automation Error. Description was not provided
« Reply #5 on: October 28, 2016, 07:18:44 PM »
Thanks for the reply.
Sorry I didn't see it sooner.
Are you refining to the AutoCAD system variable? I've done that & there's nothing jumping out that's breaking the code.
Or are you referring to Windows Environment variables?

I have added debug print out to my code. I know the exact line & function that's failing.

It's (vla-addobject) here:
Code - Auto/Visual Lisp: [Select]
  1. (setq newmldrstyle (vl-catch-all-apply 'vla-addobject (list mldrdict (cadr x1) "AcDbMLeaderStyle")))

I trap the error & I get "Automation Error. Description was not provided." on the newmldrstyle object.