Search the Community
Showing results for tags 'automation error'.
Hey guys, I'm working on a piece of code where I need the lisp to look up a custom property that's set and extract it. The problem I am having is that we updated our templates within the last two years so this piece of code doesn't work properly with some of the older drawings we have. I want it to assign the variable a value if it can't find it, but I don't know how to get around the automation error. Here's my attempt but I am at a loss as to what to do. (defun c:test (/ acadobject acaddocument dprops pp pp#) (setq acadObject (vlax-get-Acad-Object)) (setq acadDocument (vla-get-Activedocument acadObject)) (setq dProps (vlax-get-property acadDocument 'Summaryinfo)) (vla-getcustombyindex dprops 72 'PP 'PP#) (if (= PP# nil) (setq PP# "PLXX-X-XX-") );;end if );;end defun Here's the error I get. Error: Automation Error. Out of range FYI: The name of the custom property is Plot Plan Thanks in advance!
(SETQ obj (VLA-GETINTERFACEOBJECT (VLAX-GET-ACAD-OBJECT) "CadLisp.Lisp")) I am trying to get this to work on our new 64bit Windows 7 machine (Map 2012). It has been working fine on our existing XP machines (Map2009) for the last year. When I run this, I get the following error; (SETQ obj (VLA-GETINTERFACEOBJECT (VLAX-GET-ACAD-OBJECT) CadLisp.Lisp")) error: Automation Error. Problem in loading application "CadLisp.Lisp" is a com object which runs just fine at a command prompt with vb script. Does anyone have any suggestions? Thanks in advance