Negative Polylines

I have been using this code fragment in AutoCAD 2002:

(command "PLINE" P2 "W" "0" "0" P1 "W" "0" (* 0.0625 SC) "L" (- 0.0 (* 0.1875 SC)) "")

When I try to use it in Bricscad, I get an error message the the line segment has to be positive.  Why can't polyline lengths be negative?

Comments

  • This code snippet is what I use to draw lines with arrow heads. This is from the begionning of AutoCad when leader was buggy. I just kept using it through various upgrades. The problem is this item:  "L" (- 0.0 (* 0.1875 SC)) . BC throws out an error about the line segment must be positive. Is this coded into BC or is there a work-around so that I don't have to revise my lisp routines to calculate a 3rd point to keep the pline positive?

  • In 10.2.14 When I establish p1, p2 and sc then paste the code on the command line, it draws a pline tapering from 0 to some width then lets you continue drawing the thickened pline anywhere you want. No error message. Is that how it's supposed to work?

  • Solution: use "follow" ("F") instead of "length" ("L"). Follow will accept negative values.

  • "F" works. The code nows runs correctly. Thank you.

This discussion has been closed.