Pack and go
Description
This sample demonstrates using pack and go interop to create a package.Code Samples
Create a VB.Net project and add the reference to the pack and go type interop binary Autodesk.PackAndGo.Interop.dll which is in the Bin folder of Inventor installation folder.
Public Sub PackAndGoSample() Dim oPacknGoComp As New PackAndGoLib.PackAndGoComponent Dim oPacknGo As PackAndGoLib.PackAndGo oPacknGo = oPacknGoComp.CreatePackAndGo("C:\Temp\Source\Assembly1.iam", "C:\Temp\Destination") ' Set the design project. This defaults to the current active project. oPacknGo.ProjectFile = "C:\Temp\Source\Test.ipj" Dim sRefFiles = New String() {} Dim sMissFiles = New Object ' Set the options oPacknGo.IsSkippingLibraries = True oPacknGo.IsSkippingStyles = True oPacknGo.IsSkippingTemplates = True oPacknGo.IsCollectingWorkgroups = False oPacknGo.IsKeepingFolderHierarchy = True oPacknGo.IncludeLinkedFiles = True ' Get the referenced files oPacknGo.SearchForReferencedFiles(sRefFiles, sMissFiles) ' Add the referenced files for package oPacknGo.AddFilesToPackage (sRefFiles) ' Start the pack and go to create the package oPacknGo.CreatePackage() End Sub