Hi guys! I'm trying to get a node's category by using the method $LLIApi.LLNode.NodeCategoriesGet, but I'm always getting the message:
'The xxxxxxx cannot have categories.' (The node I'm trying to get is a folder)
Why is this?
Best regards,
HI Diogo: You rarely or never access the functions of $LLIAPI.LLNode directly. What you need to do is get the subset of functions for your particular subtype, and use that. The usage pattern is roughly like this:
// Get the llnode object for the node (in your case a folder if // node.pSubtype=0 Object llnode = $LLIApi.LLNodeSubsystem.GetItem( node.pSubtype )
Assoc results = llnode.NodeCategoriesGet( ... )
Good luck!
Thank you very much Chris!
Hi Diogo: I'm glad that worked. The data you get back and the API to interact with the data is quite complicated. I recently blogged about it (link). While my blog post won't solve what you're likely trying to do, it may shed some light on the problems you might face. Good luck!