- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Im not a programmer but Thanks to COVID-19 I have plenty of time to experiment, hope this works for you
Sub Main()
' Define a variable that will set the type of document
Dim oComp1occ As Document = ThisDoc.Document
'Define the iproperty value that you want in your browser node
Dim strText As String = iProperties.Value("Custom", "DocumentID")
'Looks for the type of document and replaces the node value
If oComp1occ.DocumentType = kAssemblyDocumentObject Then
Dim oPart As AssemblyDocument = ThisDoc.Document
oPart.DisplayName = strText
ElseIf oComp1occ.DocumentType = kPartDocumentObject Then
Dim oPart As PartDocument = ThisDoc.Document
oPart.DisplayName = strText
Elseif oComp1occ.DocumentType = kDrawingDocumentObject Then
Dim oPart As DrawingDocument = ThisDoc.Document
oPart.DisplayName = strText
End If
end Sub