TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: AVCAD on May 18, 2018, 03:05:23 PM
-
HI, I am looking for a way to search a directory full of blocks from a UI that pops up in Autocad. really just something super simple like a a dcl that pops up with a search box type in a text string have it list what it finds in a different box, then have that selectable and inserted into the drawing
I haven't coded in along time so any help would be great!
Thanks in advance!
-
Here is what i have so far...
I get the DCL to load doesnt do anything though...i am sure my lsp is totally screwed up. Haven't done this in forever
All I want to do is type in the search box and have results populated in the below box.
search is to look in 1 directory and find any file that matches the search box
then i want to select the result i want and hit ok and have it inserted to my drawing...it will be finding blocks
thanks again for any help.
-
The standard insert dialog is not sufficient?
-
Not sure what you mean?
trying to do this in stages...1 problem at a time...
(vl-directory-files "F:/AutoCAD/Blocks" "acad*.dwg")
i can use this to find the names of files but i dont know how to get that result to populate into the list box i have in the dcl
I also dont know how to make the "acad*.dwg")
portion of to be the string that is input in to the search box in the dcl
-
Here is a useful tutorial:
http://web2.airmail.net/terrycad/Tutorials/MyDialogs.htm
-
I dont know what i am doing...lol
I can get the program to write to a file, so it will write the names of the files it finds in the directory i am pointing at. How ever i really just want it to find what i am searching for by the userinput in the dcl
at one point i had it actually populating in the results box but now it wont...
Any help would be great, i thought this would be an easy one but seeing as i havent done in like 10+ years...my mind is not what it use to be...