PDA

View Full Version : Changing pivot position in Layout



Run
09-27-2007, 12:24 PM
Hi,

I can access pivot info in Layout,
but can't find a way to set it.

setpivot() is a modeler only command.

And the MovePivotTool() command just makes the
tool active and doesn't appear to accept any parameters.

So, is there a function to change/set the pivot in Layout?

Thanks,

Jeff

evenflcw
09-27-2007, 01:20 PM
Whenever there's a layout command you can't find in the docs but think should be there, try the lscript commander. Execute the command, right click the entry in the list, and select 'convert to lscript'.

PivotPosition( x, y, z);

or if that doesn't work

CommandInput( "PivotPosition "+x+" "+y+" "+z );

Run
09-27-2007, 08:01 PM
First of all, thanks, both your examples work.

I've been using LScript Commander quite a bit lately,
(and that's how I got the MovePivotTool() command)
but I hadn't looked too much at the command sequence
tab.

And here's a bit of strangeness. LS Commander gives

the CS as +PivotPosition <X> <Y> <Z>

which it converts to the following LS command,...

CommandInput("+PivotPosition <X> <Y> <Z>");

Which does NOT work.

Weird, huh?


Thanks again,

Jeff

evenflcw
09-28-2007, 03:05 PM
Don't know if that's so wierd, because I'm not sure what you mean or if you just made a typo.

"+PivotPosition <X> <Y> <Z>"

Would not create a properly formatted string CommandInput can execute. If your grabbing values from the variables X, Y, Z you have to build the string piece by piece because an X within quotes (the character X) is not the same as an X outside of quotes (the variable X). Perhaps I should have showed the longer example. It's not much different but might be helpful.

cmd = string("PivotPosition ",x," ",y," ",z);
CommandInput(cmd);

Sorry if I missunderstood you and you knew all this already.

EDIT:
Ahem, had another look in LS Commander. I understand now that you looked through the list under the Command Sequence tab and selected the commadn form there. That's ok, but the common practice is to acctually execute the command your looking for in LW and then see what LS Commander picks up. If you do this you will get the proper format. What you get from the list simply ain't right.