InwOaNode to InwOaPath in COM Api

InwOaNode to InwOaPath in COM Api

MatiasArg.
Explorer Explorer
861 Views
1 Reply
Message 1 of 2

InwOaNode to InwOaPath in COM Api

MatiasArg.
Explorer
Explorer

Hello everybody,
As the title says, i'm trying to get the full path for a specific node.

The end goal is to make a InwOpSelection from a list of InwOaNodes.


I know this may seem like a weird question. Case is I'm using Dynamo Visual Programming(an external app) and I can´t change my input type as its out of my reach.
In VS, if I do InwOaPath path= InwOaNode node, it tells me that there´s an explicit conversion for that, but I cant find it.
Thank u very much in advanced

0 Likes
862 Views
1 Reply
Reply (1)
Message 2 of 2

alexisDVJML
Collaborator
Collaborator

Not sure how you ended with just InwOaNodes. Surprisingly there seems to have no explicit way to get the path for a Node. Typically you would manipulate/keep InwOaPath(s) and use the last node of it when needed.

 

From a model item you can get a InwOaPath (that contains the list of parent nodes and the node itself but exclude the model) and vice-versa using ComApiBridge.ToInwOaPath(item) / ToModelItem(InwOaPath path)

 

You also have functions to directly get/resolve paths in DocumentModels class: CreateIndexPath/CreatePathId/ResolvePathId

I will update this answer if I run into a way to go up from an InwOaNode to its path 😉

 

 

Main Scientist, Full Stack Developer & When Time Permits Director of IDIGO ► On your marks, Set, Go
0 Likes