Message 1 of 3
Update value of Title textbox

Not applicable
09-07-2010
07:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi:
First of all I apologize for my bad English.
I'm trying to adapt a code I've seen updated from the value of a TexBox of Title with the value of the scale of a view.
The problem is not as update the value of TexBox
Option Explicit
Public Sub escala()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Set oSheet = oDoc.ActiveSheet
Dim oTitleBlockDef As TitleBlockDefinition
Set oTitleBlockDef = oSheet.TitleBlock.Definition
Dim oTextBox As TextBox
Dim bFound As Boolean
bFound = False
For Each oTextBox In oTitleBlockDef.Sketch.TextBoxes
If oTextBox.Text = "<ESCALA>" Then
Dim EscalaTitle As String
EscalaTitle = oSheet.DrawingViews.Item(1).ScaleString
'''ERROR
''' I want to pass the value of EscalaTitle to EscalaProp
Dim EscalaProp As TextBox
EscalaProp = oSheet.TitleBlock.SetPromptResultText(oTextBox, EscalaTitle)
'''ERROR
MsgBox "encontrado =block."
bFound = True
Exit For
End If
Next
If bFound Then
oSheet.Name = oSheet.TitleBlock.GetResultText(oTextBox)
MsgBox "Encontrado valor" & oTextBox.Text & oSheet.TitleBlock.GetResultText(oTextBox)
Else
MsgBox "Specified formatted text was not found in the title =block."
End If
End Sub
Thank in advance