| Author |
Message |
devon
Guest
|
Posted:
Thu Jan 06, 2005 2:45 am Post subject:
Using lisp in .mns file - problem |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
(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 |
|
|
OK,
I'm glad you got it to work.
Cheers:
Bob |
|
| Back to top |
|
 |
|
|
|
|