Document methods Functions

Functions used to manage documents.

This page discusses:

PLMDMTDocument.CheckIn()

Locks (check-in) the file at the given path in the document database.

Signature

PLMDMTDocument.CheckIn(path : String)

Arguments

NameInput/OutputRequired?TypeComment
pathInStringEnter the absolute path.

Example

let doc (PLMDMTDocument)

let query (PLMQuery)
let results (List)
let result (PLMQueryResult)

query = CreatePLMQuery("PLMDMTDocument")

query->AddCriterion("V_Name","Book3")
results = query->RunQuery()

for result  inside results
{
                let path (String)
                set  doc = result->LoadResult()
                path = doc->CheckOut()
                
                let sh (DTSheetType)
                sh  = CreateSheet(path, "")
                
                sh->SetCell(1, 1, "new cell value")
               doc->CheckIn(path)
                doc->CopyTo("e:\\tmp\LetsCheckResult.xlsx")
}

PLMDMTDocument.CheckOut()

Returns the path from where the document was extracted.

Signature

PLMDMTDocument.CheckOut() : String

ReturnType

String

Example

let doc (PLMDMTDocument)

let query (PLMQuery)
let results (List)
let result (PLMQueryResult)

query = CreatePLMQuery("PLMDMTDocument")

query->AddCriterion("V_Name","Book3")
results = query->RunQuery()

for result  inside results
{
                let path (String)
                set  doc = result->LoadResult()
                path = doc->CheckOut()
                
                let sh (DTSheetType)
                sh  = CreateSheet(path, "")
                
                sh->SetCell(1, 1, "new cell value")
               doc->CheckIn(path)
                doc->CopyTo("e:\\tmp\LetsCheckResult.xlsx")
}

PLMDMTDocument.CopyTo()

Copies a file to a path provided in input. This file does not keep any link with the original document.

Signature

PLMDMTDocument.CopyTo(path : String)

Arguments

NameInput/OutputRequired?TypeComment
pathInStringEnter the absolute path.

Example

let doc (PLMDMTDocument)

let query (PLMQuery)
let results (List)
let result (PLMQueryResult)

query = CreatePLMQuery("PLMDMTDocument")

query->AddCriterion("V_Name","Book3")
results = query->RunQuery()

for result  inside results
{
                let path (String)
                set  doc = result->LoadResult()
                path = doc->CheckOut()
                
                let sh (DTSheetType)
                sh  = CreateSheet(path, "")
                
                sh->SetCell(1, 1, "new cell value")
               doc->CheckIn(path)
                doc->CopyTo("e:\\tmp\LetsCheckResult.xlsx")
}

PLMEntity.AttachDocument()

Function used to attach documents (.txt, .doc, ...) to references. These documents describe the references.

Signature

PLMEntity.AttachDocument(iDocument : Feature)

Arguments

NameInput / OutputRequired?TypeComment
iDocumentInYesFeaturePLMDMTDocument

PLMEntity.ListDocuments()

Function used to list the documents attached to a reference stored in database.

Signature

PLMEntity.ListDocuments() : List

ReturnType

List