Author Topic: bricscad etransmit  (Read 154 times)

0 Members and 1 Guest are viewing this topic.

sybold

  • Newt
  • Posts: 62
bricscad etransmit
« on: August 26, 2020, 03:33:24 AM »
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))."

Code: [Select]
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;
    }
}

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 7041
  • AKA Daniel
Re: bricscad etransmit
« Reply #1 on: September 02, 2020, 04:37:11 AM »


Hello,

Try getting the interface via.

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