01-30-2018 02:20 AM
Hi,
When using the following line:
report.Settings.UseChannelReferenceByName = True 'Insure compatibility for autoscale
I rarely but sometimes receive the following error: "Access via the REPORT-OO-API is only permitted if no REPORT objects were opened using GraphObjOpen or similar commands.
How may I check if one is open? And how to close all of them ?
Thanks
L911
01-31-2018 10:24 AM
Hi L911,
The best option is to completely replace the old GraphObj... commands and variables in favor of the Report object approach. Obviously there's a lot of GraphObj... code out there, and in practice this takes time. What I recommend while you slowly replace GraphObj... code with Report object code is to keep them encapsulated/separated from one another. Any time you use a GraphObjOpen() command, make sure you issue all the GraphObjClose() commands before you use the Report object next. If you have multiple GraphObj... levels open (graph >> axis or curve), then close out of ALL levels before using the Report object. This may mean you have to restructure your existing GraphObj... code some and include extra GraphObjOpen() and GraphObjClose() commands, but I've found it manageable during the transition.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-23-2018 02:41 AM
Hi,
Thanks for the answer and sorry for the delay in mine.
I always close every graph, and strangely, the problem came from something completely different.
I made a couple of researches in the code and I did not even open a graph. The error displayed by Diadem was just incorrect.
I was working hard then and I do not remember the exact cause of the problem, sorry for not being able to report it.
THanks though.
L911