![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: generate a new module using existing object headings Topic Summary: Created On: 9-Jan-2006 12:37 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Oh -- then the line that has "ob = create(newModule)" will ALWAYS create a level 1 object at the beginning of the module. Hence the wrong order. You will need something like. | |
![]() |
|
Creating a new Module ffice I have a open module with object headings as follows 1 Title 1.1 subheading1 1.2 subheading2 1.3 subheading3 I would like to run a piece of dxl code from this module that generates the level 1 and level 2 headings in a new module(I have to do it this way). This is the code that I have generated so far. It generates a new module but imports the headings as follows ie in reverse order and all as level one objects. I want to preserve the original order and level one and two headings grateful for any advice on this. 1 subheading3 2 subheading2 3 subheading1 4 Title //creating a new module using headings from a existing module Object obj, ob testmodname = "/Play area/newfile" Module curMod = current Module newModule if( exists module testmodname) { newModule = edit (testmodname,true) } else { newModule = create(testmodname,"Test Case","",1) newModule = edit (testmodname,true) } current = curMod for obj in curMod do { string holder = probeAttr_(obj,"Object Heading") ob = create(newModule) ob."Object Heading" = holder current = curMod |
|
![]() |
|
![]() |
|
I would use the copyobjects dxl found under Tools >> Functions.
1. Create the destination module. 2. Filter the source module for level1 and level 2 headings only. 3. Run the dxl -- selecting the Copy current display set. ------------------------- Cliff Bly |
|
![]() |
|
![]() |
|
Hi Cliff The problem is that I have further level of headings level3 and I need to program which parts I want that means I have to devise the dxl myself starting off with this problem |
|
![]() |
|
![]() |
|
Oh -- then the line that has "ob = create(newModule)" will ALWAYS create a level 1 object at the beginning of the module. Hence the wrong order. You will need something like.
------------------------- Cliff Bly Edited: 9-Jan-2006 at 17:55 by cliff Bly |
|
![]() |
|
![]() |
|
Thank you Cliff the code snippet was of great help martin
|
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.