Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Not applicable

QlikView Desktop COM Api

I'm developing a C# application that interacts with QlikView Desktop via com.

Now I would like to be able to open more than one instance of QlikView to perform some operations in parallel.

Have any of you ever done something like this?

Thanks in advance

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Re: QlikView Desktop COM Api

I solved it.

The COM object method: 'RevokeClassObjects()' make the COM component MTA so you can run all instances of QlikView as your machine can handle.

You should call this method before any other call to COM object and after the COM object initialization.

9 Replies
Highlighted
Not applicable

Re: QlikView Desktop COM Api

Hi,

Do you mean QlikView or Qlik Sense Desktop?

If you are using Qlik Sense see http://help.qlik.com/sense/en-us/developer/

under Qlik Sense .Net SDK you will find useful informatio / examples.

Best Regards

Lars-Göran Book

Not applicable

Re: QlikView Desktop COM Api

Hi,

thanks for reply.

I mean QlikView... not Sense.

I cant find any kind of documentation about it.

Not applicable

Re: QlikView Desktop COM Api

After you install the QlikView Documentation package, available from the download site, the COM API documentation will be in a qvw file here

C:\ProgramData\QlikTech\QlikView Documentation\Automation\APIguide.qvw

Not applicable

Re: QlikView Desktop COM Api

Hi Carlo,

thanks for your reply.

I developed my application by following the guidance of the APIguide.qvw document.

My problem is that I cant find any documentation about using QlikView Desktop (not Sense) COM object in MTA (multi threaded apartment).

The API's behavior suggest that it is an STA (single threaded apartment) COM by default.

I'm looking for a way to configure the COM component so that it can be used as MTA.

For example... i launch new instance of COM component:

                   var FirstQVApp = new QlikView.Application();

Now I want another instance of QlikView application then I write following code:

                   var SecondQVApp = new QlikView.Application();


But FirstQVApp and SecondQVApp are the same instance of COM component and refer to the same QlikView application instance (same Process ID)!!!

It is not enough for me to open two documents like this:


               QVApp .OpenDocEx(firstDoc...

               QVApp .OpenDocEx(secondDoc...


I have to open two instance of QlikView application.


Thanks for your patience

Not applicable

Re: QlikView Desktop COM Api

What are you trying to do? QlikView desktop is designed for single-use; 1 user/1 instance.

Not applicable

Re: QlikView Desktop COM Api

Hi Carlo,

I'd like to do something similar to what was done by RightQlik.

You can see in task manager that there are two different instance of QlikView.

Any suggestion?

Qlik Multi Instance.png

Not applicable

Re: QlikView Desktop COM Api

After a while I found the solution. The method 'RevokeClassObjects' in COM instanced object make QlikView COM MTA (so you can open more that one instance within your COM instance).

qlikViewClientCom = Activator.CreateInstance(Type.GetTypeFromCLSID(Guid.Parse(GetQlikViewCLSID())));

qlikViewClientCom.RevokeClassObjects();

Not applicable

Re: QlikView Desktop COM Api

I solved it.

The COM object method: 'RevokeClassObjects()' make the COM component MTA so you can run all instances of QlikView as your machine can handle.

You should call this method before any other call to COM object and after the COM object initialization.

tbschillen
New Contributor

Re: QlikView Desktop COM Api

Hi Fabio,

how did you implement your GetQlikViewCLSID?

Regards

Thomas

Community Browser