- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I'm really struggling trying to work with cameras.
My end goal is to create a drawing view with a specific orientation.
My problem is that after creating a camera object, when I try to change its properties I am met with an "unspecified error".
I have narrowed down the problem to this small piece of code:
' Create a camera to be used to define the view orientation. Dim cam As Camera cam = ThisApplication.TransientObjects.CreateCamera ' Set up the camera. cam.Perspective = True cam.ViewOrientationType = kIsoTopRightViewOrientation msgbox("Success!")
neither the perspective nor the view orientation type modification works. This is regardless of whether the rule is run from an assembly, a part, or a drawing.
I got this code from here, and although it is old code, I can't see any reason why this part would no longer work.
I think this is linked to the same issue but when I try to change properties such as the up vector like this:
cam.UpVector = ThisApplication.TransientGeometry.CreateUnitVector(0, 0, 1)
It makes no change to the camera at all, although it doesn't raise an error either.
Any help is really appreciated as I've tried so many things and so far no luck and I've run out of ideas.
Cheers.
Solved! Go to Solution.