All,
Just tried porting an existing application to OpenBridge Designer and have encountered a problem that should have a simple solution...just cannot run into it though.
Running OpenBridge Designer 10.08.00.760 without loading the OBD GUI for the purpose of generating a set of PDF files using Print Organizer results in:
The command line being called is:"C:\Program Files\Bentley\OpenBridge Designer CONNECT Edition\OpenBridgeModeler\OpenBridgeModeler.exe" -WAc:\Temp\myvba.mvba
(see contents of myvba below)
Sub MyVba()
Application.OpenDesignFile "c:\temp\foo.dgnlib", False CadInputQueue.SendKeyin "mdl load bentley.printorganizer.dll" CadInputQueue.SendKeyin "PRINTORGANIZER NEW" CadInputQueue.SendKeyin "PRINTORGANIZER PRINTERDRIVER pdf.pltcfg" CadInputQueue.SendKeyin "PRINTORGANIZER ADD FILE c:\Temp\foo.dgn" CadInputQueue.SendKeyin "PRINTORGANIZER SUBMITAS SINGLE" CadInputQueue.SendKeyin "PRINTORGANIZER PRINTDESTINATION c:\Temp\foo.pdf" CadInputQueue.SendKeyin "PRINTORGANIZER PRINT ALL" CadInputQueue.SendKeyin "PRINTORGANIZER EXIT"End Sub
Works fine when called in OBD interactively. Works fine in MicroStation 10.xx.xx.xx.
What am I missing?
Thanks in advance.Steve
Hi Steve,
Print Organizer key-ins do not work unless MicroStation or OpenBridge are open to load the Print Organizer MDL.
Regards,
Jo Terri
Hi Jo Terri
But OpenBridge is being opened/loaded, on the command line as shown above. Also, on the OpenBridge command line is a VBA INITAPP (myvba.mvba) which first loads Print Organizer and then tries to create a PDF file. The intent is to create a PDF file using Print Organizer and OpenBridge without any of the OpenBridge GUI.
Thanks
Steve
Steve Salata said:But OpenBridge is being opened/loaded, on the command line as shown above.
It's probably not right. When you check what -WA argument means, it's about to load an application as MS_INITAPP. Frankly, I am surprised it works, because my original thought was that it can be used to specify MDL (native C/C++) applications only, not also mvba ;-) I think (but it's an idea only) the problem here is that so called initiapp is started immediately when it's possible (even before GUI is initialized) to allow to control MicroStation in batch mode (without GUI). But at this stage, not all functionality and tools are available (they are not initialized yet or it's not possible to use them without GUI at all).
Steve Salata said:The intent is to create a PDF file using Print Organizer and OpenBridge without any of the OpenBridge GUI.
A question is whether it's possible.
If (as Jo Terri wrote) Print Organizer depends on fully loaded and initialized MicroStation and OpenBridge, I am not sure whether it can be achieved without GUI is being initialized.
My second concern is when it's possible technically, whether it can be done using VBA only. My experience is with native initapps only, where it's available to specify e.g. if GUI should be initialized and to control and monitor MicroStation in detail.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Steve ... You have installed OpenBridge Designer, hence it must be started prior to opening OpenBridge Modeler as OBD takes care of the licensing for all of the bundled products.