Transmittal Object Library from Excel VBA?

Transmittal Object Library from Excel VBA?

Anonymous
Not applicable
1,619 Views
3 Replies
Message 1 of 4

Transmittal Object Library from Excel VBA?

Anonymous
Not applicable
Is it possible to use the Transmittal object library (TRANSMITTALLib) directly from Excel? I tried to add the reference to my Excel vba project, but when I try to run something like that: Dim tro As TransmittalOperation Set tro = New TransmittalOperation but I get and "Automation error" (it works fine in Autocad VBA, though). I tried to use late binding with GetObject or AcadApplication.GetInterfaceObject but I couldn't find the right ProgrID/class and application name to load. Is It "TRANSMITTALLib.TransmittalOperation"? I tried with that and I get a "ActiveX Component can't create object" error. Am I wasting my time or is there a chance to make the transmittal work under excel?
0 Likes
Accepted solutions (1)
1,620 Views
3 Replies
Replies (3)
Message 2 of 4

norman.yuan
Mentor
Mentor

If your Excel is 32-bit (very likely) and your AutoCAD's VBA is 64-bit (which is also very likely, since AutoCAD2014), which means the Transmittal COM component  is 64-bit, I am afraid you are wasting your time (to do it from Excel's 32-bit VBA).

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 4

Anonymous
Not applicable
Indeed my Excel 2013 is 32bit.

Since I'm able to control AutoCAD from excel using the Standard Library
(and even with late binding by using getobject/createobject
"AutoCAD.Application"), I was assuming it could be possible to also load
the Transmittal Object Library.
--
Andrea Ghensi
----
Per favore, non stampare questa mail se non è necessario.
0 Likes
Message 4 of 4

norman.yuan
Mentor
Mentor
Accepted solution

Since your solution runs as out-process (that is, the 2 applications - Excel and AutoCAD - run in their own process and communicate to each other across the boundary between their processes, via COM automation), so it does not matter they are both 32-bit, or 64-bit, or one 32 and other 64. 

 

However, for 64-bit AutoCAD VBA, its component TRANSIMITTALLib is 64-bit. You cannot declare/instantiate an instance of it in your Excel's 32-bit VBA and then make it communicate with AutoCAD (as if it works in AutoCAD's 64-bit VBA). That is why it works in AutoCAD's VBA (64-bit, as an independent component, lives inside AutoCAD process).

 

I am not a fan of automating AutoCAD from external app (from Excel, in your case). But if you have to make AutoCAD work with Excel (and automating the Transmittal process), you could try to do thing from AutoCAD side (automating Excel, if Excel has to be running, or, simply getting data from Excel's sheet file without actually running Excel).

Norman Yuan

Drive CAD With Code

EESignature

0 Likes