×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

INSERT LISP - sub folders?

INSERT LISP - sub folders?

INSERT LISP - sub folders?

(OP)
Hi,
We currently have a LISP routine that inserts our OS-map drawing tiles - It works by us clicking on screen the area where we want the mapping (coordinates) and it then inserts the correct one.
However it only works from one Folder, so is there a way to make it search through multiple folders (basically we want to split up the mapping in to sub-directorary's)
Any help would be great either in altering our current lisp, or a new one, or if there is another way such as VBA.
(Can email current lisp if required)

Thanks

RE: INSERT LISP - sub folders?

Are you looking to browse for a certain file to get it to insert?

"Whether you think that you can, or that you can't, you are usually right "
.. Henry Ford

RE: INSERT LISP - sub folders?

(OP)
Hi borgunit,
No - I want the lisp routine to search through a number of folders and find the correct block to insert (by name).
Hope that makes it a bit clearer.

RE: INSERT LISP - sub folders?

If all of the folders are in your search path, Autocad will automatically do the search.

RE: INSERT LISP - sub folders?

(OP)
Not all the folders are in the search paths as there are quite alot of folders (20+) and it I put them  all in the search path it would then make autoCad run slower.

RE: INSERT LISP - sub folders?

There are a couple ways to do it. If the files will always be in these certain folders, you can do a FILEFIND lisp call i.e. (findfile "c:\program files\acad2000\some folder\somedwg.dwg"). You could do this for any number of folders. If the folder names can change and you want to do a recursive search then.

"Whether you think that you can, or that you can't, you are usually right "
.. Henry Ford

RE: INSERT LISP - sub folders?

Oops, cut myself off. Try this...


(setq FileToFind "Drawing1.dwg"
      StartDir     "C:/Program Files/ACAD2000"
  )
(setq WheresTheFile(acet-file-dir FileToFind 0 StartDir))

"Whether you think that you can, or that you can't, you are usually right "
.. Henry Ford

RE: INSERT LISP - sub folders?

(OP)
Hi Borgunit,

Your second idea seems to be what I am looking for, but it does not work (acet-file-dir is unknown) - I guess I have the wrong version of expressTools. Anyway is there another to do a recursive search?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources