Message 1 of 4
i logic to choose certain dimension style in drawing documents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Currently, when I open the old drawing I need to update the dim styles manually by right click and editing dimensions to the updated styles. Those are actually available in the "Style and Standard Editor".
Now I want to create a simple i-logic to show inputboxlist for me to choose the style. I have the drawing standard styles also to come up after that. I tried but found the error
Something like in the below capture,
Dim oDoc As DrawingDocument = ThisDrawing.Document Dim oDSMgr As New List(Of String) Dim oStyle As DimensionStyle For Each oStyle In oDoc.StylesManager.DimensionStyles oDSMgr.Add(oStyle.Name) Next oChoice = InputListBox("", oDSMgr, "", "Dimension Standard Styles", "Dimension Standard Styles List") oStyle = oDoc.StylesManager.DimensionStyles.Item(oChoice) Dim oDDoc As DrawingDocument = ThisDrawing.Document Dim oSStyles As New List(Of String) For Each oSS As DrawingStandardStyle In oDDoc.StylesManager.StandardStyles oSStyles.Add(oSS.Name) Next oChoice = InputListBox("", oSStyles, "", "Drawing Standard Styles", "Drawing Standard Styles List") If String.IsNullOrEmpty(oChoice) Then Exit Sub Dim oStyle As DrawingStandardStyle = oDDoc.StylesManager.StandardStyles.Item(oChoice) oDDoc.StylesManager.ActiveStandardStyle = oStyle
Can anyone give a clue?
Rgds