Message 1 of 5
Clear All Overrides tick box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I want to tick the box for clear all overrides on solid bodies properties using iLogic.
I been using oSurfaceBody.ClearAppearanceOverrides() for some year but it seems to not work via code until you go into the solid properties an tick the box while applying the appearance.
Shouldn't this tickbox be a Boolean parameter? true as ticked and false and left unticked?
Normally I use this code:
Dim Doc_P As PartDocument = ThisDoc.Document Dim oDoc_P_Def As ComponentDefinition = Doc_P.ComponentDefinition Dim Colour_1 As Asset Dim oSurfaceBody As SurfaceBody Dim oSurfaceBodies As WorkSurface Colour_1 = Doc_P.Assets.Item("Default") For s = 1 To oDoc_P_Def.SurfaceBodies.Count oSurfaceBody = oDoc_P_Def.SurfaceBodies(s) oFeature = oSurfaceBody.CreatedByFeature oSurfaceBody.ClearAppearanceOverrides() If InStr(oSurfaceBody.Name, "Front Panel") > 0 Then 'MessageBox.Show(oSurfaceBody.Name, "Front") oSurfaceBody.Appearance = Colour_1 End If Next s InventorVb.DocumentUpdate()