supermonkey Posted November 29, 2022 Share Posted November 29, 2022 Hi all, My work have recently "upgraded" to Autocad LT 23 from an older full Autocad & as a result, I can no longer run my time saving Lisp routines. We use a third party program which exports several dwg files per job. I had been using lisp to insert each dwg file as a block in my drawing, all spaced out along a row (eg block chart or insertblks). Is there a way to do this without lisp? Everything i've found would mean importing one at a time. Thanks 1 Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 29, 2022 Share Posted November 29, 2022 I believe it could be done with a macro. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 29, 2022 Share Posted November 29, 2022 Changing to say Bricscad would have been a better move. Anyway you could maybe do something in excel its very easy to copy a column of commands to the command line. 1 Quote Link to comment Share on other sites More sharing options...
supermonkey Posted November 30, 2022 Author Share Posted November 30, 2022 thanks both for your replies. I agree about Bricscad having used it in the past, but I am not in charge! The spreadsheet idea is a good one - but the insert command just brings up the blocks paellete. I'm not sure how I reference the dwg file & it's path? I've tried the following with no luck: insert "C:\\USERS\\USER\\DESKTOP\\DRAWING.DWG" "0,0" 1 1 0 insert "C:\\USERS\\USER\\DESKTOP\\DRAWING.DWG" pt "" "" "" -insert;C:\\USERS\\USER\\DESKTOP\\DRAWING.DWG;\;; Quote Link to comment Share on other sites More sharing options...
tombu Posted December 1, 2022 Share Posted December 1, 2022 For pathnames us foreword slash (/) not the backslash (\) About Special Control Characters in Command Macros (\) Pauses for user input (cannot be used with accelerators). You actually used (\) to pause for user input on your last try. Maybe: -insert;C:/USERS/USER/DESKTOP/DRAWING.DWG;\;; Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 1, 2022 Share Posted December 1, 2022 Watch out for spaces in file names or directories maybe -insert;"C:/USERS/USER/DESKTOP/DRAWING.DWG";\;; Quote Link to comment Share on other sites More sharing options...
supermonkey Posted February 21, 2023 Author Share Posted February 21, 2023 bump as i've still been unable to crack this. if I move all the files I want to insert into the same folder the main dwg is in, I can insert one at a time from the command line, but I cannot work out how to insert multiple files. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 23, 2023 Share Posted February 23, 2023 (edited) There are some old DOS tricks that let you make a list of dwg names throw that into excel and edit the -insert should work and as mentioned use dbl backslashes. - insert "d:\\projects 2023\\bigtasks\\For Fred\\dgw1" "0,0" 1 1 0 Ok now for some DOS lower left in windows do CMD the operating sytem will be exposed. D : Cd /projects 2023/bigtasks/For Fred Dir *.dwg >dwglst.txt /b You now have a list of all the dwgs in that directory open text file in excel and use the above -insert method. Edited February 23, 2023 by BIGAL Quote Link to comment Share on other sites More sharing options...
supermonkey Posted February 23, 2023 Author Share Posted February 23, 2023 Thanks, I am ok with generating a list of files. But I cannot work out how to use multiple files in the insert command. If I have to copy and paste the command for each file, it defeats the object as I can already drag them in one by one. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 23, 2023 Share Posted February 23, 2023 Ok you have Excel which has VBA as its macro language so there you are can do all sorts of shortcuts like choose dwgs, with explorer style choosing, enter X & Y spacing, then write the column. The -INSERT should work. There is a huge amount of excel macro examples out there should be able to find choose files. Lt should support the copy of a column of rows to command line. Steven-G you out there ? Quote Link to comment Share on other sites More sharing options...
supermonkey Posted February 24, 2023 Author Share Posted February 24, 2023 Thanks, but however I format the command, it only works with a single drawing. Maybe i'm searching for the wrong thing, but I cannot find any examples that help Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 24, 2023 Share Posted February 24, 2023 Does AutoCAD LT have the MULTIPLE command? It might speed things up. Quote Link to comment Share on other sites More sharing options...
supermonkey Posted February 24, 2023 Author Share Posted February 24, 2023 Yes it does have the multiple command, but unless I'm missing something I don't think it will save much time: After I've generated a list of the files to import, I'd then use multiple which would prompt for each file. I'd then need to copy the command for each file & paste separately. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 24, 2023 Share Posted February 24, 2023 How does dragging and dropping do for you? Unfortunately, the use of LT and no LISP, just doing it faster is all you are going to achieve AFAIK. Quote Link to comment Share on other sites More sharing options...
supermonkey Posted February 24, 2023 Author Share Posted February 24, 2023 drag and drop is ok when it's only a few files... sometimes I have a hundred or so it becomes painful! Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 24, 2023 Share Posted February 24, 2023 XATTACH or XREF allows multiple selection and insert, but at 0,0 for all AFAIK. Works for me when I have drawings with the items at different distances from 0,0. I would take the time to do it individually, the company cheaped-out and went to LT, nothing you can do really. Maybe, do a monthly of full AutoCAD when you need to use LISP. Quote Link to comment Share on other sites More sharing options...
supermonkey Posted February 24, 2023 Author Share Posted February 24, 2023 Unfortunately, the files are all at 0,0. Yeah, it looks like they cheaped out & well wonder why productivity is lower! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 24, 2023 Share Posted February 24, 2023 I don’t know if your missing something I thought LT would support copy and paste of multiple lines, your column in excel must be just that 1cell is 1 line of insert command. -insert mydwg1 “0,0” 1 1 0 -insert mydwg2 “100,100” 1 1 0 Quote Link to comment Share on other sites More sharing options...
SLW210 Posted April 18, 2023 Share Posted April 18, 2023 It appears AutoCAD LT 2024 can use LISP. Hopefully you can upgrade now. 1 Quote Link to comment Share on other sites More sharing options...
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.