Alias: Wait for command to finish before executing the next

Hi everyone, I’m trying to make an Alias so that I can create a polyline and extrude it with one command.
I’m trying this:
'_Polyline pause _SelLast _ExtrudeCrv

The problem I have is that after the first screen click to create the first node in the polyline, sellast is executed. If I write it like this:

'_Polyline pause pause pause pause _SelLast _ExtrudeCrv

I can use it to make triangles… but that’s not really useful…
How do I tell the Alias to wait until Polyline ends before it tries to SelLast?


Hi @jajandio,

below is a test script you could try. To start it from a button command, save the script and use this command macro in the button:

! _-RunPythonScript "C:\YourPathToTheScript\" 

Note, you have to change the path above to where you saved it. (1.5 KB)


It works great clement, thank you!

@jajandio, i´ve found a small error which only happens when duplicate points where picked, the polyline is not created. This is fixed in the script below. (2.0 KB)


1 Like

Clements script is great! But to answer your first question. The macro command you were looking for was _MultiPause. Which waits until the command is finished, no matter how many extra segments you create.


Thanks! that works great too, if anyone is interested, this is the Alias I have (the python script works great too)
!_SelNone _Polyline _MultiPause _SelLast _ExtrudeCrv _Delete

I use it a lot when modeling from architectural plans that are not so tidy… I just group the whole drawing and trace the different elements.

Nice, I just updated a few macro’s of my own, adding some complexity such as:

!_Polyline _Multipause _sellast #Pipe (Possibility to add Pause Enter afterward as well if you only want to determine 1 radius)

This creates a pipe that can be changed afterward by moving the control points of the polyline.
If you add ‘#’ before the command it lets your turn on history. This might be useful for your macro as well.

Because pipes and ExtrudeCrvAlongCrv are shit to edit anyways, it makes sense to always turn on the history for commands like these by adding an alias with ‘#’ in front of it. Just an idea!

Mh, I always use Sweep 1 for this, what is the benefit of this one?

It was just an example. Where commands that ‘extrude’ or ‘sweep’ almost always benefit from having history turned on. Having history on hotkey is of course also an option :wink:

1 Like