sachindkini 发表于 2013-5-6 14:10:05

GrText (grread)

Program DescriptionThis 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 ProgramsThe 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.

Demo Program 1This 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.

Demo Program 2This 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.Demo Program 3This 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.
Further ExamplesThese 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:
Another example demonstrating the use of the function in a dynamic array program:

GrDialog Demo ProgramThis 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.

zhuquanmao 发表于 2013-5-6 16:20:54

GOOD Program!

kvkb5760 发表于 2013-5-6 16:27:41

very good!:D

xiaoyuzj503 发表于 2013-5-27 15:25:51

學習學習{:soso_e130:}

GTJ116600 发表于 2013-6-24 22:24:53

grread和grvecs学习好贴

sicky111 发表于 2013-7-1 23:46:33

ALISP居然可以做到这样,实在是太牛了。

jyzas 发表于 2013-7-16 21:21:45

不错的效果,还是第一次见过

koendxingxing 发表于 2015-5-27 01:28:50

nice!{:soso_e179:}

0if0 发表于 2016-10-28 10:12:01

必须学习,一个很好的作品

kqqt6236 发表于 2016-10-31 14:47:31

非常好的程序,不知道是不是源码。

huangpc27 发表于 2020-7-26 08:28:00

这是LEE MAC的程序搬过来的。

downhh 发表于 2021-9-25 15:36:34

好好学习,这个函数感觉很难学啊

liu-he 发表于 2022-9-5 16:18:25

66666666666

happyending 发表于 4 天前

全是英文的?看不太明白哦。感谢分享。
页: [1]
查看完整版本: GrText (grread)