Posted by Per Corell on July 03, 2003 at 03:42:56:
In Reply to: plotting in AutoCAD 2000 posted by Ramesh on July 03, 2003 at 00:09:54:
The drawing name can be found as text string with a simple Autolisp expression ;
Case you want to write any sys-vars , or any result of build in functions as text in the drawing, you must first change the system var. "Texteval" to 1.
After you typed setvar you type textevan and ansver 1. When you done so , you start the Text command and when asked what to write, you simply hand the Text function this AutoLisp expression ;
(getvar "dwgname") write it exactly like this with parentetes .
Another trick is if you want to write a distance in 3D , where the tradisional Dimensioning tools can be a bit tricky if you don't know that Dim work 2D , is to start the Text command , and when asked for text to write, you ansver (getdist) ; doing so when the texteval var is set to one , the text command will hold untill you ansvered by pointing to two points , and then the text will not be "(getdist)" but the distance evaluated by the AutoLisp function (getdist)
------------ Now you proberly find a way to get the text placed at the right point, othervise place it at point A , by setting point A with (setq a (getpoint))
most important is to remember the Texteval variable value and set it back to 0 if this was the case, easy done as you just check it manualy and use setvar again , -------- in profesional AutoLisp applications, you allway's save the value of the sys vars you change, and reset these when the application stop.
Types & Styles
Free 3D Models