public void Modify(PropertyValueChangedEventArgs e) { string label = e.ChangedItem.Label; ModelObjectEnumerator modelObjectEnum = model.GetModelObjectSelector().GetSelectedObjects(); while (modelObjectEnum.MoveNext()) { if (modelObjectEnum.Current is Tekla.Structures.Model.Beam) { Tekla.Structures.Model.Beam beam = (Tekla.Structures.Model.Beam)modelObjectEnum.Current; if (label == "Name") { beam.Name = name; } if (label == "Profile") { beam.Profile.ProfileString = profile; } if (label == "Material") { beam.Material.MaterialString = material; } if (label == "Finish") { beam.Finish = finish; } if (label == "Class") { beam.Class = classValue; } if (label == "PartPrefix") { beam.PartNumber.Prefix = partPrefix; } if (label == "PartStartNo") { beam.PartNumber.StartNumber = int.Parse(partStartNo); } if (label == "AssemblyPrefix") { beam.AssemblyNumber.Prefix = assemblyPrefix; } if (label == "AssemblyStartNo") { beam.AssemblyNumber.StartNumber = int.Parse(assemblyStartNo); } if (label == "Phase") { beam.SetPhase(new Phase(int.Parse(phase))); } if (label == "OffsetStartPointX") { beam.StartPointOffset.Dx = double.Parse(offsetStartPointX); } if (label == "OffsetStartPointY") { beam.StartPointOffset.Dy = double.Parse(offsetStartPointY); } if (label == "OffsetStartPointZ") { beam.StartPointOffset.Dz = double.Parse(offsetStartPointZ); } if (label == "OffsetEndPointX") { beam.EndPointOffset.Dx = double.Parse(offsetEndPointX); } if (label == "OffsetEndPointY") { beam.EndPointOffset.Dy = double.Parse(offsetEndPointY); } if (label == "OffsetEndPointZ") { beam.EndPointOffset.Dz = double.Parse(offsetEndPointZ); } if (label == "ZStart") { beam.StartPoint.Z = double.Parse(zStart); } if (label == "ZEnd") { beam.EndPoint.Z = double.Parse(zEnd); } if (label == "PositionOnPlane") { if (positionOnPlane == PositionPlaneEnum.Left) { beam.Position.Plane = Position.PlaneEnum.LEFT; } if (positionOnPlane == PositionPlaneEnum.Middle) { beam.Position.Plane = Position.PlaneEnum.MIDDLE; } if (positionOnPlane == PositionPlaneEnum.Right) { beam.Position.Plane = Position.PlaneEnum.RIGHT; } } if (label == "PositionOnPlaneOffset") { beam.Position.PlaneOffset = double.Parse(positionOnPlaneOffset); } if (label == "PositionRotation") { if (positionRotation == PositionRotationEnum.Top) { beam.Position.Rotation = Position.RotationEnum.TOP; } if (positionRotation == PositionRotationEnum.Front) { beam.Position.Rotation = Position.RotationEnum.FRONT; } if (positionRotation == PositionRotationEnum.Back) { beam.Position.Rotation = Position.RotationEnum.BACK; } if (positionRotation == PositionRotationEnum.Below) { beam.Position.Rotation = Position.RotationEnum.BELOW; } } if (label == "PositionRotationOffset") { beam.Position.RotationOffset = double.Parse(positionRotationOffset); } if (label == "PositionAtDepth") { if (positionAtDepth == PositionDepthEnum.Behind) { beam.Position.Depth = Position.DepthEnum.BEHIND; } if (positionAtDepth == PositionDepthEnum.Front) { beam.Position.Depth = Position.DepthEnum.FRONT; } if (positionAtDepth == PositionDepthEnum.Middle) { beam.Position.Depth = Position.DepthEnum.MIDDLE; } } if (label == "PositionAtDepthOffset") { beam.Position.DepthOffset = double.Parse(positionAtDepthOffset); } if (label == "Userfield1") { beam.SetUserProperty("USER_FIELD_1", userfield1); } if (label == "Userfield2") { beam.SetUserProperty("USER_FIELD_2", userfield2); } if (label == "Userfield3") { beam.SetUserProperty("USER_FIELD_3", userfield3); } if (label == "Userfield4") { beam.SetUserProperty("USER_FIELD_4", userfield4); } if (label == "NotesComments") { beam.SetUserProperty("comment", notesComments); } if (label == "FittingNotes") { beam.SetUserProperty("FIT_NOTES", fittingNotes); } if (label == "FittingNotes2") { beam.SetUserProperty("FIT_NOTES2", fittingNotes2); } if (label == "Cambering") { beam.SetUserProperty("cambering", cambering); } if (label == "Paint") { beam.SetUserProperty("PAINT", paint); } if (label == "PreliminaryMark") { beam.SetUserProperty("PRELIM_MARK", preliminaryMark); } if (label == "PaintWFT") { beam.SetUserProperty("PAINT_WFT", paintWFT); } if (label == "PaintDFT") { beam.SetUserProperty("PAINT_DFT", paintDFT); } if (label == "ShearStart") { beam.SetUserProperty("shear1", double.Parse(shearStart) * 1000); } if (label == "ShearEnd") { beam.SetUserProperty("shear2", double.Parse(shearEnd) * 1000); } if (label == "AxialStart") { beam.SetUserProperty("axial1", double.Parse(axialStart) * 1000); } if (label == "AxialEnd") { beam.SetUserProperty("axial2", double.Parse(axialEnd) * 1000); } if (label == "MomentStart") { beam.SetUserProperty("moment1", double.Parse(momentStart) * 1000); } if (label == "MomentEnd") { beam.SetUserProperty("moment2", double.Parse(momentEnd) * 1000); } if (label == "ConnCodeStart") { beam.SetUserProperty("CONN_CODE_END1", connCodeStart); } if (label == "ConnCodeEnd") { beam.SetUserProperty("CONN_CODE_END2", connCodeEnd); } beam.Modify(); } } }