(if (setq poly (ssget "X" '((0 . "LWPOLYLINE")))) (command "DELDUPVERTEX" "ALL" "" "1E-12")))
Is there anything I can do to be able to run it by script?
DELDUPVERTEX ALL 1E-12
but if there are no LWPOLYLINE in the drawing, the program closes and ALL is then considered as a command.I want to run a LSP by a script but the command is not recognized even if LSP it's loaded.
The DELDUPVERTEX command is working if I not run it by script.
https://cadtips.cadalyst.com/polylines/delete-duplicate-vertices-a-polyline?q=polylines/delete-duplicate-vertices-a-polyline&print=1
(https://cadtips.cadalyst.com/polylines/delete-duplicate-vertices-a-polyline?q=polylines/delete-duplicate-vertices-a-polyline&print=1)Code: [Select](if (setq poly (ssget "X" '((0 . "LWPOLYLINE")))) (command "DELDUPVERTEX" "ALL" "" "1E-12")))
Is there anything I can do to be able to run it by script?