What's new

Assembly Configuration Part Data not sticking.

I'm updating my Part Weight script to work with configurations/suppressed parts, but ran into a weird issue. Part data set with a script for a configuration will not 'stick'. This applies to Alibre's fields as well as custom fields. I'm using this short script for testing:

Python:
assy = CurrentAssembly()
configs = list(assy.Configurations)
for i, config in enumerate(assy.Configurations):
  config.Activate()
  print 'Config:', config.Name, 'is now active.'
  assy.Comment = 'test' + str(i + 1)
  #assy.Save()
  print 'Comment set to: ' + assy.Comment

This will leave your assembly on it's last config, and when you view the part data will have test# for it's comment. If you activate another configuration, it's comment will be whatever was there previously. If you return to the last config, it will have the previous comment as well. I've tried manually setting every variation of configuration locks I can think of. I've tried locking and unlocking them using the script before/after setting the part data. I've tried saving the assembly after setting each config's part data. I hope I'm just missing something simple?
 
Configurations aren't supported. You can create a custom property that represents each configuration.
1775060686663.png

When switching the configuration, you get the custom property for that configuration.
 
Last edited:
Back
Top