08-29-2022
10:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-29-2022
10:26 PM
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