Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want each timle the titleblock is updated, to copy the prompted entries from the tilteblockto the drawing custom iproperties. I have have found this code and modified it to my naming scheme, but they don't get copied. Can anyone point me in the right direction?
On Error Resume Next
'https://www.cadlinecommunity.co.uk/hc/en-us/articles/203292761
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Dim oPromptEntry
Dim oCurrentSheet
oCurrentSheet = oDoc.ActiveSheet.Name
i = 1
For Each oSheet In oDoc.Sheets
'i = i+1
ThisApplication.ActiveDocument.Sheets.Item(i).Activate
oTitleBlock=oSheet.TitleBlock
oTextBoxes=oTitleBlock.Definition.Sketch.TextBoxes
For Each oTextBox In oTitleBlock.Definition.Sketch.TextBoxes
Select oTextBox.Text
Case "PTN_DRAWING"
oPromptEntry = oTitleBlock.GetResultText(oTextBox)
iProperties.Value("Custom", "PTN_DRAWING")=oPromptEntry
Case "PTN_REVISION"
oPromptEntry = oTitleBlock.GetResultText(oTextBox)
iProperties.Value("Custom", "PTN_REVISION")=oPromptEntry
Case "PTN_TITLE_EN"
oPromptEntry = oTitleBlock.GetResultText(oTextBox)
iProperties.Value("Custom", "PTN_TITLE_EN")=oPromptEntry
Case "PTN_DESCRIPTION_EN"
oPromptEntry = oTitleBlock.GetResultText(oTextBox)
iProperties.Value("Custom", "PTN_DESCRIPTION_EN")=oPromptEntry
End Select
Next
Next
Inventor 2025, Vault Professional 2025, Autocad Plant 3D 2025
Solved! Go to Solution.