Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
Not applicable
Author

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.

View solution in original post

9 Replies
Not applicable
Author

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
Author

Hi,

thanks for reply.

I mean QlikView... not Sense.

I cant find any kind of documentation about it.

Not applicable
Author

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
Author

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
Author

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

Not applicable
Author

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
Author

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
Author

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
Contributor
Contributor

Hi Fabio,

how did you implement your GetQlikViewCLSID?

Regards

Thomas