the Error is :'Typelib export: Type library is not registered. (Exception from HRESULT: 0x80131165)' In below code at line no 36 pdfConvertor3d.Publish(oDoc, oOptions);
public void Export3DPdf()
{
Inventor.Application InvApp = mApp;
Inventor.ApplicationAddIn PDFAddin = null ;
foreach (ApplicationAddIn appAddin in mApp.ApplicationAddIns )
{
if (appAddin.ClassIdString == "{3EE52B28-D6E0-4EA4-8AA6-C2A266DEBB88}")
{
PDFAddin = appAddin;
break;
}
}
dynamic pdfConvertor3d = PDFAddin.Automation;
Document oDoc = mApp.ActiveDocument;
// Create a NameValueMap object
Inventor.NameValueMap oOptions = InvApp.TransientObjects.CreateNameValueMap();
oOptions.Value["FileOutputLocation"] = @"c:\temp\3DPDF.pdf";
oOptions.Value["ExportAllProperties"] = true;
oOptions.Value["GenerateAndAttachSTEPFile"] = true ;
oOptions.Value["ExportTemplate"] = @"C:\Users\Public\Documents\Autodesk\Inventor 2019\Templates\Sample Part Template.pdf";
oOptions.Value["VisualizationQuality"] = AccuracyEnum.kHigh;
//string[] sProps = new string[1];
//sProps[0] = "{F29F85E0-4FF9-1068-AB91-08002B27B3D9}:Title";
//oOptions.Value["ExportAllProperties"] = false;
//oOptions.Value["ExportProperties"] = sProps;
String[] sDesignViews = new string[] { "Master", "View1" };
oOptions.Value["ExportDesignViewRepresentations"] = sDesignViews;
pdfConvertor3d.Publish(oDoc, oOptions);
}