Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I have custom UOM in Windchill loaded to QuantityUnitRB, but I am not able to create a new Part with custom UOM using code.
getting the values via
QuantityUnit[] qu = QuantityUnit.getQuantityUnitSet();
but when I set to part, getting null pointer .
Has anyone come across this. Please suggest the way to do this.
Thank You,
Solved! Go to Solution.
Hi,
Got Solution.
I tried,part.setDefaultUnit(QuantityUnit.toQuantityUnit("custom UOM"));
Thank you for you response
Set it via LWCNormalizedObject, using this class to create the part, get the pointer, and then setting that attribute before checking in. Covered in the javadoc.
For the future, if you are going to say you get a NPE, you have to post the stacktrace, or the actual java code, providing details about how it is executed/invoked, or you will not typically get a lot of help.
Hi,
Got Solution.
I tried,part.setDefaultUnit(QuantityUnit.toQuantityUnit("custom UOM"));
Thank you for you response