Hi
The title blocks that we use have prompted entries in them and I would like to find a way using iLogic to copy the entries from one title block to another within the same drawing; i.e.. if the user decides to change from an A2 to A1 drawing.
I already have an iLogic rule which allows the user to change the active border, title block and sheet size based on a form selection but would like it to capture the prompted entries already entered and re-use them after the change.
Any ideas?
Mike
Hi,
I wrote an iLogic code for your reference. It assumes the drawing has two sheets which use the same title block. In the title block, there is one prompt text named "MY_PROMPT". It will get the result string in sheet1 and copies to sheet2.
' assume sheet1 and sheet use the same title block definition Dim oDoc oDoc = ThisApplication.ActiveDocument 'get first sheet Dim oSheet1 oSheet1 = oDoc.Sheets(1) 'get titleblock of sheet1 Dim oTB1 oTB1 = oSheet1.TitleBlock ' search the textbox in definition Dim oPromptText Dim oEachText Dim I For I = 1 To oTB1.Definition.Sketch.TextBoxes.Count oEachText = oTB1.Definition.Sketch.TextBoxes(I) If (oEachText.Text = "MY_PROMPT") Then ' found the prompt text we want to copy oPromptText = oEachText Exit For End If Next I 'get the result string of the prompt text Dim oPromptEntry oPromptEntry = oTB1.GetResultText(oPromptText) 'get sheet2 Dim oSheet2 As Sheet oSheet2 = oDoc.Sheets(2) 'get titleblock of sheet2 Dim oTB2 As TitleBlock oTB2 = oSheet2.TitleBlock ' copy the result string of the prompt text to the prompt text in sheet2 oTB2.SetPromptResultText(oEachText, oPromptEntry)