Can I use component path leaf/root pointers in Excel VBA?
Running up against what might be a bug in the VB API when using Excel.
This is simply trying to get the PTC-provided example listSubAssemblyComponent to function in Excel VBA rather than its original VB. I intended to make this the basis of code to extract the model tree into an Excel spreadsheet for internal engineering management purposes - old way we do this is to save the model tree from Creo, and import it into a spreadsheet via VBA macros, but I want a more streamlined way to do it. (This ain't necessarily it, and I'm open to better alternatives.)
It appears to allocate something to currentPath (typing?currentPath is Nothingin the immediate window returns false). But it hangs up every time on the line with currentPath.Leaf, returning the message:
Run-time error '-2147352567 (80020009)':
I don't see any useful explanation of this error. I've fiddled around with everything I can think up on how to get around it, but I'm starting to believe it's a bug or else something available in VB but not VBA for some reason.
Ideas? What am I missing?
Sub listSubAssemblyComponent(ByVal currentLevel As Cintseq)