Autodesk Inventor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Base and Projected View Label Name to match Orientatio n Name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I would like to know if there is a way to have each view name to be set to the orientation names/ the 3D view cube's name. Is there a way to do this without manually changing each one?
Solved! Go to Solution.
Re: Base and Projected View Label Name to match Orientatio n Name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi jbauer,
you could manage this with a little macro like this:
Sub OrientationToLabel()
Dim odoc As DrawingDocument
Set odoc = ThisApplication.ActiveDocument
'active sheet
Dim tmpSheet As Sheet
Set tmpSheet = odoc.ActiveSheet
Dim tmpView As DrawingView
'every draring view
For Each tmpView In tmpSheet.DrawingViews
Dim myDrawingViewName As String
'Which text for which orientation
Select Case tmpView.Camera.ViewOrientationType
Case ViewOrientationTypeEnum.kBackViewOrientation
myDrawingViewName = "Back View"
Case ViewOrientationTypeEnum.kBottomViewOrientation
myDrawingViewName = "Bottom View"
Case ViewOrientationTypeEnum.kFrontViewOrientation
myDrawingViewName = "Front View"
Case ViewOrientationTypeEnum.kIsoBottomLeftViewOrientat ion
myDrawingViewName = "Iso - Bottom Left View"
Case ViewOrientationTypeEnum.kIsoBottomRightViewOrienta tion
myDrawingViewName = "Iso - Bottom Right View"
Case ViewOrientationTypeEnum.kIsoTopLeftViewOrientation
myDrawingViewName = "Iso - Top Left View"
Case ViewOrientationTypeEnum.kIsoTopRightViewOrientatio n
myDrawingViewName = "Iso - Top Right View"
Case ViewOrientationTypeEnum.kLeftViewOrientation
myDrawingViewName = "Left View"
Case ViewOrientationTypeEnum.kRightViewOrientation
myDrawingViewName = "Right View"
Case ViewOrientationTypeEnum.kTopViewOrientation
myDrawingViewName = "Top View"
Case Else
myDrawingViewName = ""
End Select
'Chang if view orientation was found
If Not myDrawingViewName = "" Then
'change drawing view name
tmpView.Name = myDrawingViewName
End If
Next
End Sub
bofore:
After using the macro:
The macro will change the name of the drawing view of all view on that sheet.
You can adjust the code and replace the names of the orientation with names you like.
Do you think, this would work for you?
Please use the button "Accept as Solution" if it works.

Dennis Ossadnik
Support Specialist
Product Support
Autodesk, Inc.
Re: Base and Projected View Label Name to match Orientatio n Name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
When I paste this code into the iLogic Browser, I get an error message. I attached a screenshot image of it.
Re: Base and Projected View Label Name to match Orientatio n Name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi jbauer,
sorry, i was not aware that you wanted to use it in iLogic. The code above is for using as a macro in VBA.
I changed the code. Now you should be able to use it with iLogic:
Here is the code for iLogic:
Sub Main()
Dim odoc As DrawingDocument
odoc = ThisApplication.ActiveDocument
'active sheet
Dim tmpSheet As Sheet
tmpSheet = odoc.ActiveSheet
Dim tmpView As DrawingView
'every draring view
For Each tmpView In tmpSheet.DrawingViews
Dim myDrawingViewName As String
'Which text for which orientation
Select Case tmpView.Camera.ViewOrientationType
Case ViewOrientationTypeEnum.kBackViewOrientation
myDrawingViewName = "Back View"
Case ViewOrientationTypeEnum.kBottomViewOrientation
myDrawingViewName = "Bottom View"
Case ViewOrientationTypeEnum.kFrontViewOrientation
myDrawingViewName = "Front View"
Case ViewOrientationTypeEnum.kIsoBottomLeftViewOrientat ion
myDrawingViewName = "Iso - Bottom Left View"
Case ViewOrientationTypeEnum.kIsoBottomRightViewOrienta tion
myDrawingViewName = "Iso - Bottom Right View"
Case ViewOrientationTypeEnum.kIsoTopLeftViewOrientation
myDrawingViewName = "Iso - Top Left View"
Case ViewOrientationTypeEnum.kIsoTopRightViewOrientatio n
myDrawingViewName = "Iso - Top Right View"
Case ViewOrientationTypeEnum.kLeftViewOrientation
myDrawingViewName = "Left View"
Case ViewOrientationTypeEnum.kRightViewOrientation
myDrawingViewName = "Right View"
Case ViewOrientationTypeEnum.kTopViewOrientation
myDrawingViewName = "Top View"
Case Else
myDrawingViewName = ""
End Select
'Chang if view orientation was found
If Not myDrawingViewName = "" Then
'change drawing view name
tmpView.Name = myDrawingViewName
End If
Next
End Sub
Please use the button "Accept as Solution" if it works.
Thanks.

Dennis Ossadnik
Support Specialist
Product Support
Autodesk, Inc.
Re: Base and Projected View Label Name to match Orientatio n Name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks for your help,
It's greatly appreciated.

