Jump to content
Software FX Community

Re: Syntax help

Software FX

Recommended Posts

First of all you need to instantiate the datafile object. Calling

CreateInstance will do this.

Second, you need to convert your pointer to a VARIANT, this however is not

done automatically by the variant_t class. You must do this manually as



VARIANT DataProvider;



V_VT(&var) = VT_EMPTY;

V_VT(&DataProvider) = VT_DISPATCH;

V_DISPATCH(&DataProvider) = datafile;

HRESULT hr = m_pChartFX->GetExternalData(DataProvider,var);




"Edward Evans" <eevans@pacsim.com> wrote in message


> What's the correct C++ syntax for passing in a text file to the chart?

> What I've got now gives me compiler errors:


> ICfxDataFilePtr datafile;

> datafile->FileName = "foo.csv";

> m_pChartFX->GetExternalData( datafile );


> Casting "datafile" to "_variant_t" crashes the chart.


> TIA,


> -Ed Evans




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...