Message 1 of 18
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
spent few hours but I can't seem to find why this rule is not working for all open drawings but works only on single drawing.
For Each oDoc In ThisApplication.Documents.VisibleDocuments
If oDoc.DocumentType = kDrawingDocumentObject Then
Dim oDrawDoc As DrawingDocument = oDoc
oDrawDoc.Activate
If (ThisDrawing.ModelDocument Is Nothing) Then Return
modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
Try
Part_Material = iProperties.Value(modelName, "Custom", "MATERIAL")
Catch
Part_Material=""
End Try
Try
Part_Grade = iProperties.Value(modelName, "Custom", "GRADE")
Catch
Part_Grade=""
End Try
Try
Part_Finish_Type = iProperties.Value(modelName, "Custom", "FINISH TYPE")
Catch
Part_Finish_Type=""
End Try
Try
Stock_Number = iProperties.Value(modelName, "Project", "Stock Number")
Catch
Stock_Number =""
End Try
Try
iProperties.Value("Custom", "MATERIAL") = Stock_Number & " - " & Part_Material & " - " & Part_Grade & " || " & Part_Finish_Type
iProperties.Value("Custom", "PROJECT DESCRIPTION") = iProperties.Value(modelName, "Project", "Project")
iProperties.Value("Custom", "PART DESCRIPTION") = iProperties.Value(modelName, "Project", "Description")
iProperties.Value("Custom", "PART NUMBER") = iProperties.Value(modelName, "Project", "Part Number")
iProperties.Value("Custom", "CPT PROJECT") = iProperties.Value(modelName, "Custom", "Company PROJECT")
Catch
End Try
Else
End If
Next oDoc
Solved! Go to Solution.