Copyright © 2008-2013 MultiMedia Soft

GraphicItemVertPositionSet method

Previous pageReturn to chapter overviewNext page



Sets the new vertical position of the given graphic item. The current vertical position can be obtained through the GraphicItemVertPositionGet method.


For details about graphic items management on the waveform analyzer refer to the How to add graphic items to the Waveform analyzer section.





[Visual Basic]

Public Function GraphicItemVertPositionSet (

nUniqueId as Int16,

nPosInPerc as Int32

) as enumWanErrorCodes



public enumWanErrorCodes GraphicItemVertPositionSet (

Int16 nUniqueId,

Int32 nPosInPerc




public: enumWanErrorCodes GraphicItemVertPositionSet (

Int16 nUniqueId,

Int32 nPosInPerc









Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

GraphicItemHorizontalLineAdd for horizontal lines


The new vertical position of the line expressed in percentage of wave amplitude.

May assume values from -100 to 100: a negative value indicates that the line should be drawn over negative waveform peaks.

In case you should be willing the set the line position based upon a logarithmic scale, you could convert your value in dB to a value in percentage using the following formula:

ValueInPerc = 100 * pow (10, ValueInDB/20);


On the screenshot below you can see 3 lines, 2 on positive waveform peaks, respectively at 70% and 25% of the waveform amplitude, and one on negative waveform peaks at -80% of the waveform amplitude.



Return value






Negative value

An error occurred (see the LastError property for further error details)

enumWanErrorCodes.ERR_WAN_NOERROR (0)

The method call was successful.