Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

This is the rule, I think will work for you. You can change the green number depending on which \ you want to start.

Also you have to put a Ipropertie or a parameter on the drawing where you can put your route in. I did that with a Ipropertie.

 

Dim oDrawingDoc As DrawingDocument
oDrawingDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = oDrawingDoc.ActiveSheet
For Each oSheet In oDrawingDoc.Sheets
	oViews = oSheet.DrawingViews
	Dim oView As DrawingView
	For Each oView In oViews
		Dim oModelDoc As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument
		Dim oFullFilePath As String = oModelDoc.FullFileName
		'MsgBox(oModelDoc.FullFileName)
		dim Input as string = oFullFilePath
		Dim folders = Input.Split("\").Skip(5)
		Dim newPath = String.Join("\", folders)
		'MsgBox(newPath)
		iProperties.Value("Custom", "05-Opmerking") = newPath
	Next
Next