public void RefreshData(RWSystem rwSystem, int intGroupIndex, int intIndex) { this.intGroupIndex = intGroupIndex; this.intIndex = intIndex; RapidData rWeldProcedureArray = rwSystem.Controller.Rapid.GetRapidData(strTaskName, strDataModuleName, strDataName + this.intGroupIndex); //RapidDataType rWeldProcedureType = rwSystem.Controller.Rapid.GetRapidDataType(strTaskName, strDataTypeModuleName, strDataType); UserDefined rWeldProcedure = (UserDefined)rWeldProcedureArray.ReadItem(this.intIndex); int i = 0; this.strWeldProcedureID = rWeldProcedure.Components[i++].ToString(); this.strWeldProcedureID = this.strWeldProcedureID.Substring(1, this.strWeldProcedureID.Length - 2); this.numWeldSpeed = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numPreFlow = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numSche = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numTrackCurrent = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numPostFlow = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveShape = int.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveType = int.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveLength = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveWidth = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveHeigth = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numDwellLeft = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numDwellCenter = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numDwellRight = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveDir = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveTilt = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveOri = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveBias = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numTrackType = int.Parse(rWeldProcedure.Components[i++].ToString()); this.numGainY = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numGainZ = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numPenetration = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numTrackBias = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveWidth90 = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.strRemark = rWeldProcedure.Components[i++].ToString(); this.strRemark = this.strRemark.Substring(1, this.strRemark.Length - 2); //rWeldProcedureType.Dispose(); rWeldProcedure.Dispose(); rWeldProcedureArray.Dispose(); }
public void ApplyData(RWSystem rwSystem) { RapidData rWeldProcedureArray = rwSystem.Controller.Rapid.GetRapidData(strTaskName, strDataModuleName, strDataName + this.intGroupIndex); //RapidDataType rWeldProcedureType = rwSystem.Controller.Rapid.GetRapidDataType(strTaskName, strDataTypeModuleName, strDataType); UserDefined rWeldProcedure = (UserDefined)rWeldProcedureArray.ReadItem(this.intIndex); rWeldProcedure.FillFromString(this.ToString()); ErrorHandler.AddErrorMessage("MichaelLog", this.ToString()); rWeldProcedureArray.WriteItem(rWeldProcedure, this.intIndex); //rWeldProcedureType.Dispose(); rWeldProcedure.Dispose(); rWeldProcedureArray.Dispose(); }