Satish Lele
satish.lele@gmail.com


Graphic Functions
osmode: values of osnap modes
0     none
1     endpoint
2     midpoint
4     center
8     node
16    quadrant
32    intersection
64    insertion
128   perpendicular
256   tangent
512   nearest
1024  quick

angle: You can get angle formed by a line joining two points, with respect to defined co-ordinate system. (angle p1 p2)

polar: You can define a point with respect to first point using angle and distance. (setq p2 (polar p1 angle distance))

distance: You can get distance between two points. (distance p1 p2)

Trigonometric Functions:
atan: (atan num1 [num2]): Returns the arctangent of a number in radians. If optional num2 is provided, it returns value of atan of num1 divided by num2.
sin: (sin ang): Returns the sine of an angle (angle expressed in radians).
cos: (cos ang): Returns the cosine of an angle (angle expressed in radians).

inters: (inters pt1 pt2 pt3 pt4 [nil]): Finds the intersection of two lines. If fifth value is nil, it tries to find the intersection till infinity.
Length of String, strlen: Returns number of characters in a string (strlen [string]...). If multiple string arguments are provided, it returns the sum of the lengths of all arguments.

graphscr: Displays the AutoCAD graphics screen. (graphscr)
The graphscr function always returns nil.
This function is equivalent to the GRAPHSCR command or to pressing the Flip Screen function key F2.

textscr: Switches from the graphics screen to the text screen (like the AutoCAD Flip Screen function key F2). (textscr)
The textscr function always returns nil.

grtext: Writes text to the status line or to screen menu areas. (grtext [box text [highlight]])

The box argument is an integer that specifies the location in which to write the text. The text argument is a string that specifies the text to be written to the screen menu or status line location. The text argument is truncated if it is too long to fit in the available area.
The highlight argument is an integer that selects or deselects a screen menu location. The values for these arguments vary depending on the screen location to which you are writing. This function displays the supplied text in the menu area; it does not change the underlying menu item. The grtext function can be called with no arguments to restore all text areas to their standard values. If successful, the > # end of Markergrtext function returns the string passed in the text argument, and returns nil if unsuccessful.

Screen Menu Area: Setting box to a positive or zero value specifies a screen menu location. Valid box values range from 0 to the highest-numbered screen menu box minus 1.

prompt: Displays a string on your screen's prompt area. (prompt msg)
On dual-screen AutoCAD configurations, prompt displays msg on both screens and is, therefore, preferable to princ.
(prompt "New value: ") displays New value: on the screen(s). The prompt function returns nil.

redraw: Redraws the current viewport or a specified object (entity) in the current viewport.
(redraw [ename [mode]])
The effect of the redraw function depends on the arguments supplied. If called with no arguments, it redraws the current viewport.
If called with the ename (entity name) argument, it redraws the specified entity. The mode argument is an integer value that controls the visibility and highlighting of the entity.
1 Show entity
2 Hide entity (blank it out)
3 Highlight entity
4 Unhighlight entity
backBack top