Point entry using .X or .Y

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Point entry using .X or .Y

StanB
I have been trying to modify the source code to add a feature, and have had limited success, and I could use some help.  The feature that I am trying to add is:
Within any action that requests a point, I would like to have the option to enter a sub-command to pick an x coordinate and a y coordinate separately with the mouse.  This is a sub-command that I use in AutoCAD quite a bit, and it is very handy. (The AutoCAD commands are .X .Y or .Z).

For example:
command> line
response from line> specify first point
command> x (this is the sub-command)
response from x sub-command> specify point for x coordinate
<user clicks on an object snap>
response from x sub-command> specify point for y coordinate
<user clicks on another object snap>
the sub-command ends and returns the x and y coordinates to the line command as the first point.

I have been able to create this sub-command, and call the sub-command from within an action, but I haven't been successful in finding a way to write the code where it is inherited by all commands that ask for a point.
Does anyone have an example of a sub function like this that was written only once, but is inherited by many different actions?  Or, would any of you programming gurus out there be willing to tackle this?

Stan B.