About Uni Ruby script

You can discuss anything concerning Clarity in this section.
Post Reply
DAMH
Posts: 3
Joined: Fri Jun 26, 2015 6:01 pm

About Uni Ruby script

Post by DAMH »

Hello
I'm using the 8.8 version using uni ruby script, I got stuck in a point where I want to update a value in Method UI using SetDouble, but the value doesn't seem to be updated
Ex:

Code: Select all

def Init
	Method().AddChoiceList("SyringeSizeList", "Syringe Size[uL]", $syringeSize[0],"ChangeInjectionVolume")
	for i in $syringeSize do
		Method().AddChoiceListItem("SyringeSizeList", i)
	end
	@injectionVolume=Method().GetString("SyringeSizeList").to_f*0.5
	Method().AddDouble("SampleVolume", "Sample Volume", @injectionVolume/1000, 1,EMeaningVolume,"")
end

def ChangeInjectionVolume(uiitemcollection, value)
	@injectionVolume=Method().GetString("SyringeSizeList").to_f*0.5
	Method().SetDouble("SampleVolume",@injectionVolume)
end
In this code, the "SampleVolume" is expected to change when selecting syringe size from list but the UI is not updated, is there a way to update values in Method() UI using a method like (Monitor().Synchronize())?
Diaa

Post Reply