Help with simple code please;
I aim to make some quick-keys for opening frequently visited folders within my projects in windows explorer.My AutoLISP abilities are very limited but I was able to symbol this code which works in one specific scenario.(defun c:PICS ()(setq PicsPath1 (vl-string-right-trim "\\Dwgs\\" (getvar "dwgprefix"))) (setq PicsPath2 (strcat PicsPath1 "\\Photos\\"))(startapp "explorer" PicsPath2) (princ))
My project folder structure is basically like this:
N:\project name\correspondences \docs \dwgs \ByOthers \exhibits \ImpPlans \On-Site \Off-Site \profiles \photos \points
I intended the code above to open the "\photos" folder.All my drawing files are in "N:\project name\dwgs\" or deeper.Deeper is where I'm having problems with my code.It only works on drawings in "N:\project name\dwgs\" but does not work on any drawings that are deeper, say in "N:\project name\dwgs\exhibits" or "N:\project name\dwgs\ImpPlans\Off-Site".
I've figured out that my code is trimming only the "\dwg" folder before placing the "\photos" folder into the path.I need to trim "\dwg" and everything beyond it.I think it could be something as simple as wildcard character, but after a few days of reading posts, I still have not figured this out.
Any and all help is appreciated!
页:
[1]