API Pack and Go - Error

API Pack and Go - Error

Jef_E
Collaborator Collaborator
475 Views
1 Reply
Message 1 of 2

API Pack and Go - Error

Jef_E
Collaborator
Collaborator

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
0 Likes
476 Views
1 Reply
Reply (1)
Message 2 of 2

hariharanhZXJ8L
Contributor
Contributor

I too have the same problem with Inventor 2022. 

 

with the Exception : 

80040154 Class not registered

Can some one provide Solution for that ? I have tied to Build my Application in both 64 and 32 as well. but i have the same problem.

 

Thanks

HARI.

0 Likes