dax Posted May 2, 2017 Posted May 2, 2017 Hi Guys, If anyone encountered this kind of error message in AutoCAD? currently I'm using the BATCHLISP program by Jeffrey Sanders, notice that the program has limitation when I select more than 1000 files. Does the list_box have limitations? Regards, Dax Quote
rkmcswain Posted May 2, 2017 Posted May 2, 2017 It does. I can't remember if the limit is the number of items or the total string length of the items. Google something like "autocad list_box limitation" - I bet you can find some conversations about it from the past. Not much, if anything has changed with DCL in 20+ years. Quote
dax Posted May 2, 2017 Author Posted May 2, 2017 Thank for your response rkmcswain, Can you suggest other technology to use rather than DCL. Quote
BIGAL Posted May 3, 2017 Posted May 3, 2017 Creating the script etc can have more than a 1000 lines in it I hope. I know I have done in excess of say 100, have you thought about creating your script in other ways like old fashioned CMD DIR *.dwg >dirlst /b throw into word or excel to make a script. The stumbling block seems to be creating the list of dwg names. Can you describe your file directory ? There are ways of making file lists including sub directories. I just searched my current year projects and found 200+ dwgs it took about 2 seconds and I have them in a text file. next step put in word and use Replace to make into a script, you use the ^p which is end of line to make the script adding what you want before or after. eg ^p replace ^p Open adds Open to every line at start, ^p replace (load "mylisp") close Y ^p adds to end. CMD you know lower left windows ball, for those on Win 10 type CMD into box. Z: pick your drive etc cd 2016 projects dir *.dwg >c:\acdatemp\dirlst.txt /s /b P:\2016 Projects\2016000\Leisure centre\Disabled.dwg P:\2016 Projects\2016007\Design\2016007 PA.dwg P:\2016 Projects\2016007\Design\2016007.dwg Quote
dax Posted May 3, 2017 Author Posted May 3, 2017 Hi BIGAL, Not familiar on that approach, just planning to customized the BATCHLISP program by Jeffry Sanders, however upon checking the program It cannot processed more than 500 files. Do you have sample routing on that approach? Regards, Dax Quote
BIGAL Posted May 4, 2017 Posted May 4, 2017 Post a few lines of your intended script. What I suggested gets all you can do some filtering as well like all "a*.dwg" so gets all "A" dwg's case does not matter. I just did my C:drive took maybe 5 seconds and returned 108 pages of dwg's in word. Quote
dax Posted May 4, 2017 Author Posted May 4, 2017 Post a few lines of your intended script. What I suggested gets all you can do some filtering as well like all "a*.dwg" so gets all "A" dwg's case does not matter. I just did my C:drive took maybe 5 seconds and returned 108 pages of dwg's in word. Hi BIGAL, See below code.. assuming that the get_tile "file" hold 1000 .dwg files. (defun saveVars() ;;;--- Set up an empty list to hold the selected file names (setq fileList(list)) ;;;--- Get the files attribute (setq selIndexes(get_tile "files")) ; files contains the list of drawings assuming 1000 .dwg files ;;;--- Set up a counter (setq cntr 1) ;;;--- Cycle through each item in the list (while (setq item (read selIndexes)) ;;;--- Save the path and selected file name in the list (setq fileList (append fileList (list (strcat FilePath (nth item ListOfFils))))) ;;;--- Check for blank or empty selections (while (and (/= " " (substr selIndexes cntr 1)) (/= "" (substr selIndexes cntr 1)) ) (setq cntr (+ cntr 1)) ) ;;;--- Get the next item (setq selIndexes (substr selIndexes cntr)) ) ;;;--- Return the file list fileList ) Quote
BIGAL Posted May 5, 2017 Posted May 5, 2017 There is no way I am going to scroll through a 1000 line dcl list, I would break it down into single directories and sub directories at most. I would hope our drawing naming convention would ensure we create an appropriate list, doing it my way I would just open the list in word and delete what I dont want leaving behind the desired master list. As I posted above I get a full path description so whole directories like block libraries can be removed in bulk. Again the scripting can be done very easily in Word using Replace. Quote
dax Posted May 5, 2017 Author Posted May 5, 2017 Hi BIGAL, I manage it to select all on the list box, the problem is that it encounters error when selecting more than 530 drawing files. 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.