Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
I use below code to modify WTDocument attirbute by batch, a wired problem, I have many customized attributes like: "BoardNumber,SchematicNumber,DrawingNumber,FilmRev,description,CreatedDate,ECONumber,LeadStatus,CADTool,CADToolVersion,LastUser"
I can update "BoardNumber" independently, but I can't update it with other attributes together, get the error
"
",
other attributes any be updated together. In "Type and Attribute Management", "BoardNumber" is required , but like "LeadStatus" is also required, who could help me? Thanks in advance.
for(String key:map.keySet()){
System.out.println(key+" : "+map.get(key));
obj.load(key);
obj.set(key,map.get(key));
doc = (wt.doc.WTDocument) obj.apply();
wt.fc.PersistenceHelper.manager.modify(doc);
}
What if you move the apply and modify right below the loop.
doc = (wt.doc.WTDocument) obj.apply();
wt.fc.PersistenceHelper.manager.modify(doc);
When I move apply and modify out of the loop, I just can modify the latest attribute in my TreeMap, the other modification can't work out. Other attributes except "BoardNumber" can be any combined for modification, very strange.