Jump to content

lisp blocks on polyline


Nowak

Recommended Posts

  • Replies 28
  • Created
  • Last Reply

Top Posters In This Topic

  • Nowak

    15

  • BIGAL

    11

  • Jonathan Handojo

    2

  • Roy_043

    1

Top Posters In This Topic

Posted Images

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 by BIGAL
Link to comment
Share on other sites

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:

image.png.fc492b0a3af7951e369078c04a7e9504.png

 

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

Link to comment
Share on other sites

In translated versions of AutoCAD the "-insert" command is not known.

You need to prefix the English command names with "_".

Link to comment
Share on other sites

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 by BIGAL
Link to comment
Share on other sites

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 by Nowak
Link to comment
Share on other sites

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)

 

image.thumb.png.4db8387bc7469297dc652872e5b96316.png

 


and yet the blocks are in the drawing

 

 

Maybe do "_-insert"? I'm still not sure why it's happening though.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...