Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Am I able to change the style in an old drawing to the current company standard using InventorServer (Vault Add-in)? I've tried everything – from assigning styles to replacing them – but nothing works. Any help would be greatly appreciated! 😃 Maybe I'm doing something wrong, I don't know...
TransientObjects transientObjects = mInv.TransientObjects;
ObjectDefaultsStyle styleFromStandard = oStandardIptDraw.StylesManager.ActiveStandardStyle.ActiveObjectDefaults;
ObjectCollection objects = transientObjects.CreateObjectCollection();
objects.Add(drawingDocument.StylesManager.ActiveStandardStyle.ActiveObjectDefaults);
drawingDocument.StylesManager.ReplaceStyles(objects, (Style)styleFromStandard, false); //not working
drawingDocument.StylesManager.ActiveStandardStyle = oStandardIptDraw.StylesManager.ActiveStandardStyle; //not working
drawingDocument.StylesManager.ActiveStandardStyle.ActiveObjectDefaults.DiameterDimensionStyle = styleFromStandard.DiameterDimensionStyle; //not working
Solved! Go to Solution.