找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 3552|回复: 12

[他山之石] GrText (grread)

[复制链接]

已领礼包: 1999个

财富等级: 堆金积玉

发表于 2013-5-6 14:10:05 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
Program Description

This function will return a vector list encoding a supplied text string, expressed in pixels relative to the origin, suitable for use with the AutoLISP grvecs function. If utilised within a grread loop (as demonstrated by the demo programs below), this enables the display of vectorised text on-screen (and beside the cursor) in real-time.

The grvecs list returned by this function may also be manipulated to display text in a standard DCL dialog, as demonstrated by the GrDialog Demo program, available for download above.

The LM:GrText function is also independent of Visual LISP and will hence work in all versions of AutoCAD.

Demonstration Programs

The following examples demonstrate the various uses of GrText, from displaying simple text entered by the user, to coordinate and area read-outs, progressing to other more complex implementations. A selection of the demonstration programs shown here may be downloaded from the link at the top of this page.

Please ensure the GrText.lsp function is loaded before running the following demo programs.


请点击此处下载

查看状态:需购买或无权限

您的用户组是:游客

文件名称:GRTEXT.zip 
下载次数:326  文件大小:9.13 KB 
下载权限: 不限 以上  [免费赚D豆]


Demo Program 1

This simple example program prompts the user to type a message and will display the entered text in real-time beside the cursor as the text is entered.


GrText1.gif
Demo Program 2

This program will dynamically display the coordinates of the cursor position beside the cursor as it is moved across the screen. The coordinates are expressed in WCS using the active settings of the LUNITS & LUPREC system variables. This example program also demonstrates the speed of the LM:GrText in generating the vector list for a given string.

GrText2.gif

Demo Program 3

This program prompts the user for a base point and displays the area of the rectangular region enclosed by the base point and cursor in real-time as the cursor is moved across the screen.

GrText3.gif
Further Examples

These additional examples are not included in the set of downloadable demonstration programs but show additional applications for the LM:GrText function.

The following animation shows the function used in a program to display the area and perimeter of a selected region in real-time:

GrText4.gif
Another example demonstrating the use of the function in a dynamic array program:
GrText6.gif
GrDialog Demo Program

This example program is also available for download from the link at the top of the page and demonstrates how the LM:GrText function may be utilised to display text in a standard DCL dialog.

GrDialog.png



GrText2.gif

评分

参与人数 3D豆 +7 贡献 +2 收起 理由
ScmTools + 2 技术引导讨论奖!
XDSoft + 2 资料分享奖!
炫翔 + 5 很给力!经验;技术要点;资料分享奖!

查看全部评分

本帖被以下淘专辑推荐:

论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2013-5-6 16:20:54 | 显示全部楼层
GOOD Program!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2013-5-6 16:27:41 | 显示全部楼层
very good!:D
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2013-5-27 15:25:51 | 显示全部楼层
學習學習{:soso_e130:}
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2013-6-24 22:24:53 | 显示全部楼层
grread和grvecs学习好贴
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 6468个

财富等级: 富甲天下

发表于 2013-7-1 23:46:33 | 显示全部楼层
ALISP居然可以做到这样,实在是太牛了。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 221个

财富等级: 日进斗金

发表于 2013-7-16 21:21:45 | 显示全部楼层
不错的效果,还是第一次见过
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2015-5-27 01:28:50 | 显示全部楼层
nice!{:soso_e179:}
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 7个

财富等级: 恭喜发财

发表于 2016-10-28 10:12:01 | 显示全部楼层
必须学习,一个很好的作品
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 6056个

财富等级: 富甲天下

发表于 2016-10-31 14:47:31 | 显示全部楼层
非常好的程序,不知道是不是源码。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 675个

财富等级: 财运亨通

发表于 2020-7-26 08:28:00 | 显示全部楼层
这是LEE MAC的程序搬过来的。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 24个

财富等级: 恭喜发财

发表于 2021-9-25 15:36:34 | 显示全部楼层
好好学习,这个函数感觉很难学啊
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2022-9-5 16:18:25 | 显示全部楼层
66666666666
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-4-27 08:06 , Processed in 0.283677 second(s), 63 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表