MSasu Posted July 15, 2014 Share Posted July 15, 2014 By the way, it is possible that you have another AutoLISP file with the same name but different extension? Please try this on command prompt and check if returns other than nil: (findfile "flat.VLX") (findfile "flat.FAS") Quote Link to comment Share on other sites More sharing options...
KFesting Posted July 15, 2014 Author Share Posted July 15, 2014 They both return a nil argument, and I am certain there are no other instances of any other filetypes other than .lsp files. Also tried calling the flat.lsp file up in the acaddoc.lsp - didn't work either. I am stumped with this one. Quote Link to comment Share on other sites More sharing options...
KFesting Posted July 15, 2014 Author Share Posted July 15, 2014 Also, is there a way of resyncing the acaddoc.lsp file without having to close and reopen AutoCAD? Thinking something similar to the 'reinit' command when chaning PGP files. Quote Link to comment Share on other sites More sharing options...
MSasu Posted July 15, 2014 Share Posted July 15, 2014 Try to replace that with: (load "C:\\Users\\EMPIRE\\documents\\lisp's\\flat.lsp") If this doesn't works either, I really don't know what other solution to propose. Also, is there a way of resyncing the acaddoc.lsp file without having to close and reopen AutoCAD? To do that just call this statement: (load "acaddoc.lsp") Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted July 15, 2014 Share Posted July 15, 2014 VLIDE -> new Project -> Project Properties (organize & debug then compile) just my 2cents of opinion Quote Link to comment Share on other sites More sharing options...
MSasu Posted July 15, 2014 Share Posted July 15, 2014 Just noticed that OP had posted above the source code of the trouble-maker tool; but seems that there is nothing wrong in that. This is confirmed also that the file is loaded on prompter without issues. It is possible that the quote character (Lisp's) from path cause issues with automatic loading?!? KFesting, can you please try to remove the quote form you repository name and try again? Quote Link to comment Share on other sites More sharing options...
KFesting Posted July 15, 2014 Author Share Posted July 15, 2014 Hi MSasu, Not to sure what you mean here - are you suggesting the apostrophe is causing issues in the file directory? I've just tried loading the actual acaddoc.lsp file to refresh it - interestingly enough received the below message. Command: (findfile "acaddoc.lsp") "C:\\Users\\EMPIRE\\documents\\lisp's\\acaddoc.lsp" Command: (load "acaddoc.lsp") ; error: bad character read (octal): 0 Quote Link to comment Share on other sites More sharing options...
MSasu Posted July 16, 2014 Share Posted July 16, 2014 So, seems that you have an error message after all. I may be that the issue is in fact in the 5th file (said "vectpdf.lsp") which doesn't load completely? Can you post its code here? Quote Link to comment Share on other sites More sharing options...
KFesting Posted July 16, 2014 Author Share Posted July 16, 2014 This is the code so far in my acaddoc.lsp file: (load "EFROZEOFF") (load "ROTMULT") (load "MT2ML") (load "VPLOCKTOGGLE") (load "VECTPDF") (load "flat") (load "STRIKETHROUGH") (load "STRIPMTEXT") (load "XFD") And this is the code in the 5th file (flat): ; Flatten a 3D drawing ; Written by Eduard ; This command will set all elevations and points to zero, efectively flattening any 3D drawing. ; (defun c:flat (/ total-nabor) (vl-load-com) (if (setq total-nabor (ssget "x" '((410 . "model")))) (progn (setq total-nabor (mapcar 'vlax-ename->vla-object (mapcar 'cadr (ssnamex total-nabor) ) ;_ end of mapcar ) ;_ end of mapcar ) ;_ end of setq (foreach i '(1e99 -1e99) (mapcar (function (lambda (x) (vla-move x (vlax-3d-point (list 0 0 0)) (vlax-3d-point (list 0 0 i)) ) ;_ end of vla-move ) ;_ end of lambda ) ;_ end of function total-nabor ) ;_ end of mapcar ) ;_ end of foreach ) ;_ end of progn ) ;_ end of if (princ) ) ;_ end of defun Although the actual 'flat' LISP file works fine if I load it in manually using APPLOAD. Quote Link to comment Share on other sites More sharing options...
KFesting Posted July 16, 2014 Author Share Posted July 16, 2014 Sorry - that 'flat' file is actually the 6th LISP to load. The preceding 5 all load correctly - everything from FLAT onwards doesn't. Quote Link to comment Share on other sites More sharing options...
MSasu Posted July 16, 2014 Share Posted July 16, 2014 The "flat.lsp" is the 6th, not the 5th one; you posted that code yesterday, too. You stated that the first 5 were loaded correctly, so I presumed that the issue is with the 6th one. Seems that this was a wrong assumption. One solution to locate which file is causing that error message will be to load them one by one - commentall statements (that it, add a ";" in front) but one in your acaddoc.lsp and reload it; if works OK, then do the same with the next. (load "efrozeoff") [color=blue];[/color](load "rotmult") [color=blue];[/color](load "mt2ml") Please edit your previous post and add the code tags. Quote Link to comment Share on other sites More sharing options...
KFesting Posted July 16, 2014 Author Share Posted July 16, 2014 Problem solved! Looks like it was definitely the 5th one that was causing me issues (VECTPDF). I just had a look at the code and it is extremely messy (I don't really understand writing LISP routines myself and generally find them online for specific needs). This one actually renders a PDF as an image that can be then exploded into CAD lines etc. I won't even try and post it up on here but will attach the code in this post. Funnily enough, loading that VECTPDF LISP routine in manually works fine... Thanks for all of your help! VECTPDF.lsp Quote Link to comment Share on other sites More sharing options...
MSasu Posted July 16, 2014 Share Posted July 16, 2014 What you have there is an encrypted (by protect utility) AutoLISP code - something that was available for coders to protect their work prior to arrival of FAS/VLX compilation. So, the actual code isn't visible for debug. 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.