Autodesk Inventor Engineer-to-Order
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Custom drawing views
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Custom drawing views
I am trying to add an IvBaseView from a custom angle. When I try to set “viewOrientation = :Arbitrary”, I get a "Type mismatch error." I am also trying to use the parameters cameraTarget, cameraEye, cameraUpVector, etc, but the drawing doesn’t change when I update the values.
What is the best way to add views from specific angles?
Re: Custom drawing views
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: Custom drawing views
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
[Better late than never...]
You can definitely create custom (aka arbitrary) views. I just tried it (in 6.1 R2, just released last week), and it worked in a simple test case. The important parameters are:
(These are pulled from the dynamic rules ... I entered them interactively rather than writing a new design)
Parent Rule viewOrientation As Name = :arbitrary
Parent Rule cameraEye As Point = point(-200, -200, -200)
Parent Rule cameraTarget As Point = root.origin
Parent Rule cameraUpVector As Vector = vector(-1,-1,0)
(This is essentially a bottom-iso view.)
When I changed to the camera up vector to an illegal value, the view disappeared with no error. That's a defect -- should give an error. But when I changed it to a different legal value, then the view updated as expected.

Jon Balgley
Autodesk Inventor ETO team
Autodesk, Inc.
Re: Custom drawing views
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: adding notes to template drawings. I can't recommend this procedure. Maybe you can get it to work using the Inventor API, but the design isn't "designed" to work that way.

Jon Balgley
Autodesk Inventor ETO team
Autodesk, Inc.
Re: Custom drawing views
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
A standard view works with no problems:
Child TestView2 As :IvBaseView viewOrientation = :IsoTopRight Model = model viewScale = .025 End Child
A custom view results in an error:
Child TestView As :IvBaseView viewOrientation = :arbitrary Model = model viewScale = .025 origin = Point(0,0,0) cameraEye = Point(-200, -200, -200) cameraTarget = root.origin cameraUpVector = Vector(-1,-1,0) End Child
Error:
Exception in function iv_updateSheet
Exception in function iv_createBaseView
Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
Any ideas?
Re: Custom drawing views
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Still works for me.
What release are you using? I don't think this should matter as long as you're running something fairly recent, because I took a quick look at the history of the related system code, and didn't see any relevant recent changes, but maybe I missed something.
Here are my sample rules:
Child view1 As :IvBaseView viewOrientation = :isoTopRight model = root viewScale = 0.25 origin = Point(150,200,0) End Child Child view2 As :IvBaseView viewOrientation = :arbitrary model = root viewScale = 0.25 cameraEye = Point(100, 0, 50) cameraTarget = root.origin cameraUpVector = Vector(0,0,1) origin = Point(300,200,0) End Child
Note that the exact 'eye' and 'target' points really matter. They have to be sized properly for your model. At least in terms of orientation. In my example above, the model is about 200mm square, and a little more than that in the Z direction. So when I change the Z-coordinate of the cameraEye value, I get a higher-or-lower view, but still from the side.

Jon Balgley
Autodesk Inventor ETO team
Autodesk, Inc.
Re: Custom drawing views
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
PS. The only thing that I see that could possibly be different from your iso view vs. your arbitrary view is "root.origin". Should that be "model.origin" instead?

Jon Balgley
Autodesk Inventor ETO team
Autodesk, Inc.
Re: Custom drawing views
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you for your attention.
I am using 5.1.
For the case I am testing, root.origin and model.origin are the same point. I have experiemented with a variety of values for the various camera parameters, and I always get the same type mismatch error. The part is definitely at the origin, so I expect that I should be able to look at that point from anywhere and see the part. I don't think those values are the issue.
Re: Custom drawing views
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I am also having a problem with this functionality in 5.1.
Your code works correctly only if the model is root.
If I change the model to root.SubAssembly I get the following error:
Exception in function iv_updateSheet
Exception in function iv_createBaseView
Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
If I change the viewOrientation to :IsoTopRight it will draw correctly.
************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
