Pack and Go using ilogic - Referenced Files are not being added
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am currently having an issue with this ilogic code and could not find any solution on the forums.
The issue is that the parts and assemblies linked to the source document are not being included in the package.
I thought the oPacknGo.SearchForReferencedFiles(sRefFiles) would write the array of referenced files in the project to sRefFiles then oPacknGo.AddFilesToPackage(sRefFiles) would read it.
AddReference "Autodesk.PackAndGo.Interop.dll" '"C:\Program Files\Autodesk\Inventor 2022\Bin\Autodesk.PackAndGo.Interop.dll" Dim oPacknGoComp As New PackAndGoLib.PackAndGoComponent Dim oDoc As Document = ThisApplication.ActiveEditDocument 'ensure the first argument of CreatePackAndGo is correct assembly, 'and the path of the second argument exists ' otherwise, the method will crash Dim oPacknGo As PackAndGoLib.PackAndGo oPacknGo = oPacknGoComp.CreatePackAndGo(ThisApplication.ActiveEditDocument.FullFileName, "FolderDestination") Try oPacknGo.ProjectFile = "Location\ProjectFile.ipj" Catch End Try ' Set the options oPacknGo.SkipLibraries = False oPacknGo.SkipStyles = False oPacknGo.SkipTemplates = False oPacknGo.CollectWorkgroups = True oPacknGo.KeepFolderHierarchy = True oPacknGo.IncludeLinkedFiles = True ' Get the referenced files oPacknGo.SearchForReferencedFiles(sRefFiles) ' Add the referenced files for package oPacknGo.AddFilesToPackage(sRefFiles) ' Start the pack and go to create the package oPacknGo.CreatePackage(True)
Hope Someone can offer some insight.