etranstmit problem

trying to use etransmit, but hitting a snag.

"Retrieving the COM class factory for component with CLSID {35AED114-C522-447F-B2F8-103B8D640AF1} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE))."

`
public bool ETransmitaDWG(string sourceDWG, string OutPath)
{
try
{
TransmittalOperation trmOp = new TransmittalOperation();
TransmittalInfo trmInfo = trmOp.getTransmittalInfoInterface;

    trmInfo.destinationRoot = OutPath;
    trmInfo.organizedFolder = true;
    trmInfo.preserveSubdirs = false;
    trmInfo.dataLinkRelativePath = true;
    trmInfo.DGNUnderlayRelativePath = true;
    trmInfo.DWFUnderlayRelativePath = true;
    trmInfo.imageRelativePath = true;
    trmInfo.PDFUnderlayRelativePath = true;
    trmInfo.xrefRelativePath = true;
    trmInfo.includeXrefDwg = true;
    trmInfo.includeNestedOverlayXrefDwg = true;
    trmInfo.includeImageFile = true;
    trmInfo.includeDGNUnderlay = true;
    trmInfo.includeDWFUnderlay = true;
    trmInfo.includePDFUnderlay = true;
    trmInfo.includeDataLinkFile = true;
    trmInfo.includeFontFile = false;
    trmInfo.saveVersion = SaveDwgFormat.eNoConversion;

    TransmittalFile trmFile = new TransmittalFile();
    AddFileReturnVal retVal;

    if (File.Exists(sourceDWG))
    {
        try
        {
            retVal = trmOp.addDrawingFile(sourceDWG, trmFile);
            var transmitreturnval = AddFileReturnVal.eFileAdded;

            if (retVal == transmitreturnval)
                System.Windows.Forms.Application.DoEvents();
        }
        catch (_AcTrx.Exception ex)
        {
            MessageBox.Show(ex.Message + Constants.vbNewLine + ex.ToString);
        }
    }
    trmOp.createTransmittalPackage();
    return true;
}
catch (Exception ex)
{
    return false;
}

}

`

Comments

  • Hello,

    Try getting the interface via.

    BricscadApp.AcadApplication app = Application.AcadApplication as BricscadApp.AcadApplication;
    app.ActiveDocument.getTransmittalOperationInterface();