Nowak Posted April 1, 2020 Author Share Posted April 1, 2020 (edited) I have inserted the blocks, and when I copy the commands here is what I have: Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 2, 2020 Share Posted April 2, 2020 (edited) What language version are you running the comma may be the problem. 123,45 v's 123.45 Try this copy and paste as a test. (command "-insert" "Montage tension - compression G- Axe ET" (List 74 -3 70) 1 1 0) (command "-insert" "Montage tension - compression G- Axe ET" (List 101 -2 70) 1 1 0) (command "-insert" "Montage tension - compression G- Axe ET" (List 136 -2 70) 1 1 0) (command "-insert" "Montage tension - compression G- Axe ET" (List 182 -2 71) 1 1 0) I will look into using "," Edited April 2, 2020 by BIGAL Quote Link to comment Share on other sites More sharing options...
Nowak Posted April 2, 2020 Author Share Posted April 2, 2020 (edited) Hello it doesn't work Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
Nowak Posted April 3, 2020 Author Share Posted April 3, 2020 but I have another question, if I insert like this, they will not follow the polyline? Quote Link to comment Share on other sites More sharing options...
Jonathan Handojo Posted April 3, 2020 Share Posted April 3, 2020 On 4/1/2020 at 7:02 PM, Nowak said: I have inserted the blocks, and when I copy the commands here is what I have: What bigal wrote down worked fine for me. Idk how it didn't for you. Anyway, if things do come down to worse, here's your last resort: (defun c:putblock ( / msp) (setq msp (vla-get-ModelSpace (vla-get-ActiveDocument (vlax-get-acad-object)))) (foreach x '( ; <--- copy below this line ("Montage tension - compression V1" 38.03961 -2.6873 70.206 0) ("Montage tension - compression V1" 74.08152 -3.2254 70.534 0) ("Montage tension - compression V1" 101.03403 -2.6825 70.77 0) ("Montage tension - compression V1" 136.99692 -2.7183 70.825 0) ("Montage tension - compression V1 - Anti" 182.08783 -2.6415 71.19 0) ; ... and all the others ) (vl-catch-all-apply 'vla-InsertBlock (list msp (vlax-3d-point (cadr x) (caddr x) (cadddr x)) (car x) 1 1 1 (last x))) ) ) Following the attached file. It's not tested, but it should work. inserBloc3D implantation caténaire avec Z_BVC_Meta (1).xls Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted April 3, 2020 Share Posted April 3, 2020 In translated versions of AutoCAD the "-insert" command is not known. You need to prefix the English command names with "_". Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 3, 2020 Share Posted April 3, 2020 (edited) Jonathon you need to read the posts the solution offered was using plain excel not a lisp, as I hinted earlier could use a csv file and read into Autocad, I was trying to make it easier and just do from Excel.There is a language problem. Thanks Roy_043 you are right it may be the ENGLISH version of insert. I also found if you look carefully at the screen dump the co-ords are comma separated and this may be causing the problem also 123,45 34,456 For Nowak https://www.officetooltips.com/excel_2016/tips/change_the_decimal_point_to_a_comma_or_vice_versa.html this may help. Edited April 3, 2020 by BIGAL Quote Link to comment Share on other sites More sharing options...
Nowak Posted April 6, 2020 Author Share Posted April 6, 2020 (edited) here is what i put in autocad, but it still doesn't work, in script: (command "_insert" "Montage tension - compression G- Axe ET" (list 38.03961 -2.6873 70.206 )1 1 0) (command "_insert" "Montage tension - compression G- Axe ET" (list 74.08152 -3.2254 70.534) 1 1 0) and yet the blocks are in the drawing Edited May 14, 2020 by Nowak Quote Link to comment Share on other sites More sharing options...
Jonathan Handojo Posted April 6, 2020 Share Posted April 6, 2020 1 hour ago, Nowak said: here is what i put in autocad, but it still doesn't work, in script: (command "_insert" "Montage tension - compression G- Axe ET" (list 38.03961 -2.6873 70.206 )1 1 0) (command "_insert" "Montage tension - compression G- Axe ET" (list 74.08152 -3.2254 70.534) 1 1 0) and yet the blocks are in the drawing Maybe do "_-insert"? I'm still not sure why it's happening though. 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.