PdcProject.ProjectLineList: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == ProjectLineList as PdcProjectLineList == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability == Available ..."
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:


== Description ==
== Description ==
 
Through use of the projectlinelist, it's possible to add calculations to a project object.


== Notes ==
== Notes ==
Line 9: Line 9:


== Code example ==
== Code example ==
This code example creates a new project, adds a new calculation to the projectlinelist, sets the production quantity of the projectline and sets a calculation object.
<source lang="vb">
dim objProject
dim objProjectLine
dim objCalc
  set objProject                    = pdc.projects.new
  objProject.SetCustomerNo            "12345"
  objProject.Description            = "Description"
  set objProjectLine                = objProject.ProjectLineList.AddNewCalculation
  objProjectLine.ProductionQuantity = 100
  set objCalc                      = objProjectLine.Calculation
 
  objProject.Save
  objProject.Show
</source>
This code example deletes the first projectline of the active project.


<source lang="vb">
<source lang="vb">
dim objProject
dim objProjectLineList
  set objProject        = pdc.projects.active
  set objProjectLineList = objProject.ProjectLineList
  objProjectLineList.Delete(0)


  objProject.Save
  objProject.Refresh
</source>
</source>


== Availability ==
== Availability ==
Available since February 2011 (From version 4.2 onwards).
Available since February 2011 (From version 4.2 onwards).

Latest revision as of 11:08, 5 November 2013

Declaration

ProjectLineList as PdcProjectLineList

Description

Through use of the projectlinelist, it's possible to add calculations to a project object.

Notes

Code example

This code example creates a new project, adds a new calculation to the projectlinelist, sets the production quantity of the projectline and sets a calculation object.

dim objProject
dim objProjectLine
dim objCalc

  set objProject                    = pdc.projects.new
  objProject.SetCustomerNo            "12345"
  objProject.Description            = "Description"
  set objProjectLine                = objProject.ProjectLineList.AddNewCalculation
  objProjectLine.ProductionQuantity = 100
  set objCalc                       = objProjectLine.Calculation
  
  objProject.Save
  objProject.Show

This code example deletes the first projectline of the active project.

dim objProject
dim objProjectLineList

  set objProject         = pdc.projects.active
  set objProjectLineList = objProject.ProjectLineList 
  objProjectLineList.Delete(0) 

  objProject.Save
  objProject.Refresh

Availability

Available since February 2011 (From version 4.2 onwards).