Nowak Posted March 24, 2020 Share Posted March 24, 2020 (edited) lisp to insert blocks on polyline with excel I want to insert under autocad, the PK, Y and Z columns on a polyline. The PK corresponds to the chaining of the polyline. Thanks for your help Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 25, 2020 Share Posted March 25, 2020 If you think of it as X,Y,Z then no code required in cell N1 type 3dpoly, in cell N2 put this =CONCATENATE(B2,",",C2,",",D2) and copy down for all values. You should see as per image that x,y,z values have been made. You then select column N starting at N1 and going down to last entry add 1 last blank line. For test xls this was N65 Use Copy or ctrl+c to copy the selection, go to Autocad click on command line and paste or ctrl+v A 3dpolyline should now appear. Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 25, 2020 Author Share Posted March 25, 2020 (edited) Thank you for your contribution, but I am looking for how to insert the blocks on the polyline with, as information, the chaining of the polyline. attached is the autocad file. Thank you in advance. Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 25, 2020 Author Share Posted March 25, 2020 (edited) partie 2 Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 25, 2020 Author Share Posted March 25, 2020 (edited) partie 3 Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 26, 2020 Share Posted March 26, 2020 Please redo sample problems with the zip files. Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 26, 2020 Author Share Posted March 26, 2020 Hello, I want to insert the blocks, following a polyline, for that, I put the autocad file and the excel file, as an example. These blocks were inserted according to the excel file (PK, Y), but the concern is that I do not have the associated lisp. In the Excel file, the BLOCK column is the name of the autocad block, Pk is the chaining of the polyline and Y is the position of the block relative to the polyline. Thank you in advance for your contribution. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 26, 2020 Share Posted March 26, 2020 Problems with the zip files. Any one else open ? Post an image or pdf. Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 27, 2020 Author Share Posted March 27, 2020 (edited) attached the autocad file, thank you Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 27, 2020 Share Posted March 27, 2020 (edited) If can work out what is required can be done, make 1 insert block at same co-ordinates to match XLS input so can work it out. Use Nice image !! Edited March 27, 2020 by BIGAL Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 27, 2020 Share Posted March 27, 2020 In excel Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 27, 2020 Author Share Posted March 27, 2020 ok, and after doing the formula in excel, how do you give this info in autocad? Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 27, 2020 Author Share Posted March 27, 2020 (edited) I just made the formula, and this marks me as an error Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 28, 2020 Share Posted March 28, 2020 (edited) The other way is to copy the columns together to a new worksheet and save a CSV file which can be read in a Lisp program this is probably a easier way to go.. BLOC,PK,Y,Z,,,,,,,, Montage tension - compression G- Axe ET,38.03961,-2.6873,70.206,,,,,,,, Montage tension - compression G- Axe ET,74.08152,-3.2254,70.534,,,,,,,, Montage tension - compression G- Axe ET,101.03403,-2.6825,70.77,,,,,,,, ,427.70479,-3.0395,0,,,,,,,, ,477.18136,-3.0395,0,,,,,,,, ,526.67798,-3.0395,0,,,,,,,, Montage tension - compression V1- int rel2 AT 2 Anc,576.18407,-3.3495,73.075,,,,,,,, Montage tension - compression V1 - Anti2,639.13145,-3.0395,73.489,,,,,,,, Lisp will follow soon. Edited March 28, 2020 by BIGAL Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 28, 2020 Share Posted March 28, 2020 (edited) I found an error in the paste method so concatenate should be as per this excel changed block name as was not in dwg provided. You just copy the column to the command line, some lines do not have block names so don't copy those. inserBloc3D implantation caténaire avec Z_BVC_Meta (2).xls Edited March 28, 2020 by BIGAL Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 30, 2020 Author Share Posted March 30, 2020 (edited) On 3/28/2020 at 3:17 AM, BIGAL said: The other way is to copy the columns together to a new worksheet and save a CSV file which can be read in a Lisp program this is probably a easier way to go.. BLOC,PK,Y,Z,,,,,,,, Montage tension - compression G- Axe ET,38.03961,-2.6873,70.206,,,,,,,, Montage tension - compression G- Axe ET,74.08152,-3.2254,70.534,,,,,,,, Montage tension - compression G- Axe ET,101.03403,-2.6825,70.77,,,,,,,, ,427.70479,-3.0395,0,,,,,,,, ,477.18136,-3.0395,0,,,,,,,, ,526.67798,-3.0395,0,,,,,,,, Montage tension - compression V1- int rel2 AT 2 Anc,576.18407,-3.3495,73.075,,,,,,,, Montage tension - compression V1 - Anti2,639.13145,-3.0395,73.489,,,,,,,, Lisp will follow soon. how do we insert these points in autocad ?? Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 31, 2020 Share Posted March 31, 2020 Copy and paste Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 31, 2020 Author Share Posted March 31, 2020 (edited) I make the copy paste, but autocad put me unknown command "0", yet I have the block insert in the autocad drawing Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 31, 2020 Author Share Posted March 31, 2020 when wanting to insert the block, in script version or by excel, autocad considers that it is a command and not the name of the block Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 1, 2020 Share Posted April 1, 2020 (edited) Make sure the block exists in a blank dwg else it will work but will be to far away to see in a current dwg. I tested again paste to command line Zoom E -vpoint 1,1,1 Tram posts.xls Edited April 1, 2020 by BIGAL 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.