autstat Support

icon
Avatar
enrique.bengoechea
Posts: 3
Hello Everyone,

I would like to share some questions about statconnDCOM.

In first place, I would like to know if there´d be any documentation or examples on using the COM server from VB or similar. I’ve found some examples for statconn.NET but not much for statconnDCom.

Secondly, this VBA code worked with the previous version of statconnDCOM we were using (v 3.1-2B7), but we are migrating to Windows 10 (statconnDCOM v. 3.6-1B4) and the last line of the following code fails. We successfully connect to R and EvaluateNoReturn() does work, but Evaluate() is not returning anything to VB (irrespective of what is evaluated, the resulting value is not being transferred to VB). Any hints appreciated.


Public gRServ As StatConnectorCommonLib.IStatConnector
Public gRErrorDevice As StatConnectorCharacterDevice

Set gRServ = New StatConnector
Set gRErrorDevice = New StatConnectorCharacterDevice
gRServ.Init "R"
gRErrorDevice.BindToServerOutput gRServ
gRServ.EvaluateNoReturn "options(warn=1)"
gRServ.EvaluateNoReturn "setwd(" & ToRStr(Replace(HomeRPath, "\", "/")) & ")"

If (Not CBool(gRServ.Evaluate("exists('.Last', envir=.GlobalEnv, mode='function')"))) Then



Kind regards,
2019-05-13 11:20
Avatar
Thomas Baier
Moderator
Posts: 222
Hi Enrique,

this issue is a very simple one.

You forgot to pass your license name to the Init method.

Please use Init "<<LICENSENAME>>@R", where <<LICENSENAME>> is the name/license key you received together with your license file.

Best regards,
Thomas
2019-05-13 15:07
Avatar
enrique.bengoechea
Posts: 3
Hi Thomas,

Thank you for your prompt response. I´ll try it as you suggest.

Anyway, sorry to insist on but... is available any documentation or examples??

Thank you again.

Regards.
2019-05-14 07:36
Avatar
Thomas Baier
Moderator
Posts: 222
Hi Enrique,

documentation and examples are installed together with statconnDCOM (installation option).

The information on how to use your license is part of the message your company got, when the license file has been delivered.

Best regards,
Thomas
2019-05-14 09:30
icon