Jump to content

error: bad argument type: VLA-OBJECT nil - in autocad 2014


dancad10

Recommended Posts

Hi, i have an problem with lisp that i have to load in autocad and is give me this error "error: bad argument type: VLA-OBJECT nil".

I don't now why, i have not been able to solve the problem.

I will attach the file .. maybe someone will now.

Thank you!

Utils-700V105.lsp

Link to comment
Share on other sites

A problem is that this function loads two (as far as I looked at) files. 

Optiuni_Utils.lsp & county.xml

  • Thanks 1
Link to comment
Share on other sites

On line 2853 .. if you miss a pick it will cause this error. You always need to make sure you're passing a valid ename to that function.

image.thumb.png.fcdf86ddbea0ad7897dbdf1dd9bfaee5.png

Quick fix would be to include  this sub in the code:

(defun _vla-object (ename)
  (if (= 'ename (type ename))
    (vlax-ename->vla-object ename)
  )
)

Then do a find and replace of 'vlax-ename->vla-object' with '_vla-object'.

  • Thanks 1
Link to comment
Share on other sites

Wow ronjonp found a problem on line  2853 you must have a lot of time. PG starts at line 8268

 

It looks like every single routine has been put into 1 routine, not sure what sort of memory overhead that introduces, as posted when something goes wrong where do you start particuarly if your not the author. 

  • Thanks 1
Link to comment
Share on other sites

10 hours ago, BIGAL said:

Wow ronjonp found a problem on line  2853 you must have a lot of time. ...

 

...

I spent about 2 minutes on the problem 😉 there are many other places this code can fail ... the OP needs to use break on error in the vlide to troubleshoot this. 11400 lines in the code posted!

image.png.f32100beeca032f937a4a518dce44b33.png

  • Confused 1
Link to comment
Share on other sites

if I type PG it fails on line 11106 (c:loadxml) :


(vlax-import-type-library
        :tlb-filename "c:/Lisp-700/dll/msxml6.dll"
        :methods-prefix "xmlm-"
        :properties-prefix "xmlp-"
        :constants-prefix "xmlc-"
      )

I don't have file "c:/Lisp-700/dll/msxml6.dll" ... do you?

Link to comment
Share on other sites

google tells msxml6.dll can be installed by user for a number of products : Windows Server 2003 servicepack 2; Windows XP servicepack 2 , what it's for...I dunno exactly.

 

But besides code from OP is long , its in a foreign language and its poorly (not!) documented so chances of ever fixing something aren't that good either.

Link to comment
Share on other sites

Hey people about this PG comand i kind a solved the mistery, it have give the error because i didn't loaded properly. I never used this lisp.

So it's ok like this, and i have "msxml6.dll" file that rlx mention about.

 

Link to comment
Share on other sites

Someone went to a lot of effort did they not write a "How to use" document ?

 

Or is it you got it from someone, who got it from someone, who got it from some one.

Link to comment
Share on other sites

Got it from someone from someone ... 

On other computer its working with zwcad 2015, and i want to use it in autocad.

This comand insert some layouts, with diferent contexts, i copied that folder with this lisp that its works  on zwcad and still its not done. I dont now how ......

Link to comment
Share on other sites

If you want just a little bit to work then open two notepad, in one your code, in the other paste each defun section of code for the command you want then it can probably be debugged. Make a small version of the code is what I am saying.

 

you will have to look carefully at each line put each called defun inserted at top of code, the layout defun should be the last one.

 

Which command do you use to start .

Edited by BIGAL
Link to comment
Share on other sites

HEY guys its works now i think there is no problem. It was all about my autocad, i have to uninstal and instaled again. The code its good.

Thanks BIGAL, and all.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...