您好,感谢您抽出时间查看我的帖子。
感谢大家为像我这样的初学者提供了如此有用的知识体系,供他们学习。
我一直在搜索有关在AutoLISP中使用多行文字的课程
(不可否认,我发现了一些令人惊讶的例子)李-麦克对类似的问题发表了几条回复。很抱歉再次提起,但我有点不知所措。我希望有人会花时间将多行文字解决方案应用到附加的Lisp,我目前确实理解。它使用Text命令。。。我意识到使用命令是业余的,但我仍在学习
- ; Northing & Easting labeling
- ; Ryan Anderson December 2013
- ; The Label will use the current Text Style and current Units Settings
- ; This Lisp borrows ideas from the tutorials I have been working through.
- ; http://www.afralisp.net/ http://lee-mac.com/ http://www.cadtutor.net/ http://www.cad-notes.com/
- (defun c:gln (/ p x y TxtPos)
- (command "_.MSPACE")
- (while
- (setq p (getpoint "Select a Northing Gridline:"))
- (command "_.PSPACE")
- (setq TxtPos (getpoint "Pick Label Location: "))
- (setq y (rtos (cadr p)))
- (setq y (strcat "N " y))
- (command "_TEXT" TxtPos "0" y "") ; I would prefer to use MText with a backbround mask and an offset
- )
- (princ)
- )
- (princ)
- (defun c:gle (/ p x y TxtPos)
- (command "_.MSPACE")
- (while
- (setq p (getpoint "
- Select an Easting Gridline:"))
- (command "_.PSPACE")
- (setq TxtPos (getpoint "
- Pick Label Location: "))
- (setq x (rtos (car p)))
- (setq x (strcat "E " x))
- (command "_TEXT" TxtPos "90" x "") ; I would prefer to use MText with a backbround mask and an offset
- )
- (princ)
- )
- (princ "Use GLN for Northings, and GLE for Eastings") ;Could both Northings and Eastings be done from one command?
- (princ)
干杯
再次感谢您抽出时间。
安迪。 |