乐筑天下

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

[编程交流] need help for atomatic co-orin

[复制链接]

8

主题

1133

帖子

1164

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 10:02:45 | 显示全部楼层
You would have to edit the lisp yourself, but this is a good opportunity for you to look at the lisp and discover how it works.
 
The lisp grabs coordinates, but to write them on the screen, they have to be changed from real numbers to a string of text that can be written to the screen.
 
The lisp function that does that is 'rtos' and it also has facilities to change the mode of the units and the precision.
 
So you look through the code until you find something in that vein.
  1.     "X=" (rtos(* dFlc(car fPt))[color="red"]2[/color] dDec)       "\\X"       "Y=" (rtos(* dFlc(cadr fPt))[color="red"]2[/color] dDec)       ); end strcat
 
Then you should find out what the modes are:-
1. Scientific 1.55E+01
2. Decimal 15.50
3. Engineering 1'-3.50"
4. Architectural 1'-3 1/2"
5. Fractional 15 1/2
and you can see that the lisp is set for Decimal mode 2. You probably want mode 3 or 4, so just edit those numbers, and save it.  
 
As always there are different ways of doing things, but this should give you a start.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 10:07:30 | 显示全部楼层
Eldon's information is correct, and I would suggest you look over the code.
 
But I don't agree with how ASMI has coded the while loop, forcing the user to hit Esc.
 
  1. (defun c:DimO ( / *error* ocm units prec fac p ) (vl-load-com) ;; © Lee Mac 2010 (defun *error* ( msg )   (and ocm (setvar 'CMDECHO ocm))   (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")       (princ (strcat "\n** Error: " msg " **")))   (princ) ) (mapcar 'set '(fac units prec) (mapcar 'getvar '(DIMLFAC DIMLUNIT DIMDEC))) (setq ocm (getvar 'CMDECHO)) (setvar 'CMDECHO 0) (while (setq p (getpoint "\nSpecify Point  : "))   (command "_.dimordinate" "_non" p "_T"     (strcat       "X="    (rtos (* fac (car  p)) units prec)       "\\XY=" (rtos (* fac (cadr p)) units prec)     )     pause   ) ) (setvar 'CMDECHO ocm) (princ))
回复

使用道具 举报

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 10:12:41 | 显示全部楼层
thanks gents
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 10:16:30 | 显示全部楼层
You're welcome Losquest.
回复

使用道具 举报

5

主题

42

帖子

39

银币

初来乍到

Rank: 1

铜币
25
发表于 2022-7-6 10:18:58 | 显示全部楼层
Every time I think I have it all you have something hidden in the corner.   This will save me half the time the way I was doing it.   Thanks LEE
 
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 10:23:15 | 显示全部楼层
You're welcome NH3man!
 
Long time no see...
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-7 03:01 , Processed in 0.528450 second(s), 62 queries .

© 2020-2025 乐筑天下

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