Tool in another tool
-
Hi !
Sorry I can't say it clearly in English (in French either!)...Can anyone tell me how to create a script that not stops a tool already in use ?
Which functions should I use ?Exemple :
- Start line tool
- Place the first point
- Start zoom window tool and zoom somewhere in the drawing
- Place the end point of the line. Zoom window tool has not annulate line tool...
Thank you !
-
The only thing I can think of for your example is to create a custom tool that gets the start point, then gets a zoom window, then gets the second point.
-
@matt666 said:
Hi !
Can anyone tell me how to create a script that not stops a tool already in use ?
Which functions should I use ?Exemple :
- Start line tool
- Place the first point
- Start zoom window tool and zoom somewhere in the drawing
- Place the end point of the line. Zoom window tool has not annulate line tool...
Sketchup does this without need of any rubyscript... I have started LineTool, placed the first point (click-release), then went on "Camera" Toolbar, clicked on Zoom Window icon (also works with Ctrl+Shift+W from keyboard), zoomed on a certain spot on the viewport and placed the second point of the line. It worked!
-
Thank you RickW and NewOne
I wanted to say native SU zoom window tool did exactly what I want...
You can use it inside another tool started...In autolisp, the "def" function is called "defun"
(defun c;'name of the tool' ('arguments'/'local variables'))
But when you want to do a tool can be used inside another lisp started, you can delete "c:"
(defun 'name of the tool' ('arguments'/'local variables'))
Without "c:" you can use all function when another tool is active !
@unknownuser said:
It worked!
Yes ! And I want to do a tool which can be used inside another active tool !!I'm afraid... My english is veeery pooor...
Sorry....Another example : I want to have 3D coordinates of a point which is given by middle of two points clicked before. Ruby can easily do that.
But I also want to use this coordinate as second point of a line, or center of the circle, opposite angle of a rectangle, etc...
So inside an active tool ! -
@unknownuser said:
I want to have 3D coordinates of a point which is given by middle of two points clicked before. Ruby can easily do that.
But I also want to use this coordinate as second point of a line, or center of the circle, opposite angle of a rectangle, etc...
So inside an active tool !How is going on your project to run a tool inside an existing active tool?
I'm very curious to know if is somthing possible or not. If so, it could solve lots of annoyng problems (middle between two points, many types of tangents, and so on). Let me know something.
Thanx!
Advertisement