PDA

View Full Version : old menu to new cui menu



jimpcfd
23rd Aug 2010, 01:09 pm
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

lpseifert
23rd Aug 2010, 01:40 pm
see if this works


^c^c(if (not c:commandcall)(load "lispfilename" nil));commandcall;
where lispfilename is the lisp file name and commandcall is the command to run the lisp function

jimpcfd
23rd Aug 2010, 02:26 pm
Ok i will give that a go.


many thanks.
:)

jimpcfd
23rd Aug 2010, 04:40 pm
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

lpseifert
23rd Aug 2010, 05:00 pm
it would be easier to troubleshoot if you were to post the lisp file and/or code

jimpcfd
24th Aug 2010, 11:41 am
Hi

i've attached 3 file acad.lsp and the 2 lisp file that are being called.

many thanks
jimpcfd
:)

lpseifert
24th Aug 2010, 12:27 pm
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)

jimpcfd
24th Aug 2010, 04:02 pm
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

BlackBox
24th Aug 2010, 04:16 pm
i guess acaddoc.lsp is the same as acad.lsp.


DANGER WILL ROBINSON!

ACADDOC.lsp and ACAD.lsp are definitely NOT the same...


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.

jimpcfd
24th Aug 2010, 05:20 pm
OK thanks, i will tread carefully.