Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello there,
I´m trying to create an iLogic rule to replace the author of old drawings (which is written manually) with the current author of the drawing, but I would like to keep the author as a text parameter <Author> and not as simple text.
I managed to changed but only as simple text. I´m sure that I´m just missing the correct function.
Bellow the current code. I would really appreciate some quick help.
'--------------------- ' Replace "FCE" , "MPO", "RMO", "BAR", "DGO", "HJD" with Author
'Is the active document a drawing document? If ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject Then Dim objDoc As Document objDoc = ThisApplication.ActiveDocument Dim objDrawDoc As DrawingDocument objDrawDoc = objDoc Dim colTitleBlkDefs As TitleBlockDefinitions colTitleBlkDefs = objDrawDoc.TitleBlockDefinitions Dim objTitleBlkDef As TitleBlockDefinition For Each objTitleBlkDef In colTitleBlkDefs ' If we are here, we have the title block of interest. ' Get the title block sketch and set it active Dim objDrwSketch As DrawingSketch Call objTitleBlkDef.Edit(objDrwSketch) Dim colTextBoxes As TextBoxes colTextBoxes = objDrwSketch.TextBoxes Dim objTextBox As TextBox For Each objTextBox In colTextBoxes Select Case objTextBox.Text Case "FCE", "MPO", "RMO", "BAR", "DGO", "HJD" If objTextBox.Text <> UserFullName ' I´M STRUGGLING WITH THIS NEXT LINE objTextBox.FormattedText = "<StyleOverride FontSize='0,25'>" & iProperties.Value("Summary", "Author") & "</StyleOverride>" ' Exit For Else done=1 Exit For End If End Select If done = 1 Exit For End If Next objTextBox Call objTitleBlkDef.ExitEdit(True) Next objTitleBlkDef End If
Solved! Go to Solution.