Hi,
I'm writing an eTransmit batch program in vb.net, and am having trouble getting it to get anywhere near making a zip. I've looked through the Objectarx 2013 doc, but it's a little over my head. I found a bit of code from Through the Interface which I used as a starter and hacked it into VB:
Code:
Imports TRANSMITTALLib
Dim TransZip As TransmittalFile
Dim TransOp As New TransmittalOperation()
MsgBox(sDWGtoZip & vbNewLine & sZipFile)
If [TransOp].addDrawingFile(sDWGtoZip, TransZip) = TRANSMITTALLib.AddFileReturnVal.eFileAdded Then
End If
It crashes at addDrawingFile, which doesn't suprise me, TransZip hasn't been set up in anyway.
Code:
System.ArgumentException: Value does not fall within the expected range.
at TRANSMITTALLib.ITransmittalOperation.addDrawingFile(String fullpathname, TransmittalFile& ppIAddedFile)
I found sound Bricscad (!) code which seemed it might get me a bit further along
Code:
Dim trmOp As New TransmittalOperation
trmOp.createTransmittalPackage()
trmOp = ThisDrawing.getTransmittalOperationInterface
Dim trmInfo As TransmittalInfo
trmInfo = trmOp.getTransmittalInfoInterface
trmInfo.destinationRoot = sZipFile
Dim trmFile As TransmittalFile
Dim retVal As AddFileReturnVal
retVal = trmOp.addDrawingFile(sDWGtoZip, trmFile)
Dim trmGraph As TransmittalFilesGraph
trmGraph = trmOp.getTransmittalGraphInterface
trmOp.createTransmittalPackage() 'copy the files to the folder set by destPath
but its VBA, and in .NET we have no Thisdrawing and I can find no object that provides a getTransmittalOperationInterface method.
Has anyone had any success before with AcETransmit18.tlb?
Thanks,
Bernie