ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  No Layer interface in comchartdir.dll
Posted by Thomas on Jan-21-2016 21:05
Hi together,

very special question, sorry.

The story is to long to explain, why I have to use the COM-Objects of ChartDirector
in a C++ application. So I #import the comchartdir.dll in the C++ project.
In the documentation, the XYChart.getLayerByZ() function returns a Layer object.
But in the imported references there is no corresponding Layer class.
I try to check this in a VBA application, same result, I can?t find this object.
There are only subclasses like LineLayer available.

Did you have any idea?

Regards Thomas

  Re: No Layer interface in comchartdir.dll
Posted by Peter Kwan on Jan-22-2016 01:37
Hi Thomas,

If you would like to use ChartDirector in a C++ project, it is strongly suggested that you
use "ChartDirector for C++".

If you must use COM for some reason, it is suggested you use the late binding style (use
the IDispatch interface). With this method, you can use the ChartDirector COM object in
your code without having to #import anything.

ChartDirector is itself written in C++, and the implementation is in "chartdir60.dll". The
ASP/COM/VB edition of ChartDirector (as well as several other language editions) are
wrappers to the C++ implementation. Because of the way it is wrapped, the only exposed
classes are the derived class, not the base class.

For the XYChart.getLayerByZ method, what it returns is a Variant object. You can then use
IDispatch to call its methods.

Regards
Peter Kwan