PdcProjectLineList.AddArticle: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 11: | Line 11: | ||
This code example creates a new project, adds a new article to the project and converts it to a calculation. | This code example creates a new project, adds a new article to the project and converts it to a calculation. | ||
<source lang=" | <source lang="VB.Net"> | ||
dim | dim project as pdcEXT.IProject | ||
dim | dim projectLine as pdcEXT.IProjectLine | ||
dim | 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).