Get current view name

From batch mode export i'm able to load a particular view before exporting to HTML.

To do this i've defined the following options  when calling doors in batch mode from command prompt:

-D "current = read(\"%~1\", true); load(view(\"%~3\"));

where \"%~3\" is a string parameter passed from command prompt that specify the name of the view to load.

The problem is that if the defined view name is not existing the export continue with default view and fortunately no dxl error are raised.

I'd like to add a check just before the export to read the actual view of a module.

i've tried the following

view v = current

and

Module m = current
string curret_view = m."View"

without any luck.

can anyone help?


SamueleMazzoleni - Tue Feb 28 08:08:49 EST 2017

Re: Get current view name
Mathias Mamsch - Tue Feb 28 08:52:28 EST 2017

Did you try if the result of the load(view...)) function might give you a hint here? Regards, Mathias

Re: Get current view name
SamueleMazzoleni - Tue Feb 28 11:23:30 EST 2017

Thanks it worked.

I'm using this code:

string load_view_result=""
load_view_result=load (view viewName) ""

if the view exists load_view_result is true, otherwise false.