Does anyone know of an ilogic function to update local styles to match Style Library?
I have a snippet of code that, on a drawings, deletes the current parts list (if one exists), then inserts a new parts list which I want to be up to date with the Style Library.
Hi,
PartsList.Style is read/write. I think you can change it directly without deleting the partslist and adding it again. In addition, Style.UpdateFromGlobal can updates this style from the global repository.
I can run the following
Dim oDrawingDoc As DrawingDocument oDrawingDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet oSheet = oDrawingDoc.ActiveSheet
Dim oPartsList As PartsList oPartsList = oDrawingDoc.ActiveSheet.PartsLists.Item(1) oPartsList.Style.UpdateFromGlobal
but my parts list does not update unless I delete it and reinsert it or select my parts list then click the drop down to change the style and reselect my 'By Standard' style. Is there a line of code I could use to automate the latter?
Something along the lines of...
oPartsList.Style.Change("By Standard (Parts List (ANSI))")
oPartsList.Style = oDrawDoc.StylesManager.PartsListStyles.Item("Parts List (ANSI)")
Hi,
I still think this should work. Could you share a test demo file. Which property of PartsList you modified?