Using lisp in .mns file - problem
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Using lisp in .mns file - problem

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
devon
Guest





Posted: Thu Jan 06, 2005 2:45 am    Post subject: Using lisp in .mns file - problem Reply with quote

Hi,

I have a simple partial menu which has "full" paths to our server and the assiaoted files for the tools these icon's execute.

My problem is that I updated the paths with my lisp variable (the way it should be) but can't get lisp working for the icon paths.

here is an example...
This works.. but I want to "libpref" the icon file also...

ID_1 [_Button("Lysaght Products", "O:/Infra/CADD/Software/Acad/LIB/BHP/LYSAGHT.bmp", "LYSAGHT.bmp")](load (strcat libpref "lib/BHP/Lysaght.Lsp")) ^C^C_lysaght

Any ideas if this can be done?

Thanks
Devon

Back to top
ECCAD
Guest





Posted: Thu Jan 06, 2005 5:47 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

Do you have a "/" at the end of 'libpref' var ?

ID_1 [_Button("Lysaght Products", "O:/Infra/CADD/Software/Acad/LIB/BHP/LYSAGHT.bmp", "LYSAGHT.bmp")](load (strcat libpref "lib/BHP/Lysaght.Lsp")) ^C^C_lysaght

Bob
Back to top
devon
Guest





Posted: Thu Jan 06, 2005 5:51 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

Hi Bob,

My question is how can i have this line "("Lysaght Products", "O:/Infra/CADD/Software/Acad/LIB/BHP/LYSAGHT.bmp", " converted to a (libpref/bhp......bmp

as my origional code works fine, but I still have to "long path" the bitmap icon image.

Thanks
Devon

Back to top
ECCAD
Guest





Posted: Thu Jan 06, 2005 5:55 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

Assuming you have the appropriate bitmap file there,
you will need to 'recompile' the menu - in order to refresh
the .mns (menu resource) file.
Do: menuunload, unload the menu, then, load the .mns file
again to recompile.

Bob
Back to top
devon
Guest





Posted: Thu Jan 06, 2005 5:59 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

Hi,

I think there is a misunderstanding.

This is my code...
ID_1 [_Button("Lysaght Products", "O:/Infra/CADD/Software/Acad/LIB/BHP/LYSAGHT.bmp", "LYSAGHT.bmp")](load (strcat libpref "lib/BHP/Lysaght.Lsp")) ^C^C_lysaght

The code works fine. but in the 1st 1/2 I have to long path my bitmap file. I cannot do like what I have donw in the last 1/2 and use my (strcat libpref "lib/bhp/lysaght.bmp") string.

my question is "how" do you use lisp to point to the bitmap?

Thanks
Back to top
ECCAD
Guest





Posted: Thu Jan 06, 2005 6:01 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

What 'exactly' do you have in var 'libpref' ?
Bob
Back to top
ECCAD
Guest





Posted: Thu Jan 06, 2005 6:04 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

Or, you could make life easier.
Give me an E-Mail at:
ec-cad@centurytel.net

:)

Bob
Back to top
devon
Guest





Posted: Thu Jan 06, 2005 6:04 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

libpref is just an variable of the full path.

I have libpref defined in my acad.lsp and then i only need all my lisp files to refer to this.

This is helpful if directory structure changes as you only need to change the origional libpref variable in one location and then all you other lsp's will work.

so libpref = o"\Software\CADD\Tools\Lisp

Regards,
Devon
Back to top
ECCAD
Guest





Posted: Thu Jan 06, 2005 6:05 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

Put a "\" at the end....
Bob
Back to top
ECCAD
Guest





Posted: Thu Jan 06, 2005 6:06 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

Better yet..
make all the '\" into "\\" so this is a quoted "\"..
For Lisp, if you use just a "\", it doesn't get it.
You need "\\" instead..
Bob
Back to top
ECCAD
Guest





Posted: Thu Jan 06, 2005 6:13 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

Devon: change:
(setq libpref o"\Software\CADD\Tools\Lisp")
to:
(setq libpref "O:\Software\\CADD\\Tools\\Lisp\\")

Bob
Back to top
ECCAD
Guest





Posted: Thu Jan 06, 2005 6:14 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

(setq libpref "O:\\Software\\CADD\\Tools\\Lisp\\")
instead.
Back to top
ECCAD
Guest





Posted: Thu Jan 06, 2005 6:38 am    Post subject: Re: Using lisp in .mns file - problem Reply with quote

OK,
I'm glad you got it to work.
Cheers:

Bob
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB