CADDIT CAD CAM CNC Software - download AutoCAD compatible design software progeCAD Alibre T-FLEX and more
CADDIT Website Knowledge Base Search:
CL

progeCAD Help

CR
Welcome to progeCAD
Working with progeCAD
Command Reference
CAD System Variables
Programming progeCAD
Full Index (caution - 400kb)

Further Links:

Download progeCAD
Register progeCAD

Learning

T-FLEX PLM tutorial (PDF)
progeCAD IntelliCAD and AutoCAD training 
CATIA 2D 3D design tutorial
Alibre CAD/CAM basic tutorial

Resources

Educational CAD Software Solutions
Python scripting for DOS and Windows
Other free software downloads
CADDIT CAD CAM Forum Australia
__

(grread [flag] [bits [cursor]])


Read the data coming in from the input devices.


This function is another method to get user input. It reads successive input via input method. The flag option lets you obtain the user's coordinates. When flag is non-nil, it follows the movements of the mouse or pointer and records the coordinates dynamically, which can generate a great amount of data.

The optional bits argument specifies the following:

Bits Meaning
1 Returns the coordinates dynamically in the form of a list. The list consists of the value and the 3-D coordinate.
2 Returns keystrokes but does not move the cursor. Returns all key values, including cursor and function key codes.
4 Turn this on if you are going to choose a cursor type.
8 Turns off the error message "console break" when you cancel out of the loop.

Add the bits above to obtain a combination if desired.

The cursor argument is an integer that corresponds to a cursor type:

Cursor Meaning
0 Normal cursor-crosshairs.
1 No cursor.
2 Selection cursor-box.

The following chart describes how the information is returned. For example, if you entered the letter, l (keyboard input), the value 2 and the character code would be returned (2 108) in a list.

Type of Input Returned Value (Definition)
Keyboard 2 (Character code)
Selected Point 3 (3-dimensional point)
Mouse (other pointer) 5 (3-dimensional point)

Example

(defun c:b ()

(while (print (grread 1 5 2)))

)

Explanation

In the above example, when you move the mouse, a list displays similar to (5 (2.3659 9.2846 0.0)), where the 5 represents the type of input (mouse) and where the coordinates are the exact coordinates of the mouse location. This changes dynamically as you move the mouse. When you select a point, a possible return would be (3 (2.3659 9.2846 0.0)), where 3 designates the type of input (selected point). When you entered a letter, let's say p, your return would be (2 112), where 2 denotes keyboard input, and 112 stands for the character code.

(getint [prompt])

(getpoint [point] [prompt])

(getreal [prompt])

(getstring [flag] [prompt])

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language

CADDIT® is a registered trademark in Australia. All Rights Reserved. Comments concerning the content of this site should be addressed to our webmaster. progeCAD is a trademark of ProgeCAD srl. Autodesk® and AutoCAD® are both registered trademarks or trademarks of a third party, and used only for comparison purposes. All other trademarks, trade names or company names referenced herein are used for identification only and are the property of their respective owners. Legal and Terms of Use. Google. Find us on Google+.