Imports EgtUILib Namespace EgtCAM5 Public Class RawPartOptionViewModel Inherits ViewModelBase Private m_MoveWithFixture As Boolean = False Public Property MoveWithFixture As Boolean Get Return m_MoveWithFixture End Get Set(value As Boolean) If value <> m_MoveWithFixture Then If value Then ' Abilito la selezione di RawPart con autoselezione delle sue ventose Application.Msn.NotifyColleagues(Application.SETSCENESELTYPE, SceneSelTypeOpt.RAWPARTWITHFIXTURE) ' Seleziono le ventose associate ad uno dei grezzi selezionati ' ciclo sui grezzi selezionati Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj() While nSelRawPartId <> GDB_ID.NULL ' seleziono i sottopezzi del grezzo DispositionUtility.SelectRawPartFixture(nSelRawPartId) nSelRawPartId = EgtGetNextSelectedObj() End While Else ' Abilito la selezione di RawPart Application.Msn.NotifyColleagues(Application.SETSCENESELTYPE, SceneSelTypeOpt.RAWPART) ' ciclo sui grezzi selezionati Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj() While nSelRawPartId <> GDB_ID.NULL ' deseleziono i sottopezzi del grezzo DispositionUtility.DeselectRawPartFixture(nSelRawPartId) nSelRawPartId = EgtGetNextSelectedObj() End While End If EgtDraw() m_MoveWithFixture = value OnPropertyChanged("MoveWithFixture") End If End Set End Property End Class End Namespace