PdcProjectLineList.AddArticle

From External Bemet Wiki
Revision as of 13:56, 2 August 2023 by TC (talk | contribs) (Code example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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