Jump to content
OMRON Forums

NC 5. Function "SearchText" does not work


RomanSolonto

Recommended Posts

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"

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Guest
This topic is now closed to further replies.

×
×
  • Create New...