PdcOperationList.InsertLineNumber: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == InsertLineNumber(opKind as pdcOperationKind,Name as String,LineNumber as long) as PdcOperation == Description == Returns an added operation object with ..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:


== Description ==
== Description ==
Returns an added operation object with the supplied number  
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 ==
== Notes ==
Line 10: Line 10:


== Code example ==
== Code example ==
This code example delete line 20 in an operation list.
This code example inserts line 20 in an operation list.


<source lang="vb">
<source lang="vb">

Latest revision as of 09:45, 23 May 2017

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).