Autodesk Inventor Customization
- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
how to know if a view is baseview with vb.net?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
While loop through all Views in a sheet, I can use oView.ScaleFromBase to know if the scale of the view is changed from Base-View. Like this:
For Each oView In oViews
If oView.ScaleFromBase = False Then
'This view's scale is different from that of the Base-View But I can't tell in this way if it is a Base-View or views with different view scale.
There is a oView.ViewType, I tried this
Dim mytype As String mytype = oView.ViewType
for Base-View, mytype=10501
for other-view with different scale, mytype=10504
Is there other property I could use? Can't work out how to get the View Type Name.
Thanks for help.
Regards,
Peter
Solved! Go to Solution.
Re: how to know if a view is baseview with vb.net?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You may check oView.ParentView property.
For base view it returns Nothing.

Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network
Re: how to know if a view is baseview with vb.net?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Vladimir,
I tried this, but both baseview and view whose scale if different from baseview return a Nothing.
Regards,
Peter
Dim myView As DrawingView
For Each oView In oViews
If oView.ScaleFromBase = False Then
myView = oView.ParentView
If myView Is Nothing Then
MsgBox("nothing")
Else
MsgBox("something")
end if
end if
next
Re: how to know if a view is baseview with vb.net?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Can you attach the data that you see the problem? Or double check the drawing view which has different scale from its parent view does have a parent view or not?

Rocky Zhang
Inventor API
Manufacturing Solutions
Autodesk, Inc.
Re: how to know if a view is baseview with vb.net?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You can check this way:
For each oView in oViews
If oView.ViewType = Inventor.DrawingViewTypeEnum.kStandardDrawingViewT ype Then
Debug.Print("This is a base view")
Else
Debug.Print("This is not a base view")
End If
NextOr you can check the oView.Aligned property but this will also return false if the alignment has been broken from the base view.
Re: how to know if a view is baseview with vb.net?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Rocky,
I just made a cube and generated a base view, a top view,a right view and an iso view. Then I change the view scale of the iso view.
Then I want the code to tell me which one's scale is changed and it is not a base view.
Peter
Re: how to know if a view is baseview with vb.net?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Robert,
It's works for me. thank you very much.
Regards,
Peter

