About VB Exposition of Attachments

You can create attachments between products or manufacturing assemblies or between product and a manufacturing assembly (MA) through a VB script in a product/process document.  You can also use a script to collect information about the parent and child of any attachment within a product or process document. This allows you to export this information so that you can perform an analysis outside V5.

You can write scripts to create attachments between products or manufacturing assemblies or between product and a manufacturing assembly (MA) in a product/process document.  You can utilize an attachment's properties and methods based upon current scripting programming techniques.  All accessible data and methods are listed in Interface Description Language (IDL) related to attachment creation and modification.

You can write scripts that access the V5 attachments.  You can utilize an attachment's properties and methods based upon current scripting programming techniques.  All accessible data and methods are listed in IDL for the attachment. 

 

DNBAttachmentFactory

Attach ( iParent, iChild, oAttachment)

Input: Parent and Child become either Product or MA

Output: Attachment object

 

The following is an example of how the user can use the new interface with a CATScript.

Dim ProcesstDocument1
Set ProcesstDocument1 = DELMIA.ActiveDocument

Dim PPRDocument
Set PPRDocument = ProcesstDocument1.PPRDocument

Dim PPRProducts
Set PPRProducts = PPRDocument.Products

Dim ParentPrd
Set ParentPrd = PPRProducts.Item(1)

Dim ChildPrd
Set ChildPrd = PPRProducts.Item(2)

Dim objAttachCont
Set objAttachCont = ProcesstDocument1.GetItem("AttachmentCont")

Dim objAttachmentFactory
Call objAttachCont.GetAttachmentFactory(objAttachmentFactory)

Dim AttachObject
Call objAttachmentFactory.Attach(ParentPrd, ChildPrd, AttachObject)