PDA

View Full Version : How to wait for user input? [ME10 macro]


Harry
06-22-2004, 01:40 AM
I like to call a funtion to place a sub part in the current drawing.
After the user has indicated teh position, I like to 'window fit'
Does anyone know how can I let the macro wait till the position is given?



DEFINE load_file_action
PARAMETER p
load subpart (path_name +"mi\" + p)
window fit
END_DEFINE




Greetings Harry

andrea
06-22-2004, 08:55 AM
In my macro is :
LOAD SUBPART (path_name+'file_name') p


OK ?

John Scheffel
06-22-2004, 03:30 PM
If you want the user to pick a point in the VP, then place the part, you can try something like.

DEFINE My_macro_1
LOCAL Pt
READ PNT 'Choose point to load subpart' Pt
LOAD SUBPART 'filename' Pt
WINDOW FIT
END_DEFINE

If you want the user to see the bounding box feedback that you get if you run LOAD SUBPART 'filename' and don't specify a point, I don't know how to do that. It seems that macros just go to the next line after a LOAD command without waiting for the command to complete.