11 Replies Latest reply: Aug 26, 2010 6:10 PM by Alex Mumme RSS

    Command line OCX app

    Torben Seebach

      Hello, I would like to create a non GUI OCX application in Visual Studio or Visual C++, that can be accessed from commandline. BUT I can only access the the OCX object when a form based application type is selected, I cannot find a way to create a control for use in a non form based application. I think this sounds crazy, so plese tell me I'm wrong??

      Btw should there not be a forum for OCX???

        • Command line OCX app
          Dan English

          Hi Torben,

          Unfortunately there is indeed no way to do this at present. We have had several requests for this and I'm taking it up as an enhancement request.

          I have just added a user group for OEM partner's and there is a forum inside that user group we can use.

          Regards,

           

          Dan English

            • Command line OCX app
              Torben Seebach

              Hi Dan,

              Thanks for your reply, good to know whats possible. I was a bit afraid I would get that answer though.

              Do you have any idea weather this might come for version 9?

                • Command line OCX app
                  Dan English

                  Unfortunately I do not think it will be in 9.0. I will do my best to get it in to the next feature release after 9.0.


                  Regards,

                  Dan

                    • Command line OCX app
                      Torben Seebach

                      Okay, we are counting on you :)

                      Do you have any recommendations on what the best alternative is? I'm thinking either of doing a simple .vbs script that creates a QV object (which unfortunatly starts QlikView app) or doing a form based app that reads out some settings from a file does the job and quits. I would like to do it as elegant as possible, but both methods are bit messy.

                        • Command line OCX app
                          Dan English

                          You might try either calling an EDX job from publisher or calling the publisher Execution Service from the command line. Both will give you a reload that can be triggered progammatically and yet runs in batch mode (i.e. has no UI) and as a bonus you get publisher's scalability and logging. You can get more info on either of these techniques in the QlikView Publisher Reference manual.

                          Regards,

                          Dan

                  • Command line OCX app
                    Dan English

                    I just found this scrap of macro code that may be useful. It will allow you to fire off a reload without a reload dialog popping up.

                     


                    Is there a means to hide the reload dialog in Developer?

                    Use the following Macro API:

                    ActiveDocument.ReloadEx 2,1

                     

                    Provided by Henric Cronstrom!



                      • Command line OCX app
                        Torben Seebach

                        That does off course give a bit more flexibility and user friendliness. The tricky bit will then be to parse some parameters to that app. I guess I need to read up on visual studio to find the best method.

                        I've looked into calling QVB.exe from commandline, but I cannot find anything on which parameters it takes. And /h /H -h --help did not give anything usefull ;) Any ideas?

                          • Command line OCX app

                            qvb.exe is not callable from anything other than Publisher, hence why there is no docuementation for it.

                            As Dan mentions it is possible to call the execution service from the command line.

                            Chris

                              • Command line OCX app
                                Torben Seebach

                                Hi guys,

                                Thanks for the replies. What I have ended up doing is making a Visual Studio Forms application, and added a module, which I have set as the startup. Here I'm handling the read of commandline arguments, making sure its single instance, clean up of files and set up logging. The module at the end then calls a form, which spawns a new thread that handles the QlikView stuff. This works rather nicely.

                                The drawback are still, that a forms window pops up, I cannot write back to the terminal (all messages are shown in the form in a status field).

                                The good thing is that Try Catch is working like a charm, and I'm able to catch all errors.

                                  • Command line OCX app

                                    Hello,

                                    Your solution seems logic.

                                    Another solution which is quite good is to use a script to run the document in publisher. Then this script will retrieve the results based on the log of publiher. I worked on such a script in vbs. It is able to retrieve the results ( warning, errors, aborted, etc..).

                                    The only issue in this is to send parameters to the application. But I think we should be able to use parameters based on an input file, or maybe via the Publisher itself (to be checked).

                                    Hope this can help !

                                    Rgds,

                                    Sébastien

                            • Command line OCX app

                              Wouldn't it be possible to build the WinForm based application (sans Form container), compile and then just modify the PE subsystem flag to be Console? http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx