I was wondering if anyone has come up with a macro to gather all view label information, and possibly sheet location in a drawing. If you could share it that would be great.
Solved! Go to Solution.
Hi Mike, do you want to be able to select a view and get it's view label information or do you want tobe able to get every view in the entire IDW?
Also what do you want to do with the data, Put it in a text file or just display in a message box of some sort?
If you can tell me some more details on what your after i'll post some code for you.
What I am looking for is a text or csv file of all views on all sheets of a drawing.
It would be great if you could come up with something.
Sorry mate, i completely forgot about this thread until you replied.
I just whipped up something for you. you can adjust it to suit your needs. Adjust it to suit your needs.
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Dim oView As DrawingView
Dim oLabel As DrawingViewLabel
Dim MyFile As String
MyFile = "c:\" & "Info.txt"
Open MyFile For Output As #1
For Each oSheet In oDoc.Sheets
For Each oView In oSheet.DrawingViews
Set oLabel = oView.Label
Write #1, "Label:" & oLabel.Text
Write #1, "View X:" & oView.Position.X
Write #1, "View Y:" & oView.Position.Y
Write #1, " "
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.