Nowak Posted March 27, 2020 Share Posted March 27, 2020 (edited) Hello, I'm looking for a Lisp which lets you know how long the point (or autocad block) is in relation to the start of the polyline, each time that crosses it. Edited March 28, 2020 by fuccaro Just made the text more readable... Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 28, 2020 Share Posted March 28, 2020 (edited) This is a easy question to answer and rather than post code here is the functions to use so if you look at Visual lisp help for the vlax-curve functions it should become obvious, (setq obj (vlax-ename->vla-object (car (entsel "Pick object ")))) (setq pt (getpoint "\nPick point for dist")) (setq dist (vlax-curve-getdistatpoint obj pt )) The pt is either a point picked on the pline or (setq ins (vlax-get obj 'insertionPoint)) for a block. Make a start on learning lisp rather than just asking for answer. Command: PL PLINE ............... Command: (setq obj (vlax-ename->vla-object (car (entsel "Pick object ")))) Pick object #<VLA-OBJECT IAcadLWPolyline 000001b9b823f128> Command: (setq pt (getpoint "\nPick pline")) (409.01 365.163 0.0) Command: (setq dist (vlax-curve-getdistatpoint obj pt )) 278.107 Lastly need a IF choice pick a block or point. Edited March 28, 2020 by BIGAL Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 28, 2020 Author Share Posted March 28, 2020 Sorry, I don't know the lisp, I haven't had any training Quote Link to comment Share on other sites More sharing options...
fuccaro Posted March 28, 2020 Share Posted March 28, 2020 Quote I don't know the lisp At the moment I write this, you have 10 posts and all are in the Lisp forum. If you have so much interest in it, you should make some effort to learn. Start from the basic things. Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 28, 2020 Author Share Posted March 28, 2020 2 hours ago, fuccaro said: At the moment I write this, you have 10 posts and all are in the Lisp forum. If you have so much interest in it, you should make some effort to learn. Start from the basic things. Already, I came here on this forum to create a BIM model on autocad, I lacked the programming to make the link between an Excel file and the 3D blocks, but hey, sorry to have disturbed you in my research. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 28, 2020 Share Posted March 28, 2020 (edited) Keep asking questions you will get answers, in my prior post I posted an example you can copy and paste from here to Autocad command line do 1 line at a time and see what you get. Afralisp has some good tutorials. You get more help by having a go yourself. I can see English is not first language. copy and paste each line osmode 512 (setq obj (vlax-ename->vla-object (car (entsel "Pick pline ")))) (setq pt (getpoint "\nPick pline")) (setq dist (vlax-curve-getdistatpoint obj pt )) Look into help for the block using vla-get-insertionpoint (setq obj (vlax-ename->vla-object (car (entsel "Pick block ")))) (setq pt (vla-get-insertionpoint obj) BIM to excel 3d solids is very complex and not a 1st lisp project Edited March 28, 2020 by BIGAL Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 29, 2020 Author Share Posted March 29, 2020 Ok thanks i will test Quote Link to comment Share on other sites More sharing options...
Nowak Posted March 30, 2020 Author Share Posted March 30, 2020 On 3/28/2020 at 11:34 PM, BIGAL said: Keep asking questions you will get answers, in my prior post I posted an example you can copy and paste from here to Autocad command line do 1 line at a time and see what you get. Afralisp has some good tutorials. You get more help by having a go yourself. I can see English is not first language. copy and paste each line osmode 512 (setq obj (vlax-ename->vla-object (car (entsel "Pick pline ")))) (setq pt (getpoint "\nPick pline")) (setq dist (vlax-curve-getdistatpoint obj pt )) Look into help for the block using vla-get-insertionpoint (setq obj (vlax-ename->vla-object (car (entsel "Pick block ")))) (setq pt (vla-get-insertionpoint obj) BIM to excel 3d solids is very complex and not a 1st lisp project I don't understand what to do with it? 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.