Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi, have a good day.
I'm doing some practices with windchill and trying to understand how it works. Now I have a doubt.
What is the difference between these two prefixes in objects ID
VR:wt.part.WTPart & OR:wt.part.WTPart
Thank You for your time.
Solved! Go to Solution.
<class>:<key> : string representation of an ObjectIdentifier.
OR:<class>:<key> : string representation of an ObjectReference.
VR:<class>:<key> : string representation of an VersionReference.
Snippets:
/* ObjectIdentifier string to WTPart */
ObjectIdentifier oid = ObjectIdentifier.newObjectIdentifier("wt.part.WTPart:20154");
WTPart part = (WTPart) PersistenceHelper.manager.refresh(oid);
/* ObjectReference / VersionReference string to WTPart */
ReferenceFactory rf = new ReferenceFactory();
WTReference ref = (WTReference) rf.getReference("OR:wt.part.WTPart:20154");
WTPartpart = (WTPart) ref.getObject();
ReferenceFactory rf = new ReferenceFactory();
WTReference ref = (WTReference) rf.getReference("VR:wt.part.WTPart:20153");
WTPart part = (WTPart) ref.getObject();
<class>:<key> : string representation of an ObjectIdentifier.
OR:<class>:<key> : string representation of an ObjectReference.
VR:<class>:<key> : string representation of an VersionReference.
Snippets:
/* ObjectIdentifier string to WTPart */
ObjectIdentifier oid = ObjectIdentifier.newObjectIdentifier("wt.part.WTPart:20154");
WTPart part = (WTPart) PersistenceHelper.manager.refresh(oid);
/* ObjectReference / VersionReference string to WTPart */
ReferenceFactory rf = new ReferenceFactory();
WTReference ref = (WTReference) rf.getReference("OR:wt.part.WTPart:20154");
WTPartpart = (WTPart) ref.getObject();
ReferenceFactory rf = new ReferenceFactory();
WTReference ref = (WTReference) rf.getReference("VR:wt.part.WTPart:20153");
WTPart part = (WTPart) ref.getObject();
Thank You, Ruegg.
Might be more info than you want, but for objects that are versioned (like WTParts), there are two objects created - the "Master" and the first Version. Certain operations apply to the Master (e.g. Rename). Attributes are applicable to either the Master or each Version (if each Version, they are "Instance based attributes" or IBAs).
The URL is either for the Master object or a specific Version.
Thank You for the information, Mike.