Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to add the custom iProperties of the drawing document shown below to the Title Block using the below code. The iProperties are added by user input, and they update for the drawing document, but not in the Title Block (the respective fields remain empty).
Sub Main()
Dim oDrawDoc As Document
oDrawDoc = ThisApplication.ActiveDocument
'customPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
'Promt the user for the value of a variable
title01 = InputBox("Please Enter the Project Title:", "Custom Property Input Box", "The Default Entry")
title02 = InputBox("Please Enter the Project Sub-title:", "Custom Property Input Box", "The Default Entry")
drawnBy = InputBox("Drawn by:", "Custom Property Input Box", "The Default Entry")
checkedBy = InputBox("Checked by:", "Custom Property Input Box", "The Default Entry")
drawnDate = InputBox("Drawn Date (Format: dd/mm/yy):", "Custom Property Input Box", "The Default Entry")
checkedDate = InputBox("Checked Date (Format: dd/mm/yy):", "Custom Property Input Box", "The Default Entry")
'assign the value of that variable to a custom property
iProperties.Value("Custom", "ProjectName01") = title01
iProperties.Value("Custom", "ProjectName02") = title02
iProperties.Value("Custom", "DrawnBy") = drawnBy
iProperties.Value("Custom", "CheckedBy") = checkedBy
iProperties.Value("Custom", "DrawnDate") = drawnDate
iProperties.Value("Custom", "CheckedDate") = checkedDate
Dim oSheet As Sheet
For Each oSheet In oDrawDoc.Sheets
oSheet.Update
Next
End Sub
In my title block configuration, for the custom iproperties, I chose primary or attached model in Custom iProperties:
What could be the issue here? Thank you for reading, and I would appreciate any guidance.
Solved! Go to Solution.