BIGAL Posted December 22, 2016 Share Posted December 22, 2016 Did you get the other part to work ? Wwe are using it all the time now just type D2016123 and "2016 projects\2016123\design" opens up in explorer. Expanded it also to recognise our archived drive which is based on project year also so just do a check for year Quote Link to comment Share on other sites More sharing options...
jt6572 Posted December 22, 2016 Author Share Posted December 22, 2016 Did you get the other part to work ? Wwe are using it all the time now just type D2016123 and "2016 projects\2016123\design" opens up in explorer. Expanded it also to recognise our archived drive which is based on project year also so just do a check for year hey Big Al! firstly, thank you so much for all your help these last couple of months. the job i have had i have found that if i werent a little assertive i wouldnt learn anything around here, so it has been very much appreciated. wont tell you where i work, but i will say that someone coming in and making changes is about 14 years overdue... everyone just doing their own thing, never progressing. secondly, i got really busy and sneakily had a quick go at it yesterday, but as i posted i am quite lost; i am a lisp neophite and admit it! far better to know your limitations than to wreak irreparable damage! i am hoping to have a little time this afternoon (last day of work) but there is always engineers, so no telling if i will be able to get to it long enough. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 23, 2016 Share Posted December 23, 2016 No worries just post we are on the same time line. Quote Link to comment Share on other sites More sharing options...
jt6572 Posted October 27, 2017 Author Share Posted October 27, 2017 ha ha... thanks very much Roy! (any closer it would've bitten me?!) Okay, somewhere along the line i lost the exact coding to make this work! i have (defun c:cd () (startapp "explorer" (getvar "dwgprefix")) ) to open the current drawing's directory, but cant remember how to get it to open the folder "PDF" that has...pdfs. does the folder that contains the pdfs have to be below the current drawing's folder for this to work btw? what if i am working in Drawings\Sketches, and the pdfs are held in Drawings\PDF? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 27, 2017 Share Posted October 27, 2017 If the pdfs are below its easy thats how we have them set up, at different level needs more pulling apart the dwgprefix and changing it. (strcat (getvar "dwgprefix") "pdf\\") Quote Link to comment Share on other sites More sharing options...
jt6572 Posted October 27, 2017 Author Share Posted October 27, 2017 If the pdfs are below its easy thats how we have them set up, at different level needs more pulling apart the dwgprefix and changing it. (strcat (getvar "dwgprefix") "pdf\\") Big Al! Hope Geelong is treating you well. I usually will always have the PDF folder below the drawings; will do that for the sketches I am on at the moment too. I have this: (defun c:pdf () (strcat (getvar 'dwgprefix) "PDF") ) and I get the filepath in the command line history temp pop up, but it doesn't open the folder in explorer - which is what I am after. thanks for the help. Quote Link to comment Share on other sites More sharing options...
ronjonp Posted October 27, 2017 Share Posted October 27, 2017 Try this: (defun _opendirectory (path / sa) (if (and (eq 'str (type path)) (findfile (vl-string-right-trim "\\" path)) (setq sa (vlax-create-object "Shell.Application")) ) (progn (vlax-invoke sa 'explore path) (vlax-release-object sa)) ) (princ) ) (_opendirectory (strcat (getvar 'dwgprefix) "PDF")) Or with the previous code: (defun c:pdf nil (startapp "explorer" (strcat (getvar 'dwgprefix) "PDF")) (princ)) Quote Link to comment Share on other sites More sharing options...
jt6572 Posted October 30, 2017 Author Share Posted October 30, 2017 Try this: (defun _opendirectory (path / sa) (if (and (eq 'str (type path)) (findfile (vl-string-right-trim "\\" path)) (setq sa (vlax-create-object "Shell.Application")) ) (progn (vlax-invoke sa 'explore path) (vlax-release-object sa)) ) (princ) ) (_opendirectory (strcat (getvar 'dwgprefix) "PDF")) Or with the previous code: (defun c:pdf nil (startapp "explorer" (strcat (getvar 'dwgprefix) "PDF")) (princ)) That's perfect. thanks very much. Quote Link to comment Share on other sites More sharing options...
ronjonp Posted October 30, 2017 Share Posted October 30, 2017 That's perfect. thanks very much. Glad to help 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.