Message 1 of 2
API Pack and Go - Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello there,
I'm really bummed. I tried to make a pack and go through the API but it fails and I don't know why.
I followed this sample
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim oPacknGoComp As New PackAndGoLib.PackAndGoComponent '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("C:\temp\source\MyNewPartName.iam", "C:\Temp\Destination") ' set the correct project file. otherwise, the method will crash oPacknGo.ProjectFile = "C:\temp\source\webcast.ipj" Dim sRefFiles = New String() {} Dim sMissFiles = New Object ' Set the options oPacknGo.SkipLibraries = True oPacknGo.SkipStyles = True oPacknGo.SkipTemplates = True oPacknGo.CollectWorkgroups = False oPacknGo.KeepFolderHierarchy = 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
But I get a error on the first line :s
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll Additional information: Retrieving the COM class factory for component with CLSID {F2D4F4E5-EEA1-46FF-A83B-A270C92DAE4B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Please kudo if this post was helpfull
Please accept as solution if your problem was solved
Inventor 2014 SP2