Her is the problem:
When we start the program, we get the error: "There is no MDL driver
application specified in the .plt file c:\......", but if we first open and
then close the MicroStation plot dialog, and the starts the program we dont
get the error message and the program runs normal. I know for sure that the
driver line in in the plt file. To let you look into the problem, I have
made a litle example that works the same way my application works.
I have also looked into the example Autoplot that is with MS95 and I think
it has the same problem.
I am now running WindowsNT 4.0 and MS 95 05.05.03.31
And here is a my litle example:
#include <mdl.h>
#include <msdefs.h>
#include <tcb.h>
#include <rscdefs.h>
#include <pltstrct.h>
#include <string.h>
#include <stdlib.h>
#include <msrsrc.fdf>
#include <msfile.fdf>
#include <msdialog.fdf>
#include <msoutput.fdf>
#include <msview.fdf>
#include <msparse.fdf>
#include <msplot.fdf>
#include <mstmatrx.fdf>
#include <msrmatrx.fdf>
#include <mscnv.fdf>
#define ERROR_BAD_PLTCFG 1
Private void doAutoPlot(void)
{
char configName[MAXFILELENGTH];
configName[0] = '\0';
if (mdlPlot_getInfo (plotStat, configName) != SUCCESS)
{
printf("Error reading plotcfg file\n");
tcb->relerr = ERROR_BAD_PLTCFG;
return;
}
printf("Filename %s\n",configName);
}
Public int main(void)
{
char configName[MAXFILELENGTH];
PlotStatic *holdPlotStat;
holdPlotStat = plotStat;
plotStat = (PlotStatic *) malloc (sizeof(PlotStatic));
doAutoPlot ();
free (plotStat);
plotStat = holdPlotStat;
return(0);
}
>We have a mdl based program that do plotting based on internal MicroStation
>plotting solution. When we moved from MS50 to MS95 we have not been able to
>get the program to work proparly.
>
>Her is the problem:
>When we start the program, we get the error: "There is no MDL driver
>application specified in the .plt file c:\......", but if we first open and
>then close the MicroStation plot dialog, and the starts the program we dont
>get the error message and the program runs normal. I know for sure that the
>driver line in in the plt file. To let you look into the problem, I have
>made a litle example that works the same way my application works.
>
Yeah, I tried write an app that allowed a user to select multiple files to
plot and I had the same problem. As far as I can tell, the plot driver file
"printer.plt" (which is the default for NT, DOS, and MacOS) tells
MicroStation to get the system printer settings from the OS (which it does
by calling a .dll function), which it then uses to initialize the
'plotStat' global structure. The mdlPlot_getInfo call doesn't seem to do
this properly. If you configure a different plot file (say, pscript.plt) it
works (but your output is a plot file - it doesn't go to the system
printer). Obviously, once you open the Print dialog you'll have valid data
in the plotstat struture (although technically you're supposed to save the
plotstat pointer, allocate your own global area, execute the plot and then
restore plotstat).
I haven't figured out a good workaround yet. If we had access to the
function prototypes for the plotting .dll (it's in
...\ustation\mdlsys\asneeded, but I forget what it's called), we could just
call it directly to initialize plotStat. The example in AUTOPLOT could use
updating, anyway.
Rob Schafer
MDL in da Big Easy
Dear Asbjorn,
Referring to your problem report regarding the MDL plot program.
This is unfortunately a known problem with MicroStation95 version
05.05.03.31,
the work around
for this problem is to load the MicroStation plotting dialog box first as
you
already noticed.
A permanent solution for this problem is to upgrade to MicroStation95
version
05.05.03.54,
this version contains the fix you have reported.
Best regards,
CSP Support
Djas Amatbrahim
Bentley Systems Europe.
They aslo had a work around, but it didnot work. So the only thing is to
upgrade.
Asbjørn
Rob & Tracy Schafer <rt-sc...@worldnet.att.net> wrote in article
<rt-schafer-ya024080...@netnews.worldnet.att.net>...