Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

View Label Information

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
MDS-MQ
501 Views, 5 Replies

View Label Information

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.

 

Thanks

Mike

5 REPLIES 5
Message 2 of 6
matt_jlt
in reply to: MDS-MQ

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.

Regards, Matt.

Message 3 of 6
MDS-MQ
in reply to: matt_jlt

Hi Matt

 

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.

 

Thanks,

Mike

Message 4 of 6
MDS-MQ
in reply to: MDS-MQ

I was woundering if there was any progress on this Macro?

Message 5 of 6
matt_jlt
in reply to: MDS-MQ

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.

 

Sub ViewLabel()
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, " "

Next
Next


Close #1
End Sub

 

Regards, Matt.

Message 6 of 6
MDS-MQ
in reply to: matt_jlt

Hi Matt

 

Thanks a lot for the code. With some minor tweeks we got it working great. I really appriciate it.

 

Cheers

Mike

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report