Morning Everyone,
I am exporting a DOORS Module as xml file, As per the requirement I must baseline the module before each and every export operations for future reference. When I use this code to create Baseline create(nextMajor "Export", "Export to Configurator") immediately the modules is closed.
I am getting this error: -R-E- DXL: <Line:71> operation requires a current module
Infact I want the module to be open to do the export operations. Is it possible to do baseline without closing the current module? Can some one help me with this?
Regards,
Raj, S
SystemAdmin - Thu Jul 30 06:38:44 EDT 2009 |
|
Re: Create Baseline without closing the module SystemAdmin - Thu Jul 30 09:07:22 EDT 2009
Any help much appreciated...
is it possible to create baseline without closing the module?
If yes please let me know.. Thanks!
Regards,
Raj, S
|
|
Re: Create Baseline without closing the module llandale - Thu Jul 30 09:37:43 EDT 2009
I have the following comment in one of my old functions that builds the designation of a specific baseline; perhaps its relevant.
// DXL Bug: the major/minor/suffix command MUST have a current
// module, even if its not the same one as the BL. Odd.
Looking more closely I see you are not specifying the module to baseline, and the 'create' command is defaulting to the current module. That's almost always a mistake, go ahead and specify the Module you want to baseline. I presume you are doing something like this:
[] Open module to baseline
[] Open some other module.
[] Close that other module
[] Attempting to 'create' a baseline
Well, when you open that other module it becomes 'current', and when you close it you have no 'current' module.
I dislike nested functions a lot and will routinely stage the 'Baseline' handle and check if its null before using it.
Is your line 71 in your export? If so, just go ahead and re-open the module.
|
|
Re: Create Baseline without closing the module SystemAdmin - Thu Jul 30 13:42:01 EDT 2009 llandale - Thu Jul 30 09:37:43 EDT 2009
I have the following comment in one of my old functions that builds the designation of a specific baseline; perhaps its relevant.
// DXL Bug: the major/minor/suffix command MUST have a current
// module, even if its not the same one as the BL. Odd.
Looking more closely I see you are not specifying the module to baseline, and the 'create' command is defaulting to the current module. That's almost always a mistake, go ahead and specify the Module you want to baseline. I presume you are doing something like this:
[] Open module to baseline
[] Open some other module.
[] Close that other module
[] Attempting to 'create' a baseline
Well, when you open that other module it becomes 'current', and when you close it you have no 'current' module.
I dislike nested functions a lot and will routinely stage the 'Baseline' handle and check if its null before using it.
Is your line 71 in your export? If so, just go ahead and re-open the module.
Thanks a lot for your reply.....
Yes, I am running this code from the Module window.... The module which i want to baseline is the "Current module".
I am trying something like this.....
User goes to the "System Spec" module menu and click the "Export button".... Then my code should
1. Create view with necessary attributes
2. Validate attributes
3. Create baseline(major) // I m struggling here, It close the module after creating a baseline. Message "A dxl program has been modified, closing the window will loose the change"
then error Line 71: comes.......
4. Export the current view as XML (Include the baseline details(version, created by, date))
5. Save it in NAS
6. save & close
|
|
Re: Create Baseline without closing the module llandale - Thu Jul 30 14:36:22 EDT 2009 SystemAdmin - Thu Jul 30 13:42:01 EDT 2009
Thanks a lot for your reply.....
Yes, I am running this code from the Module window.... The module which i want to baseline is the "Current module".
I am trying something like this.....
User goes to the "System Spec" module menu and click the "Export button".... Then my code should
1. Create view with necessary attributes
2. Validate attributes
3. Create baseline(major) // I m struggling here, It close the module after creating a baseline. Message "A dxl program has been modified, closing the window will loose the change"
then error Line 71: comes.......
4. Export the current view as XML (Include the baseline details(version, created by, date))
5. Save it in NAS
6. save & close
The 'current module' notion is flakey. In your case you are closing the 'current module' (via baseling), then it should be no surprise that your script that uses the 'current module' will fail.
Get the full-name of the module, baseline it, and re-open it.
You should routinely get a handle on the 'current module' at the top of you Module scripts, and use that. I've got: Module g_mCurr = current() at the top of ALL my scripts, if for no other reason than to halt when there run from a module when it should run from a folder.
When you come across commands that presume the current module, you should issue: current = g_mCurr to make sure you got it right.
|
|