乐筑天下

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

[编程交流] 用数字标记坐标

[复制链接]

20

主题

74

帖子

54

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2022-7-5 20:00:22 | 显示全部楼层 |阅读模式
我附上了一张样品图和excel表,以便进行实物观察,请帮助我。
需要帮助00001。图纸
需要帮助OOO1。xlsx公司
回复

使用道具 举报

VVA

1

主题

308

帖子

308

银币

初来乍到

Rank: 1

铜币
8
发表于 2022-7-5 20:16:17 | 显示全部楼层
尝试使用编号导出坐标。
回复

使用道具 举报

VVA

1

主题

308

帖子

308

银币

初来乍到

Rank: 1

铜币
8
发表于 2022-7-5 20:25:27 | 显示全部楼层
NE(mleader)命令
  1. (defun c:NE (/ koord  xy)
  2. (vl-load-com)
  3. (while (and
  4.      (setq koord (getpoint "\nPoint <exit>"))
  5.    )
  6.    (setq
  7.      xy   (strcat "E=" (rtos (nth 0 koord) 2 3)"\nN=" (rtos (nth 1 koord) 2 3))
  8.    )
  9.    (VL-cmdf "_mleader" koord pause  xy)
  10. )
  11. )
  12. (princ "\nType NE in command line")(princ)
回复

使用道具 举报

20

主题

74

帖子

54

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
100
发表于 2022-7-5 20:37:17 | 显示全部楼层
尊敬的先生,我需要逐个单击每个点,它将标记坐标(东距和北距)以及数字,同时将这些坐标粘贴到excel(SLNO,东距,北距)标题中。我不能那样做。
回复

使用道具 举报

10

主题

30

帖子

20

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-5 20:41:58 | 显示全部楼层
先生
 
原程序员的学分
  1. (defun c:coo()
  2. (princ "\nthis lsp to type the coordinate x,y & make table")  
  3. (command "osnap" "cen,mid,endpoint,nea" )  
  4. (setq p(getpoint "\n Enter First Point :")
  5.      pp(getpoint "\n Enter Second Point :")      
  6.      u(getint "\n Enter start point number:")
  7.      tab(getpoint "\n Enter Upper Left Corner of Table:")            
  8.      u1 (+ 1 u)
  9.      x(car p)
  10.      y(cadr p)
  11.     ; z(caddr p)
  12.      x1(car pp)
  13.      y1(cadr pp)
  14.     ; z1(caddr pp)
  15.      text(strcat "(" (rtos x 2 3) "," (rtos y 2 3)")")
  16.      text1(strcat "(" (rtos x1 2 3) "," (rtos y1 2 3) ")")
  17. ;P1, P2 Distance from the Circle
  18.      p1(mapcar '+ p (list 1 0.4))
  19.      p2(mapcar '+ pp (list 1 0.4))
  20.      p10(mapcar '+ p (list 1 -0.4))      
  21.      p11(mapcar '+ pp (list 1 -0.4))
  22.    
  23. ;  TABLE ROWLENGTH
  24.      tab1(mapcar '+ tab (list 13.5 0 ))
  25.      tab2(mapcar '+ tab (list 35 0 ))
  26.      tab3(mapcar '+ tab (list 59.2 0 ))
  27.      tab4(mapcar '+ tab (list 8 0 ))
  28. ;TABLE ROW HEIGHT
  29.      tab5(mapcar '+ tab (list 0 -4.25))
  30.      tab6(mapcar '+ tab1 (list 0 -4.25 ))
  31.      tab7(mapcar '+ tab2 (list 0 -4.25))
  32.      tab8(mapcar '+ tab3 (list 0 -4.25))
  33.      tab9(mapcar '+ tab4 (list 0 -4.25))
  34.      tab10(mapcar '+ tab5 (list 0 -4.25))
  35.      tab11(mapcar '+ tab6 (list 0 -4.25))
  36.      tab12(mapcar '+ tab7 (list 0 -4.25))
  37.      tab13(mapcar '+ tab8 (list 0 -4.25))
  38.      tab14(mapcar '+ tab9 (list 0 -4.25))
  39.      tab15(mapcar '+ tab10 (list 0 -4.25))
  40.      tab16(mapcar '+ tab11 (list 0 -4.25))
  41.      tab17(mapcar '+ tab12 (list 0 -4.25))
  42.      tab18(mapcar '+ tab13 (list 0 -4.25))
  43.      tab19(mapcar '+ tab14 (list 0 -4.25))
  44. ;POINTs POISITION IN THE TABLE (P1,P2 ETC)
  45.      POIN(mapcar '+ tab (list 1.9 -3.33))
  46.      POIN1(mapcar '+ tab1 (list 1.9 -3.33))
  47.      POIN2(mapcar '+ tab2 (list 1.9 -3.33))
  48.      POIN3(mapcar '+ tab3 (list 1.9 -3.33))
  49.      POIN4(mapcar '+ tab5 (list 1.9 -3.33))
  50. ;X,Y TEXT POSITION IN THE TABLE
  51.      POIN5(mapcar '+ tab6 (list 8.5 -2))
  52.      POIN6(mapcar '+ tab7 (list 8.5 -2))
  53.      POIN7(mapcar '+ tab8 (list 8.5 -2))
  54. ;GAP (ROW HEIGHT) BETWEEN P1 TO P2
  55.      POIN8(mapcar '+ poin4 (list 0 -4.25))
  56.      POIN9(mapcar '+ poin5 (list 0 -4.25))
  57.      POIN10(mapcar '+ poin6 (list 0 -4.25))
  58.      POIN11(mapcar '+ poin7 (list 0 -4.25))
  59. ;FIRST 2 POINTS (EX P1 + P2)
  60.      uu(strcat "P " (itoa u) )
  61.      uu1(strcat "P " (itoa u1) )
  62. )
  63. (command "osnap" "none" )  
  64. (command "style" "rockstyle" "arial"  "0.9" "1" "0" "n" "n" "n" "")
  65. (command "line" tab tab3 "")
  66. (command "line" tab5 tab8 "")
  67. (command "line" tab10 tab13 "")
  68. (command "line" tab15 tab18 "")
  69. (command "line" tab tab15 "")
  70. (command "line" tab1 tab16 "")
  71. (command "line" tab2 tab17 "")
  72. (command "line" tab3 tab18 "")
  73. ;Circle radious
  74. (command "circle" p "0.7" )
  75. ;circle color is 10
  76. (command "change" "l" "" "p" "c" "10" "")
  77. (command "circle" pp "0.7" )
  78. (command "change" "l" "" "p" "c" "10" "")
  79. ;POINT 1 EX: P1
  80. (command "text" p10 "0"  uu "")
  81. ;POINT 2 EX: P2
  82. (command "text" p11 "0"  uu1 "")
  83. (command "style" "rockstyle" "arial"  "2.5" "1" "0" "n" "n" "n" "")
  84. (command "text" poin "0"  "POINT" "")  
  85. (command "text" poin1 "0"  "X" "")
  86. (command "text" poin2 "0"  "Y" "")
  87. ;(command "text" poin3 "0"  "Z" "")
  88. (command "text" poin4 "0" uu "")
  89. (command "text" poin8 "0" uu1 "")
  90. (command "text" "j" "mc" poin5 "0" (rtos x 2 3) "")
  91. (command "text" "j" "mc" poin6 "0" (rtos y 2 3) "")
  92. (command "text" "j" "mc" poin9 "0" (rtos x1 2 3) "")
  93. (command "text" "j" "mc" poin10 "0" (rtos y1 2 3) "")
  94. (command "osnap" "cen,mid,endpoint,nea" )   
  95. (command "osnap" "cen,mid,endpoint,nea" )
  96. (setq  ppp(getpoint "\n Enter Next Point :")       )
  97. (while ( /= ppp nil )
  98.    (progn
  99.      (setq
  100. ;increase the point numbers
  101.        u1 (+ 1 u1)
  102.        x1(car ppp)
  103.        y1(cadr ppp)
  104. ;       z1(caddr pp)
  105.        text1(strcat "(" (rtos x1 2 3) "," (rtos y1 2 3) ")")
  106.        p2(mapcar '+ ppp (list 1 0.2))
  107. ;Distance from the circle x=0.4, y=0.2
  108.        p11(mapcar '+ ppp (list 1 -0.2))
  109. ;STARTING FROM P3  (4.3 is the ROW WIDTH)
  110.        uu1(strcat "P " (itoa u1) )
  111.        tab15(mapcar '+ tab15 (list 0 -4.25))
  112.        tab16(mapcar '+ tab16 (list 0 -4.25))
  113.        tab17(mapcar '+ tab17 (list 0 -4.25))
  114.        tab18(mapcar '+ tab18 (list 0 -4.25))
  115.        tab19(mapcar '+ tab19 (list 0 -4.25))
  116.        POIN8(mapcar '+ poin8 (list 0 -4.25))
  117.        POIN9(mapcar '+ poin9 (list 0 -4.25))
  118.        POIN10(mapcar '+ poin10 (list 0 -4.25))
  119.        POIN11(mapcar '+ poin11 (list 0 -4.25))
  120.      );setq
  121. ;Circle radious
  122. (command "osnap" "none" )  
  123.     (command "circle" ppp "0.7" )
  124. ;circle color is number 10
  125.     (command "change" "l" "" "p" "c" "10" "")
  126. (command "style" "rockstyle" "arial"  "0.9" "1" "0" "n" "n" "n" "")
  127.    
  128. ;THIS TEXT EX: P3 TO N
  129.     (command "text" p11 "0"  uu1 "")
  130. ;TEXT FROM P3 X & Y POINTS
  131. (command "style" "rockstyle" "arial"  "2.5" "1" "0" "n" "n" "n" "")
  132. (command "text" poin8 "0" uu1 "")
  133. (command "text" "j" "mc" poin9 "0" (rtos x1 2 3) "")
  134. (command "text" "j" "mc" poin10 "0" (rtos y1 2 3) "")
  135. (command "line" tab15 tab18 "")
  136.     (setq pp ppp
  137.           ;u1 (+ 1 u1)
  138.     );setq
  139. (command "osnap" "int,cen,mid,endpoint" )
  140.     (setq  ppp(getpoint "\n Enter Next Point :")  )
  141.     );progn
  142. )   ;while
  143. (command "osnap" "none" )
  144. (command "line" tab tab15 "")
  145. (command "line" tab1 tab16 "")
  146. (command "line" tab2 tab17 "")
  147. (command "line" tab3 tab18 "")
  148. (command "osnap" "cen,mid,endpoint,nea" )  
  149. );end
回复

使用道具 举报

VVA

1

主题

308

帖子

308

银币

初来乍到

Rank: 1

铜币
8
发表于 2022-7-5 20:51:51 | 显示全部楼层
>anindya尝试从#2使用lisp
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 21:06:34 | 显示全部楼层
如果你想让它自动完成,那么选择对象,只需获取点,然后很容易地编写一个csv文件。
 
有多少个物体,还是100个
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-12 01:11 , Processed in 0.477573 second(s), 66 queries .

© 2020-2025 乐筑天下

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