Jump to content

Getfiled question


BIGAL

Recommended Posts

I can not get this to work I want to pick a txt file tried all sorts of BIT settings it just does not go to the correct directory other tests work. Checked Alpha upper lower etc exactly as it appears in windows.

 

(setq dwgname (GETVAR "dwgname"))
(setq dwgname (substr dwgname 1 (vl-string-search ".dwg" dwgname)))
(setq dwgname (strcat (getvar "dwgprefix") dwgname "-DATA" "\\" "advRoads-10"))
; dwgname "P:\\2010026\\Design\\2010026-PF-DATA\\AdvRoads-10"
(setq fname (getfiled "Select the set out file" dwgname "txt" 4))

Link to comment
Share on other sites

Assuming the filepaths exist, try:

(setq fname
   (getfiled "Select the set out file"
       (strcat (getvar 'dwgprefix) (vl-filename-base (getvar 'dwgname)) "-DATA\\advRoads-10")
       "txt"
       16
   )
)

Link to comment
Share on other sites

Thanks Lee will try tomorrow the flag setting may be the key. I did see the vl-filename-base this is better as it removes the .dwg.

 

Yes that worked Lee will have a close look at fname between the two versions to figure out difference.

 

Thanks

Edited by BIGAL
Link to comment
Share on other sites

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...