jimpcfd Posted August 23, 2010 Share Posted August 23, 2010 i can't get an old menu command (R14)to work in 2010, it calls a lisp routine. this is the call ^C^C(if (not (boundp 'p$layer)) (p$load "p$layer"))(p$layer 1). is there a way to get this work ? cheers Quote Link to comment Share on other sites More sharing options...
lpseifert Posted August 23, 2010 Share Posted August 23, 2010 see if this works ^c^c(if (not c:[i][color=red]commandcall[/color][/i])(load "[i][color=red]lispfilename[/color][/i]" nil));[i][color=red]commandcall[/color][/i]; where lispfilename is the lisp file name and commandcall is the command to run the lisp function Quote Link to comment Share on other sites More sharing options...
jimpcfd Posted August 23, 2010 Author Share Posted August 23, 2010 Ok i will give that a go. many thanks. Quote Link to comment Share on other sites More sharing options...
jimpcfd Posted August 23, 2010 Author Share Posted August 23, 2010 hi lpseifert i had no luck with that, this is what i did ... ^c^c(if (not c:p$layer)(load "lp$layer" nil)) p$layer 1 do you think it might be better to create a lisp file to do the calls ? thanks jimpcfd Quote Link to comment Share on other sites More sharing options...
lpseifert Posted August 23, 2010 Share Posted August 23, 2010 it would be easier to troubleshoot if you were to post the lisp file and/or code Quote Link to comment Share on other sites More sharing options...
jimpcfd Posted August 24, 2010 Author Share Posted August 24, 2010 Hi i've attached 3 file acad.lsp and the 2 lisp file that are being called. many thanks jimpcfd ACAD.LSP P$LAYER.LSP P$LLIST.LSP Quote Link to comment Share on other sites More sharing options...
lpseifert Posted August 24, 2010 Share Posted August 24, 2010 First- be sure the files are located in acad's support path- that may be the crux of the problem the code you provided in your first post should work I don't know the purpose of the acad.lsp file, but if the variable ACADLSPDOC is set to 0, it will be loaded only once- not in each drawing (look in Help for the purpose of the acad.lsp file) If you know you need the functionality of P$LAYER.lsp & P$LLIST.lsp in each drawing, add this to your acaddoc.lsp file. If you don't have an acaddoc.lsp file, create one (again, look in Help for the purpose of the acaddoc.lsp file) (load "P$LAYER" nil) (load "PLLIST" nil) Quote Link to comment Share on other sites More sharing options...
jimpcfd Posted August 24, 2010 Author Share Posted August 24, 2010 i guess acaddoc.lsp is the same as acad.lsp. all my support path are correct, i think the problem seems to be the call has a parameter p$layer 1 number being the layer list pllist.lsp. i will try your suggestion. thanks again Quote Link to comment Share on other sites More sharing options...
BlackBox Posted August 24, 2010 Share Posted August 24, 2010 (edited) i guess acaddoc.lsp is the same as acad.lsp. DANGER WILL ROBINSON! ACADDOC.lsp and ACAD.lsp are definitely NOT the same... [edit] ACAD.lsp loads once per session (in the beginning), whereas ACADDOC.lsp will load with each drawing opened. Generally speaking, it is accepted as good practice for users to only modify their ACADDOC.lsp, leaving the ACAD.lsp to be managed by their Sr. CAD Management Staff. Admittedly, this is not the case in all situations. I would strongly suggest that you use ACADDOC.lsp for all of your custom settings, routines, etc. [/edit] Edited August 24, 2010 by BlackBox Clarification of ACAD.lsp and ACADDOC.lsp Quote Link to comment Share on other sites More sharing options...
jimpcfd Posted August 24, 2010 Author Share Posted August 24, 2010 OK thanks, i will tread carefully. 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.