dancad10 Posted April 10, 2019 Share Posted April 10, 2019 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 Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted April 10, 2019 Share Posted April 10, 2019 when using which function? Quote Link to comment Share on other sites More sharing options...
dancad10 Posted April 10, 2019 Author Share Posted April 10, 2019 It is called PG Emmanuel Delay Quote Link to comment Share on other sites More sharing options...
dancad10 Posted April 10, 2019 Author Share Posted April 10, 2019 This is showing me when i tap pg in comand bar. With pg i introduce some infromation for parcels Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted April 10, 2019 Share Posted April 10, 2019 A problem is that this function loads two (as far as I looked at) files. Optiuni_Utils.lsp & county.xml 1 Quote Link to comment Share on other sites More sharing options...
ronjonp Posted April 10, 2019 Share Posted April 10, 2019 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. 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'. 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 11, 2019 Share Posted April 11, 2019 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. 1 Quote Link to comment Share on other sites More sharing options...
dancad10 Posted April 11, 2019 Author Share Posted April 11, 2019 Thank you all, for respond my problem i will see if i could fix with your clues. Quote Link to comment Share on other sites More sharing options...
ronjonp Posted April 11, 2019 Share Posted April 11, 2019 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! 1 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 11, 2019 Share Posted April 11, 2019 Wow, what a mess! Quote Link to comment Share on other sites More sharing options...
rlx Posted April 11, 2019 Share Posted April 11, 2019 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? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 12, 2019 Share Posted April 12, 2019 No idea what is making it. Quote Link to comment Share on other sites More sharing options...
rlx Posted April 12, 2019 Share Posted April 12, 2019 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. Quote Link to comment Share on other sites More sharing options...
dancad10 Posted April 12, 2019 Author Share Posted April 12, 2019 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 12, 2019 Share Posted April 12, 2019 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. Quote Link to comment Share on other sites More sharing options...
dancad10 Posted April 15, 2019 Author Share Posted April 15, 2019 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 ...... Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 16, 2019 Share Posted April 16, 2019 (edited) 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 April 16, 2019 by BIGAL Quote Link to comment Share on other sites More sharing options...
dancad10 Posted April 17, 2019 Author Share Posted April 17, 2019 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 18, 2019 Share Posted April 18, 2019 Thats like a last resort but good its working. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.