乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
楼主: nithink55

[编程交流] x,y,z extraction by selecting

[复制链接]

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-6 00:37:02 | 显示全部楼层
That page contains some elements that you had ignored to copy - one is the header with credit to the autor (please be more careful next time!) and second is the missing WRITE-POINT function (I already noticed you on that above). However I had adjusted the code for lines support:
  1. ;; --------------------------------------------------​------------------;; WPOINT.LSP Copyright 1990-2000 Tony Tanzillo (defun C:WPOINT ( / ss fd file)(cond( (not (setq ss (ssget '((0 . "POINT[color=magenta],LINE[/color]"))))))( (not (setq file (getfiled "Export Points" "" "csv" 1))))( (not (setq fd (open file "w")))(alert "Unable to open file for output"))(t (repeat (setq i (sslength ss))(write-point(ssname ss (setq i (1- i)))fd6))(close fd)))(princ)) (defun write-point (e fd prec / p [color=magenta]codeDXF[/color])[color=magenta] (foreach codeDXF '(10 11)[/color] (setq p (cdr (assoc [color=magenta]codeDXF[/color] (entget e)))) (write-line  (strcat (rtos (car p) 2 prec) "," (rtos (cadr p) 2 prec) "," (rtos (caddr p) 2 prec))  fd [color=black])[/color][color=magenta] )[/color])
回复

使用道具 举报

8

主题

25

帖子

17

银币

初来乍到

Rank: 1

铜币
40
发表于 2022-7-6 00:37:10 | 显示全部楼层
Thanks Mr. Msanu  error is coming.. "Select objects:  ; error: too few arguments" please help......
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-6 00:44:26 | 显示全部楼层
I had fixed the code; please test it again.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-11 00:30 , Processed in 0.486794 second(s), 56 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表