Jocker_Boy Posted June 8, 2017 Share Posted June 8, 2017 Hi, I want to select one pline, obtain the lenght then use this dimension to offset other pline. Cheers, Gonçalo Quote Link to comment Share on other sites More sharing options...
alanjt Posted June 8, 2017 Share Posted June 8, 2017 (vlax-curve-getDistAtParam ent (vlax-curve-getEndParam ent)) The above code will return the total length of a line/curve/pline. From there, you just plug in the value to the Offset command and go. Quote Link to comment Share on other sites More sharing options...
1958 Posted June 9, 2017 Share Posted June 9, 2017 Find the length of the object can be so: (vla-get-length (vlax-ename->vla-object ent)) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 9, 2017 Share Posted June 9, 2017 My normal one (vla-get-length (vlax-ename->vla-object (car (entsel "pick object" )))) Quote Link to comment Share on other sites More sharing options...
Jocker_Boy Posted June 9, 2017 Author Share Posted June 9, 2017 My normal one (vla-get-length (vlax-ename->vla-object (car (entsel "pick object" )))) Many thanks. It's perferct!!! Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 9, 2017 Share Posted June 9, 2017 .... It's perferct!!! Not yet so. Try to select any object that doesn't have any length property or just pin a point on the screen to find out the outcome of the codes. Furthermore its not necessarily / recommended at all to convert any object to vla-object unless you are in need of that conversion and have no solution with AutoLISP vanilla ( DXF ). Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 10, 2017 Share Posted June 10, 2017 Tharwat you are correct sometimes you need to pick an object then check what it is and is that property then available and I think it was to do with this exact request for length. It was just a simple example where it was expected the user would pick a suitable object. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 10, 2017 Share Posted June 10, 2017 Tharwat you are correct sometimes you need to pick an object then check what it is and is that property then available and I think it was to do with this exact request for length. It was just a simple example where it was expected the user would pick a suitable object. Agreed, but I just wanted to pay OP's attention to such important issues. 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.