Cancel
Showing results for 
Search instead for 
Did you mean: 

java: How to set a Property on a BOMLine in TeamCenter?

Creator
Creator

I am currently logging into TeamCenter via stanadalone code.  I can get  a BOMWindow and the BOMLines.

 

From a BomLine I call:

Property propertyObject = bomLine.getPropertyObject("FOO");

if (propertyObject instanceof PropertyStringImpl) {

      PropertyStringImpl propertyStringImpl = (PropertyStringImpl) propertyObject;

}

 

What I can not figure out is how to set that value that I retrieve.

I need something line this:

bomLine.setPropertyObject("FOO", "new value");

- or -

propertyStringImpl.setValue("FOO", "new value");

1 REPLY

Re: java: How to set a Property on a BOMLine in TeamCenter?

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor
I never tried this, but may work. You may try SOA call DataManagementService.SetProperties() for BOMLine type of ModelObject.
Another not so direct way is to use SOA call CreateOrUpdateRelativeStructure.
I have used C#, there should be similar calls in Java.