Can I have an user input in an Marco ?

Can I have an user input in an Marco ?

Darkforce_the_ilogic_guy
Advisor Advisor
439 Views
4 Replies
Message 1 of 5

Can I have an user input in an Marco ?

Darkforce_the_ilogic_guy
Advisor
Advisor

Can I have an user input in an Marco ? 

 

I have an macro that plot an PDF.. my problem is that If i have to use the Plot in Windows.  it stop working.

 

it is possible to have the user select the windows and get the code/marco continue after that? 

 

and how

 

 

0 Likes
440 Views
4 Replies
Replies (4)
Message 2 of 5

Kent1Cooper
Consultant
Consultant

@Darkforce_the_ilogic_guy wrote:

Can I have an user input in an Marco ? 

 

I have an macro that plot an PDF.. my problem is that If i have to use the Plot in Windows.  it stop working.

 

it is possible to have the user select the windows and get the code/marco continue after that? 


[That "macro".]

 

Yes, you can have User input in a macro, for certain kinds of input, with a backslash \ character.  For instance, to draw a Line between two User-selected points and then end the command:

^C^C_.line \\;

The User picks points to answer the command's prompt at each backslash.

 

Whether you can use that for Plotting may depend on exactly which inputs you mean.

 

Does "it stop working" mean that it worked before, and now it does not?  If so, post your macro contents.

 

What meaning of "Windows" are you talking about?  Plotting window areas in the drawing?  Using the Windows Operating System's file navigation to specify the file name and/or folder location?  Do you mean you need to be in the Plot dialog box for part of the command, but not all of it?  If so, which parts?  Something else?

Kent Cooper, AIA
Message 3 of 5

Darkforce_the_ilogic_guy
Advisor
Advisor

"stop working" mean it does not run the rest of the marco after the user input IF i want to use the Window print window.   the User have to select the area to print.  but the rest of the code/marco does not run after that .. Does not know if it try to try it in before the command is ready or not at all

 

 

0 Likes
Message 4 of 5

Kent1Cooper
Consultant
Consultant

@Darkforce_the_ilogic_guy wrote:

"stop working" mean it does not run the rest of the marco after the user input IF i want to use the Window print window.   the User have to select the area to print.  but the rest of the code/marco does not run after that .....


Not knowing what your context is, I tried a macro that just starts a PLOT command, which uses the Plot dialog box, and after Plotting is complete [with any option(s), window or otherwise], continues, in this case just something simple -- to ask for two points to draw a Line.  This worked for me:

 

^C^C_.plot _.line \\;

 

How are you doing it?  Can you use this approach in whatever you're doing?

Kent Cooper, AIA
0 Likes
Message 5 of 5

Sea-Haven
Mentor
Mentor

When you say a macro are you meaning something in a menu as a command line ? Or Autocads built in Macro recorder.

 

If its a lisp then there is no problems asking for the two points. (getpoint "\nPick pt1") the same depending on your macro which you have not posted you can sometimes add lisp.

 

Before we all go round in circles post YOUR macro.

0 Likes