API Panel.LinkBar.GetBarPos

From Flowcode Help
Jump to navigationJump to search

<sidebar>API Contents</sidebar> Gets the position the bar is located at

Class hierarchy

Panel

LinkBar
GetBarPos

Parameters

HANDLE LinkBar

The handle to the bar to read


Return value

HANDLE

Returns the position the bar is located at


Detailed description

Orientation of the bar position

Gets the scale, orientation and center point of the link bar. The position is always specified in world coordinates.


The X and Y scales will equal the width specified by API Panel.LinkBar.SetBarGfx. The Z scale is half the distance between the start and end points of the link. All values are always positive.


The coordinates of the position are always located in the center of the link. Therefore the distance from the coordinates of the bar position to either the start or end is equal to the scale Z.


For the rotation of the position, the only axis that may be accurately relied on is the Z. Rotation around this axis is undefined so the X and Y axis of the position may vary, as these can not be reliably extracted from the start or end positions with 100% reliability.

In the diagram, the blue line representing Z will always point from the start towards the end position. If the start positions coordinates are equal to the end position, and the previous orientation will be used, which will be the world orientation if the link is created with a shared start and end position.


Examples

Calling in a calculation

  • Declare a variable 'result' of type HANDLE
  • Add to a calculation icon:
    result = ::Panel.LinkBar.GetBarPos(linkbar)

No additional examples