Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Trying to get a view information to populate the prompted fields of a sketch symbol.
It works for selecting the view, but once I select the sketch label I want I get the following error:
Public member 'TextBoxes' on type 'SketchedSymbol' not found.
Any help would be highly appreciated... drawing file attached to laugh at.
SyntaxEditor Code Snippet
Dim doc as DrawingDocument doc = ThisApplication.ActiveDocument Dim oSymbol As SketchedSymbol Dim oViewName As String 'choose the view we want to grab properties from Dim oObj As Object oObj = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter,"Select a view:") If oObj Is Nothing Then Else 'get the view name Dim viewName As String = oObj.Name 'send the view label name back to the public variable oViewName oViewName = viewName End If 'change the result text of the selected SketchedSymbol Dim oSS As SketchedSymbol 'choose the sketch symbol we want to inject text strings into fields of 'oSS=ThisApplication.CommandManager.Pick(SelectionFilterEnum.kSketchBlocksFilter,"Select a Label:") oSS=ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingsketchedSymbolFilter,"Select a Label:") 'if our sketched symbol name is named ITEM8 then do the actions If oSS.Definition.Name = "ITEM8" Then Dim oEachText As TextBox Dim I For I = 1 To oSS.TextBoxes.Count oEachText = oSS.TextBoxes(I) If (oEachText.Text = "NAME") Then oNewResultText = oEachText End If Next Else End If
Solved! Go to Solution.