Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NC 5. Function "SearchText" does not work
#1
Good day.

NC has some functions to work with the desired line number:
SearchLine
SearchText
SearchTextNext.

The next procedure is working:
PHMIDoc.SendCmd("Devices.PmacNC1.SearchLine(0,25)")
Desired line changes.

But
PHMIDoc.SendCmd("Devices.PmacNC1.SearchText(0,""N20"", 0)")
Does not working. Desired line not changes.



There is the form "frmSearch" in NC.
''frmProgramMenu" has the next procedure:

Public Sub Search()
Dim MyStr As String
MyStr = "Devices.PmacNC.Search"
PHMIDoc.SendCmd(MyStr)
...
' frmSearch.Show 1
...
End Sub

"frmSearch.Show 1" is commented out. It looks like it was used in earlier versions of the program. "Devices.PmacNC.Search" shows dialog box that i don't like.

Procedure "btnSearch_Click" of the "frmSearch" does not working too:

Private Sub btnSearch_Click()
Dim MyStr As String
Dim m_MatchCase As Long
If (chkMatchCase.Value = True) Then m_MatchCase = 1 Else m_MatchCase = 0
MyStr = "Devices.PmacNC1.SearchText(0,""" + txtSearch.Text + """," + Str(m_MatchCase) + ")"
PHMIDoc.SendCmd (MyStr)
btnSearch.SetFocus
txtSearch.SetFocus
End Sub


How can I search text and set the desired line without dialog box that used "Devices.PmacNC.Search"
Reply


Messages In This Thread
NC 5. Function "SearchText" does not work - RomanSolonto - 11-07-2018, 01:38 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)