Inventor Customization

Reply
Contributor
MDS-MQ
Posts: 59
Registered: ‎05-30-2011
Message 1 of 6 (294 Views)
Accepted Solution

View Label Information

294 Views, 5 Replies
06-15-2011 08:21 AM

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

Mentor
matt_jlt
Posts: 210
Registered: ‎07-28-2007
Message 2 of 6 (272 Views)

Re: View Label Information

06-21-2011 07:27 PM 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.

Contributor
MDS-MQ
Posts: 59
Registered: ‎05-30-2011
Message 3 of 6 (262 Views)

Re: View Label Information

06-22-2011 04:58 AM 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

Contributor
MDS-MQ
Posts: 59
Registered: ‎05-30-2011
Message 4 of 6 (224 Views)

Re: View Label Information

08-16-2011 07:11 AM in reply to: MDS-MQ

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

Mentor
matt_jlt
Posts: 210
Registered: ‎07-28-2007
Message 5 of 6 (208 Views)

Re: View Label Information

08-16-2011 05:45 PM 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.

Contributor
MDS-MQ
Posts: 59
Registered: ‎05-30-2011
Message 6 of 6 (182 Views)

Re: View Label Information

08-31-2011 09:17 AM 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube