PdcOperationList.InsertLineNumber

From External Bemet Wiki
Revision as of 09:45, 23 May 2017 by TC (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Declaration

InsertLineNumber(opKind as pdcOperationKind,Name as String,LineNumber as long) as PdcOperation

Description

Returns an added operation object with the supplied number. In case the calculation has a production number the operation list will be renumbered after the line was inserted.

Notes

This method add one operation with a specific line number in the operation list. The parameter is the line number of the operation.

Code example

This code example inserts line 20 in an operation list.

dim objCalc
dim objBWPL

  set objCalc = pdc.ActiveCalculation
  set objBWPL = objCalc.OperationList.InsertLineNumber(0, "LASER1", 20)
  if IsValid(objBWPL) then
    msgbox "Operation " & objBWPL.Name & " is added at linenumber " & objBWPL.LineNumber & "."
  else
    msgbox "Operation " & strBWPL & " does not exist in the internal operation master data."
  end if
  objCalc.Refresh

Availability

Available since 2004 (version 2.7).