M76 Posted September 28, 2009 Posted September 28, 2009 I'm trying to get the path for the currently opened drawing from Lisp, but I have no idea where to start. I can get the path of attached drawings but not the current drawing. I need it to be able to attach other drawings from the same directory with similar names. Thanks Quote
caravaggio Posted September 28, 2009 Posted September 28, 2009 (setq filepath (getvar "dwgprefix")) Quote
M76 Posted September 28, 2009 Author Posted September 28, 2009 Thanks , I have no idea why is there no reference to these variables in the developer help Quote
Lee Mac Posted September 28, 2009 Posted September 28, 2009 I sometimes use this as a reference also M76: http://www.74mph.com/faq/FAQ00066.html Quote
NBC Posted September 28, 2009 Posted September 28, 2009 I sometimes use this as a reference also M76: http://www.74mph.com/faq/FAQ00066.html Good site that Lee, cheers fella Quote
Lee Mac Posted September 28, 2009 Posted September 28, 2009 Good site that Lee, cheers fella No probs - its missing a few, as its only from ACAD2000, but it gets me by :wink: Quote
caravaggio Posted September 28, 2009 Posted September 28, 2009 in AutoCAD, you can type "SETVAR", then "?" "*". It shows all the variables, what I usually do is to look at the "help" for particular sys var. Quote
Lee Mac Posted September 28, 2009 Posted September 28, 2009 in AutoCAD, you can type "SETVAR", then "?" "*". It shows all the variables, what I usually do is to look at the "help" for particular sys var. I realise that, and there is also the Express Tools System Variable Editor - but its nice to have them all on a page with explanations. Quote
Freerefill Posted September 28, 2009 Posted September 28, 2009 There's something to say about reading it with your own two eyes. I have a printout of that page on the wall next to me, and I browse through it every now and then. You learn them without realizing, and eventually the day comes when you need to tweak something and you're like, "Oh, there's a system variable for that!" and you frantically search through your trusty list. Quote
M76 Posted September 29, 2009 Author Posted September 29, 2009 I'm starting to get mad. I'm unable to attach drawings. Here is an excerpt of the code I've been trying with no luck. (defun c:atta () (mapcar 'ade_dwgdeactivate (ade_dslist)) (setq ade_tmpprefval (ade_prefgetval "ActivateDwgsOnAttach")) (ade_prefsetval "ActivateDwgsOnAttach" T) (setq gaz (strcat (getvar "dwgprefix") (getvar "dwgname"))) (setq bt (vl-string-subst "BT" "GAZ" gaz)) (setq btid (ade_dsattach bt)) (ade_prefsetval "ActivateDwgsOnAttach" ade_tmpprefval) ) ade_dsattach always returns nil no matter what I do. I've also tried with ade_dwgactivate. ade_dwggetid also returns nil. The drawing file exists I'm sure of it. Here is the directory listing: Volume in drive E is TNEW Volume Serial Number is ... Directory of E:\!munka\mf 2009.09.29. 10:33 <DIR> . 2009.09.29. 10:33 <DIR> .. 2009.09.29. 10:33 375 attach.lsp 2009.09.29. 10:28 192 attach._ls 2009.09.29. 10:26 4˙131 buff.lsp 2009.09.21. 07:53 1˙598˙488 Martfu_BT00_20090921.dwg 2009.09.28. 13:19 2˙336˙959 Martfu_GAZ00_20090921.bak 2009.09.29. 09:54 3˙709˙366 Martfu_GAZ00_20090921.dwg 2009.09.21. 07:54 232˙085 Martfu_KT00_20090921.dwg 7 File(s) 7˙881˙596 bytes 2 Dir(s) 161˙163˙919˙360 bytes free Could this be operating system related? Since I'm running it on vista 32bit. I have no other idea as to what can cause this. Quote
alanjt Posted September 29, 2009 Posted September 29, 2009 I realise that, and there is also the Express Tools System Variable Editor - but its nice to have them all on a page with explanations. sysvdlg Just in case. :wink: Quote
M76 Posted September 29, 2009 Author Posted September 29, 2009 I figured it out. It's not possible to use a direct path, I must create an alias for each location. Quote
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.