Message 1 of 3
Need Small Changes in Base Scale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
SyntaxEditor Code Snippet
Sub Main() Dim drawingDoc As DrawingDocument = TryCast(ThisDoc.Document, DrawingDocument) For Each sheetX As Sheet In drawingDoc.Sheets Dim titleBlockX As TitleBlock = sheetX.TitleBlock If (titleBlockX Is Nothing) Then Continue For Dim scaleTextBox As TextBox = GetScaleTextBox(titleBlockX.Definition) If (scaleTextBox Is Nothing) Then Continue For Dim scaleString As String = String.Empty For Each viewX As DrawingView In sheetX.DrawingViews If (Not String.IsNullOrEmpty(viewX.ScaleString)) Then scaleString = viewX.ScaleString Exit For End If Next titleBlockX.SetPromptResultText(scaleTextBox, scaleString) Next End Sub Function GetScaleTextBox(ByVal titleDef As TitleBlockDefinition) As TextBox For Each defText As TextBox In titleDef.Sketch.TextBoxes If (defText.Text = "<Scale>" Or defText.Text = "Scale") Then Return defText End If Next Return Nothing End Function
Hi,
Above program is made to update scale detail in title block based on base scale view.
i need to add one condition in this. If the Base scale view is an isometric view then Scale value in the title block should be NTS. Else whatever the actual value need to be updated. Anybody can help?
-karthikeyan M