DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Command line rotate

Started by Bob P, January 28, 2012, 11:34:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bob P

I hate dialog boxes...

So here's a macro that will rotate an object through its handle around the X axis.  You can enter the rotating angle right on the command line, but if you don't enter a value, it will prompt for one.

(Change <Axis 0 to <Axis 1 for rotating around the y axis, to 2 for the Z axis)

'rx.d3m
'Rotate about x axis
ang$=sys$(0)
ang=val(ang$)
if ang=0 then input "Enter rotation angle around the X axis: ", ang
>rotate
{
<ThroughHandle 1
<Axis 0
<Pointxyz [sys(190),sys(191),sys(202)]
<Angle [ang]

}
end