I'm working on a huge project porting 100+ MDL applications from V8i (*.mc) to Connect Edition (*.cpp).
When printing (to a single PDF), we design everything with a dedicated level on a single view where each page is delimited by means of a rectangle whose cell name indicates the page format and orientation (see example images below)
Previously, we executed a macro that magically printed everything.
This macro includes commands like:
CadInputQueue.SendKeyin "mdl load bentley.printorganizer.dll"
CadInputQueue.SendKeyin "printorganizer new"
CadInputQueue.SendKeyin "printorganizer printerdriver pdf.pltcfg"
CadInputQueue.SendKeyin "printorganizer add file ...."
CadInputQueue.SendKeyin "printorganizer printdestination ..."
CadInputQueue.SendKeyin "printorganizer submitas single"
CadInputQueue.SendKeyin "printorganizer print all"
This macro doesn't seem to work anymore. Entering the command manually from the Key-in dialog, I get "Unknown key-in or command"
I read about the PrintManager and PrintSet classes but they seem to be .NET specific.
Is there a way to do this directly in C++?
We use MicroStation Connect Edition version 10.16.01.56 and corresponding SDK 10.16.00.084
Robert Kock said:CadInputQueue.SendKeyin "mdl load bentley.printorganizer.dll"
I think the name of the assembly has changed. Try this...
CadInputQueue.SendKeyin "mdl load bentley.microstation.printorganizer.dll"
More about VBA and printing.
Regards, Jon Summers LA Solutions
Hi Jon,
It used to be "bentley.microstation.printorganizer.dll" but I changed it into "bentley.printorganizer.dll" since I read somewhere in this forum that it had changed.
Anyway, I tried to change it back to what you suggested but unfortunately, I get the same result.
Robert Kock said:I changed it into "bentley.printorganizer.dll"
You're right and I'm wrong...
Directory of C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\Assemblies 02/12/2021 14:18 1,898,896 Bentley.PrintOrganizer.dll
Maybe MS doesn't find the dll when I type "mdl load bentley.printorganizer.dll".
Should I tell MS to search within the Assemblies directory? If so, how?
In MicroStation CONNECT:
HTH,Bob
I tried to load the printorganizer (both with and without the dll suffix). Unfortunately, the successive keyin command ("printorganizer new") tells me "Unkonwn key-in or command"
I am using an internal pre-release MSCE U16.3 build (to release soon) and although I do not use printorganizer much; the Print Organizer Key-ins; like ones you provide in your script above; appear to be working for me.
mdl load Bentley.PrintOrganizer;PrintOrganizer New;printorganizer printerdriver pdf.pltcfg
If I send the (asynchronous) keyin above then manually keyin "printorganizer dialog" and try to close the dialog - it does have the pdf- pltcfg drive loaded and prompts me to Save the Untitled printset.
...
I guess I found the problem (though I haven't solved it yet):
We apply some filters on keyin commands and for some reason the first one (load dll) was rejected.
I'm working on it and I'll be back.
Thanks so far