This is a topic where the documentation need better clarification. And we have open issues to address this,
First of all, let me clarify some ambiguity in how Pid is referenced.
When you ask for the PID of an entity, you retrieve a persistent ID across sessions for that leaf node. This by itself have no means of identifying where in the model (it’s instance path). It is impossible to fetch a path from a leaf as there can be multiple paths using a given entity. (Due to component instances)
In order to reference a specific entity we need to keep track of its parents. This can be represented by for instance an
SUInstancePathRef or a “PID path”. You can convert between the two.
A PID path is what
SUModelGetInstancePathByPid expects. This is a string in the form of:
And example could be:
SUModelGetInstancePathByPid Will take this and return and
SUInstancePathRef. So it’s not actually resolving the instance path for you, it’s simply converting the PID path in string form to a data structure.
The Ruby API is actually a bit more specific in saying “Persistent ID Path” to distinguish from “Persistent ID”: http://ruby.sketchup.com/Sketchup/InstancePath.html#persistent_id_path-instance_method
The question is then, what do you need the instance path for? And in what context?