@larsr2866 wrote:
.... I have tried this lisp to make this also work for lines (instead of polylines), by changing
(if (setq dpss (ssget "_:L" '((0 . "*LINE")))) but it doesn't work. It says 'ERROR bad argument type: fixnump: nil'.
....
Lines and Polylines store their information in very different ways, so you can't just change the object selection part. For example, parameter values [used to save vertices into variables] have an entirely different basis for a Line than for a Polyline. The error is probably coming from the fact that a Line doesn't even have a DXF-code 70 entry which the commands use to test whether a Polyline is of a type they can work with.
A similar routine could be made to work with Lines, but what should be the basis for determining "inside" and "outside" or other criterion for which side to put the Dimension on?
By using "*LINE" with the asterisk wildcard, you allow the selection of not only Lines but also Polylines and Splines and Mlines and Xlines. If you meant something to work on Lines only, the asterisk should go. If you want Polylines and/or Lines, there are other elements needed to prevent selection of those other object types, or maybe to allow selection of them but bypass them in processing.
[Also, do I assume correctly that you're talking about the latest version at Message 30?]
Kent Cooper, AIA