https://www.cadforum.net/viewtopic.php?t=1055
I'm thinking that answer would only apply to getting references. I'm assuming that the variable values are applied to the document, not based on where the file might be shared to. In my mind (not implying my perception is correct) a Document ID should represent an object that only has one set of variables (well, there's versions and configs, but assuming latest version and only looking at the "Default" config for example). Needing to know the parent folder of a document to get the variables implies that a variable for single config in a single version of a specific docID can have more than one value, based on which project/folder the document is cached. That's a scary thought.
I'm getting an instance of the EnumeratorVariable from a specific instance of an edmFile. Another assumption I'm making is that any reference to an edmFile instance for part.sldprt will be identical regardless of where the file might be shared to. In the case of identical filenames in the vault (bad) they would have different DocIDs so the edmFile objects would be different. It just seems that if I have an instance of a PDM document there shouldn't be ambiguity so if I get the EnumeratorVariable from that file the parent folder should be inherent in that instance.
I'm missing something here or making a bad assumption again, or both.
Code: Select all
IEdmEnumeratorVariable10 enumVar = (IEdmEnumeratorVariable10)edmFile.GetEnumeratorVariable();
bool getVarSuccess;
getVarSuccess = enumVar.GetVarAsText("CAD_DocNumber", "Default", ParentFolderID, out v);
if(getVarSuccess)
{
string cadDocNum = (string)v;
}