![]() |
How to traverse the object |
Post Reply
|
| Author | |
hVenus
Visitor
Joined: November 14 2011 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Topic: How to traverse the objectPosted: December 27 2011 at 3:28am |
|
I have a sky file, but do not know what's inside. How to do in order to traverse the inside of the object?
I develop a WEB project using javascript. |
|
![]() |
|
Eylon
Skyline Admin Group
Joined: May 05 2003 Location: Israel Status: Offline Points: 259 |
Post Options
Thanks(0)
Quote Reply
Posted: December 27 2011 at 7:23am |
|
Eylon
|
|
![]() |
|
hVenus
Visitor
Joined: November 14 2011 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: December 27 2011 at 9:02am |
|
I know api.
but FindItem function requires Path, GetNextItem function requires ItemID. All of these Path, ItemID do not know how to traverse the object? Is there a root id? |
|
![]() |
|
rajeev.sood
Visitor
Joined: November 08 2010 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: December 28 2011 at 6:46pm |
|
Try FindItem("root")
|
|
![]() |
|
hVenus
Visitor
Joined: November 14 2011 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: December 29 2011 at 1:31am |
|
"SGWorld.ProjectTree.FindItem('root');"
return 0 |
|
![]() |
|
Eylon
Skyline Admin Group
Joined: May 05 2003 Location: Israel Status: Offline Points: 259 |
Post Options
Thanks(0)
Quote Reply
Posted: December 29 2011 at 9:46am |
|
The root ID is 0 (zero), so it you want the first object in the tree use GetNextItem to get the first child of the root: SGWorld.ProjectTree.GetNextItem 0,11 Hope it helps For more examples look at the Traversing objects sample in the Managing objects hierarchy section of the Interactive Tutorial (TerraExplorer button > Resources > Interactive Tutorial.
|
|
|
Eylon
|
|
![]() |
|
hVenus
Visitor
Joined: November 14 2011 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: December 30 2011 at 1:44am |
|
Thank you so much
I love you! ![]() |
|
![]() |
|
Post Reply
|
|
|
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |