''  This file downloaded from www.EdHarriss.com
''  
''  www.EdHarriss.com File Information:
''  
''    Script Name: LM_transform_nudging.vbs v2.5
''    Author: Ludovick William Michaud
''    Update/Change this file at by sending e-mail to EdHarriss@EdHarriss.com
''


'//this is the script for use in the netview only.
transfo_toolbar

sub transfo_toolbar()

	WhatValues l_curItem ,l_value ,TuningParam ,ItemValue
	
	getkeyboardstate, oPos_Neg
	if CBool(CByte(2) And CByte(oPos_Neg)) then 
		Setvalue l_CurItem & "." & TuningParam(0), (ItemValue - l_value)
	else 
		Setvalue l_CurItem & "." & TuningParam(0), (ItemValue + l_value)
	end if 

end sub

sub transfo_positive_key()

	WhatValues l_curItem ,l_value ,TuningParam ,ItemValue
	Setvalue l_CurItem & "." & TuningParam(0), (ItemValue + l_value)

end sub

sub transfo_negative_key()

	WhatValues l_curItem ,l_value ,TuningParam ,ItemValue
	Setvalue l_CurItem & "." & TuningParam(0), (ItemValue - l_value)

end sub

Function WhatValues(l_curItem ,l_value ,TuningParam ,ItemValue)
on error resume next

	'//Getting what is the current selection to know what to move
	set l_curItem = GetValue("SelectionList")
	l_value = GetValue("TransformProperties.translatesnap")
	TuningParam = GetMarking()
	ItemValue = GetValue(l_CurItem & "." & TuningParam(0))
	
	if err.number <> 0 then
		msgbox "You either have a wrong parameter marked or no parameters have been marked."
	end if

end function
