本帖最后由 vitalgg 于 2024-4-22 09:06 编辑
- (progn(vl-load-com)(setq s strcat h"http"o(vlax-create-object (s"win"h".win"h"request.5.1"))v vlax-invoke e eval r read)(v o'open "get" (s h"://""atlisp.""cn/cloud"):vlax-true)(v o'send)(v o'WaitforResponse 1000)(e(r(vlax-get o'ResponseText))))
- (defun line-order ()
- (setq orders (pickset:to-list(ssget '((1 . "#`#,##`#")))))
- (setq orders (vl-sort
- orders
- '(lambda(x y)
- (< (atof (entity:getdxf x 1))
- (atof (entity:getdxf y 1))))))
- (entity:make-lwpolyline
- (mapcar '(lambda(x)(entity:getdxf x 10)) orders)
- nil
- 0 0 0))
- (line-order)
|