Wiretap (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 2
bfattorini
434 Views, 1 Reply

Root Node

I'm trying to get the Root Node in Python but obviously I haven't quite grapsed the concept fully. Can someone give me an idea as to where I may be going wrong?

"WireTapServerHandle::getRootNode
bool WireTapServerHandle::getRootNode(
WireTapNodeHandle &root
) const"

"The root node may be queried through the call getRootNode.."
"root: The root parameter is a WireTapNodeHandle object."
"Upon success, the result is placed in the root parameter."


# server = WireTapServerHandle('myMachine')
# root = WireTapNodeHandle()
# rootNode = server.getRootNode(root)
# print root
or
# print root.getNodeId()

Gives ""


Rather than an ID I would like to see the root node as a string, perhaps I need to call 'WireTapNodeHandle::getNodeTypeStr' once I get the concept correct?
1 REPLY 1
Message 2 of 2
labuted
in reply to: bfattorini

Hi,

You're hitting a bit of silliness in the API. To see the actual ID on a WireTapNodeId object, you need to call the id() function as follows:

node.getNodeId().id()

Yucky. A simple cast operator on our end should do the trick. We'll try to get that in to avoid the confusion.

Dan

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report