Jump to content

Recommended Posts

Posted

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

Posted

Thanks , I have no idea why is there no reference to these variables in the developer help

Posted
Good site that Lee, cheers fella

 

No probs - its missing a few, as its only from ACAD2000, but it gets me by :wink:

Posted

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.

Posted
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. :)

Posted

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.

Posted

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.

Posted
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:

Posted

I figured it out. It's not possible to use a direct path, I must create an alias for each location.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...