GetVar vs GetVarFromDB - the rematch

In a previous post, I spent a lot of time bashing my new friend, the Enterprise PDM function “GetVar”. The help file skims over the differences between “GetVar” and “GetVarFromDB”. So I thought it may be helpful to the world if I list them here.

[This would be so much easier to read in a table; but using this WordPress is like writing a novel with a crayon -not the skinny ones, the big fat ones that come eight in a box.]

If the file is checked out:
GetVar – retrieves the value the checked out person sees in his datacard
GetVarFromDB – retrieves the value from the version back in the vault

If the file is checked in:
GetVar – whines and cries like a baby and won’t work
GetVarFromDB – retrieves the value from the latest version in the vault

One other problem I have found with the help file. . .

Several times you’ll see an example that looks like this:
varEnum.GetVar("comment", "", value)
I’ve been told by API support that passing an empty string for the configuration is not proper etiquette. While it is true that it still works, there is an SPR out that may soon prevent this from working. The code for getting the part level variable should look like this:
varEnum.GetVar("comment", "@", value)

Keep an eye on this one when upgrading.

  • Share this
Find Your Design Solution in the CATI Store.
Browse Products