乐筑天下

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

[编程交流] 标高标记

[复制链接]

5

主题

956

帖子

963

银币

初来乍到

Rank: 1

铜币
35
发表于 2022-7-5 23:04:24 | 显示全部楼层
谢谢你的分享。我认为这个想法是一样的,只是也许OP需要加入他的属性块?
通过手动方式,如果正值,则我认为DIMORDIM带有前缀,我的0.02
回复

使用道具 举报

10

主题

52

帖子

42

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
51
发表于 2022-7-5 23:13:20 | 显示全部楼层
你好
 
这是正确的,但是。无需点击点。只是打字
基于反转级别的键盘。
我的基准是594,反转标高是600.23,在桩号0+321,y轴上
需要放置圆或块。
回复

使用道具 举报

5

主题

956

帖子

963

银币

初来乍到

Rank: 1

铜币
35
发表于 2022-7-5 23:15:51 | 显示全部楼层
你应该提供块参考,否则我们只是在尝试。
所以这只是另一个简单的概念,只需放置文本(不像李·麦克那样解析字符串)
 
通过键盘输入反转水平标记
  1. [color="red"][EDIT] in red[/color]
  2. *IL:shx* *IL:user* ;global variables
  3. (defun c:[color="red"]ILM[/color] (/ *error* v var p0 u1 u2 tmp shx f ip sz [color="red"]str[/color]); [color="red"]Invert level[/color] elevation marker
  4. ;hanhphuc 25/10/2014
  5. (if (not(findfile (setq shx (strcat(getvar "tempprefix") "IL.shx"))))
  6. (progn  (setq f (open (setq tmp (strcat(getvar "tempprefix") "IL.shp")) "W"))
  7. (foreach x
  8. '("*1,42,IL"
  9. "4,250,4,4,3,107,3,37,3,28,002,9,(0,0),001,9,(64,111),(-127,0),(-1,0),(64,-111),(0,0),002,9,(0,0),001,4,28,4,37,4,107,3"
  10. "4,3,250,0")
  11. (write-line x f))
  12. (close f)
  13. (command "compile" tmp)
  14. )
  15. ); if
  16. (if (and (not *IL:shx* ) shx)
  17. (setq *IL:shx* (vl-cmdf "load" shx)))
  18. (mapcar 'set '( v str *error*  var)
  19. (list '( "osmode" "cmdecho" "dimzin")'("\nRef. station?" "Datum?" "Textsize?" )
  20. '((msg) (if(not (wcmatch (strcase msg) "*CANCEL*,*EXIT*"))
  21.              (princ (strcat "\nError: " msg)))(princ))                  
  22.                     (mapcar 'getvar v )))
  23. (foreach x v (setvar x 0))
  24. [color="gray"];;;  OP's quoted : " my datum is 594, invert level is 600.23, on station 0+321 "[/color] [color="gray"]so set as default value..
  25. [/color]
  26. (setq *IL:user* (if (vl-every 'not *IL:user*) '((0. [color="blue"]594.[/color] 1.) ([color="blue"]321. 600.23[/color])) (list (car *IL:user*) (cadr *IL:user*))))                 
  27. (if (and (setq p0 (getpoint "\nPick reference point.."))
  28. (setq u1 (hp# 'getreal '(0 0 6) str (car *IL:user*)))
  29. ) ;_ end of and
  30. (progn
  31. (prompt
  32. (vl-string-translate "?" ":"
  33. (apply 'strcat (mapcar ''((a b )(strcat a (rtos b 2 2))) str (car *IL:user*)))))
  34. (textpage)
  35. (while (if (and        (setq u2 (hp# 'getreal '(0 0) '("\nInput STA?" "Invert Level?") (cadr *IL:user*)))
  36.         (setq *IL:user* (list u1 u2))
  37.         (setq ip (mapcar '+ p0 (mapcar '- u2 u1)))
  38.         ) ;_ end of and
  39. (progn
  40.          (setq sz (caddar *IL:user*))
  41.    (vl-cmdf "shape" "IL" ip sz 0.0)
  42.         (entmakex (list        '(0 . "TEXT")
  43.                         (cons 1 (strcat "IL" (rtos (cadadr *IL:user*) 2 2)))
  44.                         (cons 40 sz )
  45.                         (cons 10 (polar ip (/ pi 4.) (* 1.4121 sz )))
  46.                         ) ;_ end of list
  47.                   ) ;_ end of entmakex
  48.         ) ;_ end of progn
  49. ) ;_ end of if
  50. ) ;_ end of while
  51. )
  52. ) ;_ end of if
  53. (mapcar 'setvar v var)
  54. (princ)
  55. )
  56. ;; courtesy of the author's of "Inside AutoLisp"               
  57. ;; for rel. 10 published by New Riders Publications                
  58. ;; Referenced to the concept of UREAL UKWORD,                       
  59. ;;;HP# ; user prompt for numbers  by hanhphuc 2014
  60. (defun hp# (_f _ini _msg _def  / usr l)
  61. (if (and(member _f '(getreal getint getdist))
  62.          (vl-every '(lambda (x) (= (type x) 'INT)) _ini )
  63.   )
  64.    (progn (setq usr (mapcar '(lambda (i a b) (initget i) ((eval _f) (strcat a " < "(rtos b 2 2) " > : ")))
  65.                      _ini
  66.                      _msg
  67.                      _def
  68.                      ) ;_ end of mapcar
  69.          ) ; setq
  70.    (while usr
  71.      (setq l (cons (if (null (car usr))
  72.                         (car _def)
  73.                         (car usr)
  74.                         ) ;_ end of if
  75.                       l
  76.                       ) ;_ end of cons
  77.            usr        (cdr usr)
  78.            _def        (cdr _def)
  79.            ) ;_ end of setq
  80.      l
  81.      ) ;_ end of while
  82.    (reverse l)
  83.    ) ;_ end of progn
  84.    ) ;_ end of if
  85. ) ;_ end of defun

步骤:
命令:[color=“red”]ILM[color]选取参考点。。[颜色=“红色”];[屏幕中基准点处的拾取点]参考站?<0.00>:[color=“red”];[输入]基准?<594.00>:[color=“red”];[输入]文本大小?<1.00>:[color=“red”];[输入]参考桩号:0.00 |基准:594.00 |文本大小:1.00[颜色=“红色”];:120.反转电平?<600.23>:690.50输入STA?<120.00>:[color=“red”];
回复

使用道具 举报

10

主题

52

帖子

42

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
51
发表于 2022-7-5 23:19:41 | 显示全部楼层
你好
 
谢谢大家
我会试试的
 
 
thanx,你好
Yathishkumar先生
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-11 06:29 , Processed in 0.631144 second(s), 58 queries .

© 2020-2025 乐筑天下

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