Jump to content

API Panel.Position.MoveAlong: Difference between revisions

From Flowcode Help
Admin (talk | contribs)
XML import of API auto-gen
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(19 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
{| class="mtx-class-macrotable wikitable"
Moves the object by the given offset relative to its parent along an axis
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''MoveAlong'''
|-
| colspan="2" | Moves the object by the given offset relative to its parent along an axis&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Handle
|-
| colspan="2" | The position or component to update&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Axis
|-
| colspan="2" | A position or component representing the X,Y,Z axis to move in&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | X
|-
| colspan="2" | Local coordinate X to increment by&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Y
|-
| colspan="2" | Local coordinate Y to increment by&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Z
|-
| colspan="2" | Local coordinate Z to increment by&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - NONE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




===Parameters===
==Detailed description==
''[[Variable types|HANDLE]] Handle''
This adjusts the ''Handle'' position by moving it along the specified ''Axis'' a number of units in the X, Y and Z directions.
:The position or component to update
:''The default value for this parameter is: '''''this'''


''[[Variable types|HANDLE]] Axis''
:A position or component representing the X,Y,Z axis to move in


''[[Variable types|FLOAT]] X''
If the ''Axis'' is zero then world space is assumed. Under typical usage 'this' would be a common axis, representing the object space of the component.
:Local coordinate X to increment by
:''The default value for this parameter is: '''''0'''


''[[Variable types|FLOAT]] Y''
:Local coordinate Y to increment by
:''The default value for this parameter is: '''''0'''


''[[Variable types|FLOAT]] Z''
==Examples==
:Local coordinate Z to increment by
===Calling in a calculation===
:''The default value for this parameter is: '''''0'''
* Add to a calculation icon: <pre class="brush:[cpp]">::Panel.Position.MoveAlong(handle, axis, x, y, z)</pre>


===Return value===
''This call does not return a value''


===Detailed description===
===Flowcode example file===
''No additional information''
Download {{Fcfile|SIMAPI_Panel_Position_MoveAlong.fcfx|SIMAPI_Panel_Position_MoveAlong}} and open it in Flowcode v6. In this example, there are three cubiods that represent Axis X,Y,Z. Note they are coloured exactly as the panel axis indicator which represents your viewing position. There is a sphere also on the panel. The sphere moves first along the X-Axis 100 units then back to it's original position, then does the same for the Y and Z axis. Note - to see the sphere moving along the Z axis you will need to turn on perspective or change the viewing plane with via the panel axis indicator.


===Examples===
The screenshots below show the effect and also highlight the code used by the example.
====Calling in a calculation====
 
* Add to a calculation icon: <pre class="brush:[C]">::Panel.Position.MoveAlong(handle, axis, x, y, z)</pre>
[[File:SIMAPI_Panel_Position_MoveAlong_Pic1.png]][[File:SIMAPI_Panel_Position_MoveAlong_Pic2.png]][[File:SIMAPI_Panel_Position_MoveAlong_Pic3.png]][[File:SIMAPI_Panel_Position_MoveAlong_Pic4.png]]
 
[[File:SIMAPI_Panel_Position_MoveAlong_Pic0.png]]

Latest revision as of 14:11, 13 July 2026

MoveAlong
Moves the object by the given offset relative to its parent along an axis 
- HANDLE Handle
The position or component to update 
- HANDLE Axis
A position or component representing the X,Y,Z axis to move in 
- FLOAT X
Local coordinate X to increment by 
- FLOAT Y
Local coordinate Y to increment by 
- FLOAT Z
Local coordinate Z to increment by 
- NONE Return


Detailed description

This adjusts the Handle position by moving it along the specified Axis a number of units in the X, Y and Z directions.


If the Axis is zero then world space is assumed. Under typical usage 'this' would be a common axis, representing the object space of the component.


Examples

Calling in a calculation

  • Add to a calculation icon:
    ::Panel.Position.MoveAlong(handle, axis, x, y, z)


Flowcode example file

Download SIMAPI_Panel_Position_MoveAlong and open it in Flowcode v6. In this example, there are three cubiods that represent Axis X,Y,Z. Note they are coloured exactly as the panel axis indicator which represents your viewing position. There is a sphere also on the panel. The sphere moves first along the X-Axis 100 units then back to it's original position, then does the same for the Y and Z axis. Note - to see the sphere moving along the Z axis you will need to turn on perspective or change the viewing plane with via the panel axis indicator.

The screenshots below show the effect and also highlight the code used by the example.