PdcProjectLineList.AddArticle: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == AddArticle(ArtNo as String) as PdcProjectLine == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability == Av..."
 
 
(One intermediate revision by one other user not shown)
Line 9: Line 9:


== Code example ==
== Code example ==
This code example creates a new project, adds a new article to the project and converts it to a calculation.


<source lang="vb">
<source lang="VB.Net">
 
dim project as pdcEXT.IProject
dim projectLine as pdcEXT.IProjectLine
dim materialNumber as string
 
  materialNumber = "ABC123"
  project = PDC.App.Projects.New
  project.SetCustomerNo("12345")
  projectLine = project.ProjectLineList.AddArticle(materialNumber)
  project.ArticlesToCalculations()                   
 
  project.Save
  project.Show
  System.Runtime.InteropServices.Marshal.FinalReleaseComObject(projectLine)
  System.Runtime.InteropServices.Marshal.FinalReleaseComObject(project)
</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 13:56, 2 August 2023

Declaration

AddArticle(ArtNo as String) as PdcProjectLine

Description

Notes

Code example

This code example creates a new project, adds a new article to the project and converts it to a calculation.

dim project as pdcEXT.IProject
dim projectLine as pdcEXT.IProjectLine
dim materialNumber as string
  
  materialNumber = "ABC123"
  project = PDC.App.Projects.New
  project.SetCustomerNo("12345")
  projectLine = project.ProjectLineList.AddArticle(materialNumber)
  project.ArticlesToCalculations()                    
  
  project.Save
  project.Show
  System.Runtime.InteropServices.Marshal.FinalReleaseComObject(projectLine)
  System.Runtime.InteropServices.Marshal.FinalReleaseComObject(project)

Availability

Available since February 2011 (From version 4.2 onwards).