你好
在我的程序中,我使用在光标上插入文本,但存在一个问题。
程序完全执行一次,第二次仅在输入文本高度后完成。我不明白为什么。
以下是发生此错误的部分代码:
- (if
- (setq *ht*
- (cond
- ((getdist (strcat "\nSpecify the height of the text <" (if *ht* (rtos *ht* 2 3) "") ">:[0.5/1.0/1.5/2.0/2.5/3.0]")))
- (*ht*)
- )
- )
- (progn
- (setq e
- (entmakex
- (list
- '(0 . "MTEXT")
- '(100 . "AcDbEntity")
- '(100 . "AcDbMText")
- (cons 8 "Area")
- (cons 62 256)
- (cons 10 '(0 0 0))
- (cons 7 (getvar 'textstyle))
- (cons 40 *ht*)
- (cons 41 0)
- (cons 1
- (strcat
- "Land area is : " oar decl
- )
- )
- )
- )
- )
- (setq e (vlax-ename->vla-object e))
- (grread t)
- (while (not enter)
- (princ "\nSpecify the insertion point of the text...")
- (setq grp (grread T 5 0)
- reason (car grp)
- value (cadr grp)
- )
- (cond
- ((or (member reason '(11 12 25)) (= value 13) (= value 32)) (vla-delete e) (setq enter t))
- ((= reason 5) (vlax-put e 'InsertionPoint (trans value 1 0)))
- ((= reason 3) (setq enter t))
- )
- )
- )
- (princ
- (strcat
- "\n\tLand area is : " oar decl
-
- )
- )
- )
请告诉我为什么会出现这个问题。
非常感谢。 |