马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- (defun c:tt (/ lastent e area txt p)
- (defun callback (dynpt /)
- (xdrx_entity_move txt p dynpt)
- (setq p dynpt)
- )
- (setq lastent (entlast))
- (XD::BEGIN)
- (xdrx_sysvar_push '("cmdecho" 1))
- (vl-cmdf ".pline")
- (while (/= 0 (getvar "cmdactive"))
- (vl-cmdf pause)
- )
- (if (and (/= (setq e (entlast)) lastent)
- (xdrx_curve_isclosed e)
- )
- (progn
- (setq area (car (xdrx_getarea e)))
- (setq txt
- (xdrx_mtext_make
- (setq p (getvar "viewctr"))
- (strcat "%<\\AcObjProp.16.2 Object(%<\\_ObjId "
- (vl-princ-to-string
- (xdrx_getpropertyvalue e "ObjectID")
- )
- ">%).Area \\f \"%lu2%ps[,亩]%ct8[0.00149999999925]\">%"
- )
- 0.
- (getvar "textsize")
- )
- )
- (xdrx_mtext_reset txt)
- (xdrx_mtext_setwidth txt 0.)
- (xdrx_object_regen)
- (xdrx_pointmonitor "Callback" txt)
- (getpoint)
- (xdrx_pointmonitor)
- )
- )
- (xdrx_sysvar_pop)
- (XD::END)
- (princ)
- )
|