AddBaseView run-time error

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create automated drawings using VBA, and am getting stuck when trying to create a drawing view. Specifically, I use the following code, which I have seen on several other forums:
Set oBaseView = oSheet.DrawingViews.AddBaseView(oPartDoc, ThisApplication.TransientGeometry.CreatePoint2d(12, 15), 0.5, ViewOrientationTypeEnum.kFrontViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle)
I know the issue is with the final two variables, as I have set up the others without any issues. It does not seem to matter whether or not I omit the “ViewOrientationTypeEnum” and “DrawingViewStyleEnum”. I still get a run-time error. I suspect I need to import these classes somehow? When I view them on the Object Browser, these classes have a certain(two yellow rectangles) symbol next to them, whereas the other classes which have worked for me have a different symbol next to them. Could this be part of the issue? I am using Inventor 2019, for reference. Any help would be much appreciated!