Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: hierarchy of objects-manipulation
Topic Summary:
Created On: 25-Sep-2006 16:21
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 25-Sep-2006 16:21
User is offline View Users Profile Print this message


Christian Montero

Posts: 16
Joined: 20-Jul-2006

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?
Thanks to much for your answer!
Christian

Report this to a Moderator Report this to a Moderator
 25-Sep-2006 16:34
User is offline View Users Profile Print this message


Marlin Wegner

Posts: 20
Joined: 2-Jun-2006

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.


Report this to a Moderator Report this to a Moderator
 25-Sep-2006 16:37
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 24-Jul-2008 09:34
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jul-2008 12:29
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

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
Report this to a Moderator Report this to a Moderator
 24-Jul-2008 12:45
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

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?
Report this to a Moderator Report this to a Moderator
 24-Jul-2008 14:20
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

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
Report this to a Moderator Report this to a Moderator
 24-Jul-2008 14:28
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

Pretty much what I came up with. Thanks again.
Report this to a Moderator Report this to a Moderator
 24-Jul-2008 15:50
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jul-2008 16:03
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

Hi David,

All three variations of 'move' will move any children of the source object too.

Paul
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.