It's all about the answers!

Ask a question

[closed] How do I get the Current baseline of the current module


Christopher Cote (1516) | asked Jul 28 '21, 10:25 a.m.
closed Jul 05 '23, 4:48 p.m. by David Honey (1.8k17)

 I am trying to access the objects of the current baseline of the currently selected module in DXL.  I have tried using the baseline function using baseline(nMajor, nMinor, "Current"), but this results in an error since Current isn't really the suffix for the baseline.  What is the easiest way to get the current baseline of a module?  I've been told that I can use the load function to get the baseline as a Module reference, but I need to get a Baseline object, if possible.  If there is anyone out there who can help me out with this, I would REALLY appreciate it.


Comments
Geoffrey Clemm commented Jul 28 '21, 12:00 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

This appears to be a question about DOORS, not DOORS Next (since DOORS Next does not support DXL), so I've updated the Tags. 


Christopher Cote commented Jul 28 '21, 12:04 p.m.

Sorry about that.  I didn't see DOORS as a selection when I entered the question.


Geoffrey Clemm commented Jul 28 '21, 12:53 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

No problem ... just made the change to redirect to the right folks, and added the comment to make sure that was what you had in mind.

The question has been closed for the following reason: "Other" by davidhoney Jul 05 '23, 4:48 p.m.

4 answers



permanent link
stuart green (661) | answered Aug 26 '21, 12:51 p.m.
load() does indeed return a Module, and that is what is required by the "for Object in Module do" loop to access objects.

"Baseline baselineInfo(Module m)" can be used to get the Baseline handle for a Module.

Cheers,
Stuart.

permanent link
Arjuna Pandu (112) | answered Jul 05 '23, 10:09 a.m.

 Hello Stuart,


I want to load current version of the module, where user will edit content of the module.

below code helps me load the recent baseline but not the current version
Baseline base = getMostRecentBaseline(current)
Module m = load(base,true)

i have also tried just load, 
Module m = load();

but this is throwing error like  incorrect arguments for function (load);

could you please let me know how can i load the current version of the module?

regards
Arjunapandu


Comments
David Honey commented Jul 05 '23, 4:47 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Arjuna, please ask questions in your own post. You submissions are appearing an answers to someone else's question.


permanent link
Arjuna Pandu (112) | answered Jul 05 '23, 10:14 a.m.
Hello Stuart,

I tried with different combination.


Module m = load(current,null,false);

is this the right way?

regards
Arjunapandu


permanent link
stuart green (661) | answered Jul 05 '23, 10:48 a.m.
Hi Arjuna,

To open the current version of a module use read(), share() or edit() depending on what mode you want to open the module. Definitions below.

Module read(string name[, bool disp[, bool loadStandardView]])
Module edit(string name[, bool disp[, bool silent[, bool loadStandardView]]])
Module share(string name[, bool disp[, bool silent[, bool loadStandardView]]])

So e.g. to open module "/myProject/myModule" in exclusive edit mode for manual editing, using the Standard view, use:

"Module m = edit ("/myProject/myModule", true)"

Regards,
Stuart.