Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I cannot figure out how to set the description for the currently active document. This script runs through every open part file and generates a description. No matter what combination I put into the iProperties field it only works on the very last part file.
Dim oPartDoc As PartDocument
Dim oDoc As Document
Dim oRefFile As FileDescriptor
oPartDoc = ThisDoc.Document
For Each oDoc In oPartDoc.AllReferencedDocuments
oDocName = IO.Path.GetFileNameWithoutExtension(oDoc.FullFileName)
Next
UHeight = InputBox("Enter Height of Unit in INCHES","Height","")
UWidth = InputBox("Enter Width of Unit in INCHES","Width","")
For Each oPartDoc In ThisApplication.Documents.VisibleDocuments
oPartDoc.Activate
oPartDoc = ThisDoc.Document
PanelType = InputBox("Enter Panel Type", "Panel Type", PanelType)
PanelType = UCase(PanelType)
NewDesc = "75-" & PanelType & " " & oDocName
iProperties.Value(oPartDoc.File.FullFileName, "Custom", "Panel Type") = PanelType
iProperties.Value(oPartDoc.File.FullFileName, "Project", "Description") = NewDesc
Solved! Go to Solution.