![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: hierarchy of objects-manipulation Topic Summary: Created On: 25-Sep-2006 16:21 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hello, I'm trying to write a script, wich it manipulates the hierarchy of objects: 1. If you drag and drop an item on another item above, a menu pops up ... 2. The menu functions "Move ... After" and "Move ... Below" 3. If you select Move Below you can set a diffferent hierarchy. Is there any function in the DXL library, which does this? |
|
![]() |
|
![]() |
|
It is the move function.
move(obj1, obj2) - moves obj1 after obj2 move(obj1, below(obj2)) - moves obj1 immediately below obj2 (the new hierarchy you are describing) move(obj1, last(below(obj2))) - moves obj1 as the last item in the hierarchy below obj2 Look in the DXL reference help pages. |
|
![]() |
|
![]() |
|
Yes, there is a move function in DXL.
See the online help section entitles Object Management. void move(Object o1, Object o2) void move(Object o1, below(Object o2)) void move(Object o1, last(below(Object o2))) Warning: Do not use the move(object) function to move objects between lockable sections if you are running pre-DOORS 8.0. There was a nasty bug that caused duplicate objects with the same absolute number to be created. The work around for this is to use cut and paste. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
How do you move an object to being the first in a module? Do you have to do it in two steps (i.e. move it to being the second level 1 object then move the first level 1 object to being immediatly after it)?
Thanks, Paul |
|
![]() |
|
![]() |
|
Yes that is correct.
Something like this (needs some error checking etc) ------------------------- Tony Goodman Smart DXL limited www.smartdxl.com Edited: 24-Jul-2008 at 12:35 by Tony Goodman |
|
![]() |
|
![]() |
|
Ok, I'll do it like that, thanks Tony. I guess there are extra checks that first exists and that the object you are trying to move is not already first.
As far as acess records on object go... do you need delete on the parent of the source location and create on the parent of the target location when doing a move? If the move is the from the last level 1 in a module to the first level 1 in the module, do you then need create and delete access for the module instead of the parent object? |
|
![]() |
|
![]() |
|
Yes, you need CRATE to put it somewhere, and DELETE to remove it from somewhere. This is on the module for level one objects.
Some error checking ideas - I just typed this code, didn't run it. ------------------------- Tony Goodman Smart DXL limited www.smartdxl.com |
|
![]() |
|
![]() |
|
Pretty much what I came up with. Thanks again.
|
|
![]() |
|
![]() |
|
I don't know about through DXL but when moving an object with children (whiny brats...), the children stay below the parent after the parent is moved regardless of where its moved to. Do the DXL functions operate the same way? I've messed with moving objects around but only with starting from everything at level 1 and then creating hierarchy. My import from excel does this.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Hi David,
All three variations of 'move' will move any children of the source object too. Paul |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
hierarchy of objects-manipulation
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.