sjkim
Automotive
- Apr 1, 2015
- 13
This is snap Code, and I just copy and paste from snap manual(page 100) to my vb code.
And Start is good, but I click "Ok", error message is appeared,,,
Why it happened?
My verseion is 9.0.3.4-Mp10
Imports Snap, Snap.UI
Public Class MyProgram
Public Shared Sub Main()
' Your code goes here
Dim dialog As New BlockForm()
dialog.Title = "Selection Demo"
Dim selectionBlock As New Block.SelectObject()
selectionBlock.Cue = "Please select a line to be hidden"
selectionBlock.SetFilter(NX.ObjectTypes.Type.Line)
selectionBlock.MaximumScope = Block.SelectionScope.AnyInAssembly
dialog.AddBlocks(selectionBlock)
Dim response = dialog.Show()
If response <> UI.Response.Cancel Then
selectionBlock.SelectedObjects(0).IsHidden = True
End If
End Sub
End Class
And Start is good, but I click "Ok", error message is appeared,,,
Why it happened?
My verseion is 9.0.3.4-Mp10
Imports Snap, Snap.UI
Public Class MyProgram
Public Shared Sub Main()
' Your code goes here
Dim dialog As New BlockForm()
dialog.Title = "Selection Demo"
Dim selectionBlock As New Block.SelectObject()
selectionBlock.Cue = "Please select a line to be hidden"
selectionBlock.SetFilter(NX.ObjectTypes.Type.Line)
selectionBlock.MaximumScope = Block.SelectionScope.AnyInAssembly
dialog.AddBlocks(selectionBlock)
Dim response = dialog.Show()
If response <> UI.Response.Cancel Then
selectionBlock.SelectedObjects(0).IsHidden = True
End If
End Sub
End Class