Entity Properties - Line - Length and Angle

edited May 2023 in LISP
Can Length and Angle be acquired from a line entity, or is that not possible? I've been trying without success for awhile.

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • edited May 2023
    Yes is the quick answer, have a look at Lee-mac.com for his pline properties lisp it gives an extensive answer.

    The quick and dirty 1 liner copy to command line. To get you started.

    (vla-get-length (vlax-ename->vla-object (car (entsel "Pick pline "))))

    If you explain more what it is your trying to do some one may have a program already done. NOT just get length.
  • ALANH said:

    If you explain more what it is your trying to do some one may have a program already done. NOT just get length.

    I'm looking to get the Angle and the Bearing from a property lines to generate a table, to use as a key, full of line curve data.

  • I changed from the idea of the entity being a polyline to just a line.
  • Ok you want a Bearing and distance label. That is easy to do either a line or a pline. Again there is multiple answers to this question, the way to find is like this, Google label bearing and distance Autocad Lisp.

    I would also try Bricscad rather than Autocad. Adding Cad and lisp makes it work.

  • Thank you Alan

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.