Showing results for 
Search instead for 
Did you mean: 

How do you edit multiple objects with edit settings builders


I'm having trouble understanding what the documentation recommends when trying to apply settings across multiple objects.


When you create a settings builder, you pass an array of displayable objects. However, only the first object of the array recieves the changes. My first work around was to create a builder for each object in the array, passing in a 1 element array for each. Essentially creating, editing, committing and destroying 'n' builders. Thinking that there must be a better way, I consulted the documentation.


What the API Reference says is the following:

"For multiple object settings, first create primary settings builder by passing all selected 'n' objects.Then create 'n-1' secondary builders by passing single selected object starting from second selected object. Client must call Drafting.SettingsManager.ProcessForMultipleObjectsSettings after creating all settings builder for selected objects"

In the Solution Center I found the following: (PR# 1993588)

The correct steps are:
- Create individual builder for all selected objects. For first builder (i.e. primary builder) pass all selected objects. For next builders (i.e. secondary builder), pass single object starting from 2nd selected object.
- Call ProcessForMutipleObjectsSettings API on SettingsManager by passing all these above created edit settings builder.
- Call InheritSettingsFromCustomerDefault on primary builder.
- Call commit on each of these builder.
- Call destroy on each of these builder.

I updated my code, as is suggested. Created 1 primary builder first, passing in all objects. Then creating 'n-1' builders for all objects 2 thru 'n', each with single element arrays. I passed the primary and all secondary builders to ProcessForMultipleObjectsSettings(), commited them all, and destroyed them all.


It doesn't seem to make a bit of difference in runtime and it just makes the code more complex.


Does anybody know why I should bother using this method? And why do I still have to create 'n' builders, set all their settings, commit and destroy them... when it's suppose to be able to "ProcessForMultiple"