Community
Im using Revit 2012, from my understand, revit api will not allow to duplicate a view. I try to walk a round by create one origin 3D view, then set the properities of new view same as origin, for instance such as: . CropBox or .SectionBox.
But i'm struggeling at how to set the view orientation exactly same as origin view. I have try but not successful. Does anyone know how to solve this?
Thanks.
Quyet
Hi,
Not sure if I'm following, but the View3d object on 2012 API have two relevant methods: eyeposition and sectionbox. Below is a sample from the help file, please take a look.
>>>
private void Getinfo_View3D(View3D view3D) { string message = "View3D: "; // The position of the camera. XYZ eyePosition = view3D.EyePosition; message += "\nCamera position: (" + eyePosition.X + ", " + eyePosition.Y + ", " + eyePosition.Z + ")"; // Identifies whether this is a perspective view. if (view3D.IsPerspective) { message += "\nThe view is a perspective."; } // The section box of the 3D view cuts the model by its bounds. BoundingBoxXYZ sectionBox = view3D.SectionBox; XYZ max = sectionBox.Max; //Maximum coordinates (upper-right-front corner of the box). XYZ min = sectionBox.Min; //Minimum coordinates (lower-left-rear corner of the box). message += "\nSection Box: "; message += "\nMaximum coordinates: (" + max.X + ", " + max.Y + ", " + max.Z + ")"; message += "\nMinimum coordinates: (" + min.X + ", " + min.Y + ", " + min.Z + ")"; TaskDialog.Show("Revit",message); }
<<<
Hope this help, please let me know if it doesn't.