Hi Japheth,
If i download the latest Comview from your site and use it to create a dispatch helper from the attached TLB, the resulted inc file size is about 5k.

However, if i use the version i downloaded July 3rd (from the link you provided in our earlier discussion), the file size is about 440k.

Don't know i f there's any bug, maybe i'm just missing something, but i thougt you might want to know this.
Posted on 2003-07-16 14:22:04 by Janne
thx Janne, I will check this.

Japheth
Posted on 2003-07-16 14:56:56 by japheth
Janne,

if I view your .TLB file I see 2 dispatchonly interfaces. Both are in generated dispatch helper file.

Most likely you have generated your large include file by setting option "generate dispatch helper for dual interfaces" in typelib options.

Japheth
Posted on 2003-07-16 15:07:21 by japheth
Yes, thats it, so definately no bug in Comview. Thanks for the fast reply, Japheth.
Posted on 2003-07-16 15:21:03 by Janne
Janne,

What are you doing with autocad's interfaces ;)

I spent a considerable amount of time developing software to interact with AutoCad... most reciently voice recognition for drafting commands ;)

:NaN:
Posted on 2003-07-16 17:53:25 by NaN
Hi NaN,
actually your posts about COM and Autocad gave me the idea to use acad in my project.

I am writing a prog whose goal is to do some automatic checks for cad-made building plans, especially HVAC plans since those are what i do for living.

The first thing i think i'll do with acad automation is to draw a bunch of 3dfaces, which represent the walls of a building. I get the coordinates from an .ifc file which can be exported by a modern architectural cad program like Autodesk ADT. I draw the 3dfaces mainly for checking that the exported geometry is OK and i can use it.

I have'nt done much anything yet with the acad automation, i can create the application, get the active document and get the model space but i think i'll have read about the variants a little before i can do the drawing.
Posted on 2003-07-17 06:10:33 by Janne
Ya they are a bit of a hassle to wrap your 'programming mind' around.

Once you get some working source, just template from there.. thats all i realy do with them...

How do you get AutoCad started?? Since there is no public ClassID key (that i have found) that points to the proper directory for the shared automation dll's, i had to code a work around. Only for AutoCad tho!

Noramally when you instanciate a ClassID to get an interface pointer with CoCreate, it will look up the registry and magically know where to go to start things up. But with AutoCad, it doesn't. I had to write code to move to the \programfiles\common\autocad shared directory, then call cocreate (since im in the proper directory), and then move back to the program's working directory (that i wrote)... was an ugle hassle / fix.

I was wondering if i was missing something here, and you knew of a better solution??

:NaN:`
Posted on 2003-07-17 16:56:47 by NaN
Another Question, have you done any work with ARX's?? Im guessing not, but on the rare chance you have i thought i would ask. I tried myself, but i found their programming organization to wierd and confusion to grasp, definitely not the same as OLE...

:NaN:
Posted on 2003-07-17 17:10:13 by NaN
This is working for me:

OLE_COLOR typedef dword ;had to add this to assemble
include autocad.inc ;from Comview
include autocadc.inc ;from Comview

.data
CLSID_AcadApplication sCLSID_AcadApplication ;from autocad.inc
IID_IAcadApplication sIID_IAcadApplication ;from autocad.inc
pIAcadApplication dword 0

.code
InitAcad proc
LOCAL pIAcadDocument:dword
LOCAL pModelSpace:dword

invoke CoInitialize, NULL

invoke CoCreateInstance, ADDR CLSID_AcadApplication, NULL, CLSCTX_ALL,\
addr IID_IAcadApplication, addr pIAcadApplication

invoke vf(pIAcadApplication,IAcadApplication,put_Visible),TRUE

invoke vf(pIAcadApplication,IAcadApplication,get_ActiveDocument),addr pIAcadDocument

invoke dm(pIAcadDocument,IAcadDocument,get_ModelSpace),addr pModelSpace

invoke CoUninitialize
ret

InitAcad endp


this works on my win98/acad2002, don't have to execute in acad directory.

Have'nt done any ARX programming, sorry.
Posted on 2003-07-17 23:37:20 by Janne
Thanks.. this is pretty well what i do.. I must have an installation problem... (I thought it was an odd behavior for OLE, at least now you have confirmed it is with my machine at least ;) )

Regards,
NaN
Posted on 2003-07-18 00:41:06 by NaN